forked from mapsme/omim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_panel.hpp
73 lines (53 loc) · 1.52 KB
/
search_panel.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#pragma once
#include "map/everywhere_search_params.hpp"
#include "map/viewport_search_params.hpp"
#include "search/mode.hpp"
#include "search/result.hpp"
#include "base/thread_checker.hpp"
#include <cstdint>
#include <vector>
#include <QtGui/QPixmap>
#include <QtWidgets/QWidget>
class QTableWidget;
class QLineEdit;
class QPushButton;
class QButtonGroup;
class QTimer;
namespace qt
{
class DrawWidget;
class SearchPanel : public QWidget
{
DrawWidget * m_pDrawWidget;
QTableWidget * m_pTable;
QLineEdit * m_pEditor;
QPushButton * m_pClearButton;
QTimer * m_pAnimationTimer;
QButtonGroup * m_pSearchModeButtons;
QPixmap m_busyIcon;
std::vector<search::Result> m_results;
search::Mode m_mode;
search::EverywhereSearchParams m_everywhereParams;
search::ViewportSearchParams m_viewportParams;
uint64_t m_timestamp;
ThreadChecker m_threadChecker;
Q_OBJECT
public:
SearchPanel(DrawWidget * drawWidget, QWidget * parent);
private:
virtual void hideEvent(QHideEvent *);
void ClearResults();
void StartBusyIndicator();
void StopBusyIndicator();
private slots:
void OnSearchModeChanged(int mode);
void OnSearchPanelItemClicked(int row, int column);
void OnSearchTextChanged(QString const &);
void OnEverywhereSearchResults(uint64_t timestamp, search::Results const & results);
void OnAnimationTimer();
void OnClearButton();
bool Try3dModeCmd(QString const & str);
bool TryDisplacementModeCmd(QString const & str);
bool TryTrafficSimplifiedColorsCmd(QString const & str);
};
} // namespace qt