-
Notifications
You must be signed in to change notification settings - Fork 0
/
BHMI.h
84 lines (65 loc) · 1.65 KB
/
BHMI.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
#ifndef BHMI_H
#define BHMI_H
#include <CameraDriver.h>
#include <Structures.h>
#include <QDateTime>
#include <QMainWindow>
#include <QPointer>
#include <QTimer>
class BucketsModel;
class SerialHandler;
class DriverSettings;
class PrintFirst;
QT_BEGIN_NAMESPACE
class QTableView;
class QCameraViewfinder;
class QDateTimeEdit;
namespace Ui {
class BHMI;
}
QT_END_NAMESPACE
class BHMI : public QMainWindow {
Q_OBJECT
public:
BHMI(QWidget *parent = nullptr);
~BHMI();
Structures::DataOverSerial getLastData() const;
void setLastData(const Structures::DataOverSerial &lastData);
signals:
void cameraModeChanged(bool turnOn);
void lastDataChanged();
private slots:
void updateDateTime();
void onAddBUcket();
void onSaveBuckets();
void onRemoveBucket();
bool getCamera() const;
void setCamera(bool value);
void onCameraModeChanged(bool turnOn);
private:
// helper functions
void initBucketView();
void initTimer();
void initSettings();
void initLoadManagement();
// void initSensorsNetwork();
void turnCameraOn();
void turnCameraOff();
void initCamera();
void initPrinter();
void updateDataOverSerial(const Structures::DataOverSerial &data);
private:
Ui::BHMI *ui;
QTimer _timeUpdater;
QPointer<QTableView> _bucketsView;
QScopedPointer<BucketsModel> _bucketsModel;
bool _cameraMode;
QScopedPointer<SerialHandler> _sensorSH; // sensor serial handler
Structures::DataOverSerial _lastData;
QScopedPointer<QCameraViewfinder> _cameraView;
CameraDriver _cameraDriver;
QDateTime _dateTimeShow;
QScopedPointer<DriverSettings> _driverDialog;
QScopedPointer<PrintFirst> _printer;
};
#endif // BHMI_H