-
Notifications
You must be signed in to change notification settings - Fork 0
/
tea.h
117 lines (90 loc) · 2.88 KB
/
tea.h
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef TEA_H
#define TEA_H
#include <QtGui/QMainWindow>
#include "ui_tea.h"
#include <QFile>
#include <QtNetwork>
#include <QProgressBar>
#include <QtSql>
#include "activeroutelistitem.h"
#include <QObject>
class TEA : public QMainWindow
{
Q_OBJECT
public:
TEA(QWidget *parent = 0);
virtual ~TEA();
enum Save { ForceSave, AskToSave, DoNotSave };
public slots:
private slots:
//MapView
void zoomChanged(int zoomLevel);
void sldChanged(int zoomLevel);
void mapSourceChanged(int minZoom, int maxZoom);
void rotateClockwise();
void rotateCClockwise();
void consoleButtonTriggered();
void consoleChanged();
void mapSourceChanged();
void trainerModeChanged();
void trainerSelectionChange();
void removeRoute();
void setGeneralSettings();
void updateADB();
void updatePath(QListWidgetItem *Item);
void editMetadata();
void centerMapOnSelectedRoute();
void saveAllToDatabase();
void saveSelectedToDatabase();
void loadFromFile(QString TEAFilePath = "");
void loadFromDatabase();
void saveToDatabase(QList<QListWidgetItem*> chosenItems);
void About();
void showListContextMenu(const QPoint &);
void settings();
/* Uninteresting functions */
void exportSelectedTEA();
void exportSelectedKML();
void zoomIn();
void zoomOut();
void actionViewDatabase();
void unloadAll();
void unloadSelected();
/* */
//void graphicsViewResized();
//void grphPressed();
//void grphReleased();
private:
Ui::MainWin ui;
int getMetadata(QString auid);
bool nodeNextSkip(QSqlQuery routeData, int timesToSkip);
bool nodeNextSkip(QSqlQuery* routeData, int timesToSkip);
bool maybeExit();
void unload(ActiveRouteListItem* route);
void unload(QList<QListWidgetItem*> routes);
bool save(QList<QListWidgetItem*> routes, TEA::Save behaviour = TEA::AskToSave);
bool save(ActiveRouteListItem *route, TEA::Save behaviour = TEA::AskToSave);
void createStatusBar();
void exportKML(QString auid);
void exportSelected(QString format);
void exportTEA(QString auid);
void fillTrainerViewCBoxes();
void connectSignalsAndSlots();
void rerenderRoute();
void addNewRoutes(QSqlQuery auidQuery, bool modified = false);
void addRoute(QString auid, bool modified);
void addPath(ActiveRouteListItem *route, QSqlQuery *routeData, QSqlRecord *metadata);
void addCurve(ActiveRouteListItem *route, QSqlQuery *routeData, QSqlRecord *metadata);
void redrawTrainer();
void createToolBar();
bool routeAdded(QString auid);
bool routesModified();
ActiveRouteListItem* find(QString auid);
QProgressBar *prgBar;
QString mapSource;
protected:
virtual void closeEvent(QCloseEvent *event);
virtual void dropEvent(QDropEvent *event);
virtual void dragEnterEvent(QDragEnterEvent *event);
};
#endif // TEA_H