config1digitsetandenablesetdlg.h
1021 Bytes
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
#ifndef CONFIG1DIGITSETANDENABLESETDLG_H
#define CONFIG1DIGITSETANDENABLESETDLG_H
#include <QDialog>
enum custom_result{
result_rejected=0,
result_disable,
result_ok
};
#define MAX_MONITORING_VALUE 180
#define MIN_MONITORING_VALUE 5
namespace Ui {
class Config1DigitSetAndEnableSetDlg;
}
class Config1DigitSetAndEnableSetDlg : public QDialog
{
Q_OBJECT
public:
explicit Config1DigitSetAndEnableSetDlg(QWidget *parent = 0, uint16_t val = 5);
~Config1DigitSetAndEnableSetDlg();
custom_result getResult(){return m_nResult;};
int getValue();
private slots:
void on_ctrBtnOk_clicked();
void on_ctrBtnOk_2_clicked();
void on_ctrBtnCancel_clicked();
public slots:
void keyCancel_clicked();
void keyEnter_clicked();
protected:
void keyReleaseEvent(QKeyEvent* event);
void keyPressEvent(QKeyEvent* event);
private:
Ui::Config1DigitSetAndEnableSetDlg *ui;
custom_result m_nResult;
int m_nPrevValue;
};
#endif // CONFIG1DIGITSETANDENABLESETDLG_H