-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathledwidget.h
50 lines (40 loc) · 923 Bytes
/
ledwidget.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
#ifndef LEDWIDGET_H
#define LEDWIDGET_H
#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QTimer>
#include "cdoublebutton.h"
class LedWidget : public QWidget
{
Q_OBJECT
public:
explicit LedWidget(QWidget *parent = nullptr);
void Init(QString str_name);
void ReInit();
void LedChange(bool status);
int m_result;
QString m_name;
signals:
public slots:
private:
QLabel *led_pic;
QLabel *led_name;
QVBoxLayout *led_layout;
QHBoxLayout *pic_layout;
QHBoxLayout *name_layout;
QHBoxLayout *on_layout;
QHBoxLayout *off_layout;
QHBoxLayout *final_layout;
QVBoxLayout *result_layout;
QLabel* m_text_on;
CDoubleButton* m_color_on;
bool on_flag;
QLabel* m_text_off;
CDoubleButton* m_color_off;
bool off_flag;
QLabel* m_text_final;
CDoubleButton* m_color_final;
};
#endif // LEDWIDGET_H