qt/LedOK/device/ctrlbrightpanel.h

68 lines
1.6 KiB
C
Raw Normal View History

2022-08-25 18:37:24 +08:00
#ifndef CTRLBRIGHTPANEL_H
#define CTRLBRIGHTPANEL_H
2023-04-18 14:14:46 +08:00
#include "gutil/qgui.h"
2022-08-25 18:37:24 +08:00
#include <QLabel>
#include <QPushButton>
#include <QRadioButton>
2023-04-18 14:14:46 +08:00
#include <QCheckBox>
2022-08-25 18:37:24 +08:00
class CtrlBrightPanel : public QWidget {
Q_OBJECT
public:
2023-08-01 11:42:41 +08:00
CtrlBrightPanel();
2022-08-25 18:37:24 +08:00
protected:
void showEvent(QShowEvent *event) override;
void init();
void changeEvent(QEvent *) override;
void transUi();
private:
2023-04-18 14:14:46 +08:00
bool restoreScheduleJson(QJsonDocument &, int);
void getScheduleJson(QJsonObject &, int);
2023-10-23 15:08:45 +08:00
QLabel *lbTitle;
2022-08-25 18:37:24 +08:00
QRadioButton *radioAuto;
QRadioButton *radioManual;
QRadioButton *radioSchedule;
2023-04-18 14:14:46 +08:00
QCheckBox *fdAdaptToOld;
2022-08-25 18:37:24 +08:00
char mSensi{-1};
char mTask{-1};
QLabel *lbSensi;
QSlider *fdSensi;
QLabel *lbMinBright;
QSlider *fdMinBright;
QPushButton *btnSensiSet;
QPushButton *btnSensiGet;
QPushButton *btnMinBrightSet;
QPushButton *btnMinBrightGet;
2022-09-26 18:10:47 +08:00
QRadioButton *fdR68;
QRadioButton *fdRL2;
2022-08-25 18:37:24 +08:00
QPushButton *btnUpload;
QPushButton *btnTableGet;
QLabel *fdSensiTypeTip;
QLabel *fdBrightTip;
QLabel *lbCurBright;
QLabel *fdCurBright;
QPushButton *btnCurBrightGet;
QLabel *lbFixedBright;
QSlider *fdFixedBright;
QPushButton *btnFixedSet;
QPushButton *btnFixedGet;
QLabel *fdScheTip;
QPushButton *btnScheAdd;
QPushButton *btnScheDel;
QPushButton *btnScheClear;
QLabel *lbDefBright;
QSlider *fdDefBright;
QPushButton *btnScheImport;
QPushButton *btnScheExport;
2023-10-23 15:08:45 +08:00
TableWidget *tableSche;
2022-08-25 18:37:24 +08:00
QPushButton *btnScheSet;
QPushButton *btnScheGet;
};
#endif // CTRLBRIGHTPANEL_H