forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_panel.hpp
75 lines (54 loc) · 1.42 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
74
75
#pragma once
#include "search/mode.hpp"
#include "search/result.hpp"
#include "base/thread_checker.hpp"
#include <QtGui/QIcon>
#include <QtGui/QPixmap>
#include <QtWidgets/QWidget>
class QCheckBox;
class QLineEdit;
class QPushButton;
class QTableWidget;
class QTimer;
class Framework;
namespace qt
{
class DrawWidget;
class SearchPanel : public QWidget
{
DrawWidget * m_pDrawWidget;
QTableWidget * m_pTable;
QLineEdit * m_pEditor;
QPushButton * m_pClearButton;
QTimer * m_pAnimationTimer;
QCheckBox * m_isCategory;
QIcon m_clearIcon;
QPixmap m_busyIcon;
search::Results m_results;
search::Mode m_mode;
uint64_t m_timestamp;
ThreadChecker m_threadChecker;
Q_OBJECT
public:
SearchPanel(DrawWidget * drawWidget, QWidget * parent);
static std::string GetCurrentInputLocale();
private:
virtual void hideEvent(QHideEvent *);
void RunSearch();
void ClearTable();
void ClearResults();
void StartBusyIndicator();
void StopBusyIndicator();
private slots:
void OnSearchModeChanged(int mode);
void OnSearchPanelItemClicked(int row, int column);
void OnSearchTextChanged(QString const & str);
void OnEverywhereSearchResults(uint64_t timestamp, search::Results results);
void OnAnimationTimer();
void OnClearButton();
bool Try3dModeCmd(std::string const & str);
bool TryTrafficSimplifiedColorsCmd(std::string const & str);
private:
Framework & GetFramework() const;
};
} // namespace qt