This repository was archived by the owner on Oct 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmainwindow.h
More file actions
70 lines (60 loc) · 1.8 KB
/
mainwindow.h
File metadata and controls
70 lines (60 loc) · 1.8 KB
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QProcess>
#include <QLineEdit>
#include <QTextEdit>
#include <QSpinBox>
#include <QtGlobal>
#include <QDebug>
#include <db/Db_original.h>
#include <string>
#include <map>
#include "schema/helperclass.h"
#include "db/triangulation.h"
#include "ui_mainwindow.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
QProcess mqtt;
QTimer* timer;
QTimer* mapTimer;
~MainWindow();
private:
Triangulation triang;
int n_roots;
float env_const;
int measured_power;
bool triang_started;
map<string, Point> roots;
Db_original* db;
qint64 diffTick;
void InsertButtonClicked(QSpinBox*, QLineEdit*, QLineEdit*, QLineEdit*, QTextEdit*);
void CheckNRoots(QSpinBox*);
void MqttStart() {
QString program = "python mqtt.py";
time_t timev;
time(&timev);
qDebug() << "Start python.Time: "<<timev;
this->mqtt.startDetached(program);
}
void DB();
// Tabs
void show_map(QChartView *mapScatter, QString mapTitles);
void show_map1(QChartView *mapScatter, QString mapTitles);
void show_map(QChartView *mapScatter, QString mapTitles, QDateTime currTime,int n_last_sec, QString MACfilter);
void show_stats_graph(QLabel *statsLabel, int indexCombo, QChartView *statsChartViewBar1, QChartView *statsChartViewBar2QDateTime, QDateTime temp);
void show_history_plot(QLabel *histLabel, QChartView *histChartViewBar, QDateTimeEdit *histDateEdit);
Ui::MainWindow *ui;
public slots:
void closing() {
qDebug() << "Kill Process...";
this->timer->stop();
this->mqtt.kill();
}
};
#endif // MAINWINDOW_H