forked from mapsme/omim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookmark_dialog.hpp
50 lines (39 loc) · 1.17 KB
/
bookmark_dialog.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
#pragma once
#include "kml/types.hpp"
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <string>
#include <unordered_map>
class QTreeWidget;
class QTreeWidgetItem;
class QLabel;
class QPushButton;
class Framework;
namespace qt
{
class BookmarkDialog : public QDialog
{
Q_OBJECT
public:
BookmarkDialog(QWidget * parent, Framework & framework);
void ShowModal();
private slots:
void OnItemClick(QTreeWidgetItem * item, int column);
void OnCloseClick();
void OnImportClick();
void OnExportClick();
void OnDeleteClick();
private:
void FillTree();
QTreeWidgetItem * CreateTreeItem(std::string const & title, QTreeWidgetItem * parent);
void OnAsyncLoadingStarted();
void OnAsyncLoadingFinished();
void OnAsyncLoadingFileSuccess(std::string const & fileName, bool isTemporaryFile);
void OnAsyncLoadingFileError(std::string const & fileName, bool isTemporaryFile);
QTreeWidget * m_tree;
Framework & m_framework;
std::unordered_map<QTreeWidgetItem *, kml::MarkGroupId> m_categories;
std::unordered_map<QTreeWidgetItem *, kml::MarkId> m_bookmarks;
std::unordered_map<QTreeWidgetItem *, kml::TrackId> m_tracks;
};
} // namespace qt