This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
132 lines (82 loc) · 2.67 KB
/
mainwindow.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QDir>
#include <QTreeWidgetItem>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include "querywidget.h"
#include "pathsearchwidget.h"
#include "utilities/base.hpp"
#include "utilities/BDateTime.h"
#include "flowplotwidget.h"
#include "preferencesdialog.h"
#include "previewwidget.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override;
void preloadDataSets();
signals:
void percentageComplete(int);
void statusBarMessage(QString message, int timeout = 0);
void enabledChanged(bool enabled);
void filterDataListUpdated(FilterDataList _filterDataList);
private slots:
void on_tabs_currentChanged(int index);
void onImportStarted();
void onImportFinished();
private:
Ui::MainWindow *ui;
QString TITLE;
bool enabled = false;
QString adjacencySubdirName = "adjacency_adjacency";
QString dataSetSubdirName = "dataset";
int speedLevel = FASTER;
QDir mainDir = QDir();
QDir dataSetDir = QDir();
QDir adjacencyDir = QDir();
QTreeWidgetItem *importerItem = nullptr;
QTreeWidgetItem *filterItem = nullptr;
QueryWidget *queryWidget = nullptr;
PreviewWidget *previewWidget = nullptr;
PathSearchWidget *pathSearchWidget = nullptr;
QVector<BasePlotWidget *> plotWidgets{};
Adj adj;
QSqlDatabase db;
QMap<QString, int> fileId;
QMap<QString, int> dateId;
QSet<QString> curCsvs;
QSet<QString> curFields;
FilterDataList filterDataList;
QString previewSqlText;
void setupBzUi();
void updateFilterWidgetImportAdjacency(QTreeWidgetItem *parent);
void updateFilterWidgetImportDataSet(QTreeWidgetItem *parent);
void updateFilterWidgetImportFields(QTreeWidgetItem *parent);
void updateFilterWidgetFiltersFields(const QStringList &payTypes, const QStringList &lines);
[[deprecated]] void importFilteredData();
void importFilteredDataMt();
void importAdjacency();
void doImportAndFilterAll();
void onPreloadFinished();
void testPlot();
BasePlotWidget *initPlotTab(const QString &type, QWidget *plotTab);
void doAddPlotTab(const QString &type);
void closePlotTab(int index);
void preferences();
void setMainEnabled(bool _enabled);
FilterDataList getFilterDataList();
void updateFilterDataList();
void addFlowPlotTab();
void addTotalFlowPlotTab();
void addWithLineFlowPlotTab();
void addStationFlowPlotTab();
void statusBarReady(const QString &message);
};
#endif // MAINWINDOW_H