-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevicesetting.h
85 lines (59 loc) · 1.49 KB
/
devicesetting.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
#ifndef DEVICESETTING_H
#define DEVICESETTING_H
#include <QGroupBox>
#include <QLabel>
#include <QLineEdit>
#include <QObject>
#include <QSpinBox>
#include <QVBoxLayout>
class DeviceSettingData
{
public:
DeviceSettingData();
DeviceSettingData(int P_1_7, int P_3_0, int P_3_8);
bool checkValue();
int currentP_1_7 = 0;
int currentP_3_0 = 0;
int currentP_3_8 = 0;
};
class DeviceSetting : public QObject
{
Q_OBJECT
public:
explicit DeviceSetting(int row, int column, bool topRow, bool firstColumn, QObject *parent = 0);
void setValue(int P_1_7, int P_3_0, int P_3_8);
void setEditable(bool editable);
bool checkValueOnEdit();
bool setValueFromEdit();
void returnValue();
QGroupBox *getGroupCell() const;
QString getName() const;
static bool indexByName(QString name, int& row, int& column);
DeviceSettingData getDsd() const;
int getCountTryRequest() const;
void setCountTryRequest(int value);
private:
int row;
int column;
int number;
QString name;
DeviceSettingData dsd;
QGroupBox * groupCell;
QVBoxLayout * layoutCell;
QHBoxLayout * rowLable;
QHBoxLayout * rowP;
QLabel * lable_empty;
QLabel * lable_empty_name;
QLabel * lable_1_7;
QLabel * lable_3_0;
QLabel * lable_3_8;
QLabel * lableP;
QLabel * lableName;
QSpinBox * spinP_1_7;
QSpinBox * spinP_3_0;
QSpinBox * spinP_3_8;
int countTryRequest;
signals:
public slots:
};
#endif // DEVICESETTING_H