-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.h
61 lines (44 loc) · 973 Bytes
/
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QtCharts>
#include <QTimer>
#include <QTime>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public slots:
void update();
void readyRead();
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_btnStart_clicked();
void on_btnOpen_clicked();
void on_btnClose_clicked();
void on_btnStop_clicked();
void on_btnRequest_clicked();
private:
QTime time;
double ah;
double highestVolt;
double highestCurrent;
double lastVoltage;
double lastCurrent;
QValueAxis *axisX;
QValueAxis *axisY;
QValueAxis *axisY2;
QLineSeries *seriesVolts;
QLineSeries *seriesCurrent;
Ui::MainWindow *ui;
QChartView *chartView;
QTimer *timer;
QSerialPort port;
};
#endif // MAINWINDOW_H