71 lines
1.7 KiB
C
71 lines
1.7 KiB
C
|
#ifndef CTRLBRIGHTPANEL_H
|
||
|
#define CTRLBRIGHTPANEL_H
|
||
|
|
||
|
#include "ledcard.h"
|
||
|
#include "base/table.h"
|
||
|
#include <QButtonGroup>
|
||
|
#include <QLabel>
|
||
|
#include <QPushButton>
|
||
|
#include <QRadioButton>
|
||
|
#include <QSlider>
|
||
|
#include <QStackedLayout>
|
||
|
#include <QStyledItemDelegate>
|
||
|
|
||
|
class CtrlBrightPanel : public QWidget {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit CtrlBrightPanel(QWidget *parent = nullptr);
|
||
|
protected:
|
||
|
void showEvent(QShowEvent *event) override;
|
||
|
void init();
|
||
|
void changeEvent(QEvent *) override;
|
||
|
void transUi();
|
||
|
|
||
|
private:
|
||
|
bool restoreScheduleJson(QJsonObject, int = 100);
|
||
|
QJsonObject getScheduleJson(int = 100);
|
||
|
QLabel *lbBrightCfg;
|
||
|
QRadioButton *radioAuto;
|
||
|
QRadioButton *radioManual;
|
||
|
QRadioButton *radioSchedule;
|
||
|
char mSensi{-1};
|
||
|
char mTask{-1};
|
||
|
|
||
|
QLabel *lbSensi;
|
||
|
QSlider *fdSensi;
|
||
|
QLabel *lbMinBright;
|
||
|
QSlider *fdMinBright;
|
||
|
QPushButton *btnSensiSet;
|
||
|
QPushButton *btnSensiGet;
|
||
|
QPushButton *btnMinBrightSet;
|
||
|
QPushButton *btnMinBrightGet;
|
||
|
QRadioButton *radioButton_2;
|
||
|
QRadioButton *radioButton;
|
||
|
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;
|
||
|
Table *tableSche;
|
||
|
QPushButton *btnScheSet;
|
||
|
QPushButton *btnScheGet;
|
||
|
};
|
||
|
|
||
|
#endif // CTRLBRIGHTPANEL_H
|