blob: 9755d3794889cd2d37c443e9eb6209ce6b6c25d6 (
plain)
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
|
#pragma once
#include "map/everywhere_search_params.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 QTimer;
namespace qt
{
class DrawWidget;
class SearchPanel : public QWidget
{
DrawWidget * m_pDrawWidget;
QTableWidget * m_pTable;
QLineEdit * m_pEditor;
QPushButton * m_pClearButton;
QTimer * m_pAnimationTimer;
QPixmap m_busyIcon;
vector<search::Result> m_results;
search::EverywhereSearchParams m_params;
uint64_t m_timestamp;
ThreadChecker m_threadChecker;
Q_OBJECT
public:
SearchPanel(DrawWidget * drawWidget, QWidget * parent);
private:
virtual void hideEvent(QHideEvent *);
void ClearResults();
private slots:
void OnSearchPanelItemClicked(int row, int column);
void OnSearchTextChanged(QString const &);
void OnSearchResults(uint64_t timestamp, search::Results const & results);
void OnAnimationTimer();
void OnClearButton();
bool TryChangeRouterCmd(QString const & str);
bool Try3dModeCmd(QString const & str);
bool TryMigrate(QString const & str);
bool TryDisplacementModeCmd(QString const & str);
bool TryTrafficSimplifiedColorsCmd(QString const & str);
};
} // namespace qt
|