qt/LedOK/device/ctrlbrightpanel.h
2025-12-30 17:22:43 +08:00

65 lines
1.5 KiB
C++

#ifndef CTRLBRIGHTPANEL_H
#define CTRLBRIGHTPANEL_H
#include "gutil/qgui.h"
#include "gutil/qjson.h"
#include <QLabel>
#include <QPushButton>
#include <QRadioButton>
#include <QCheckBox>
#include <QCoreApplication>
class CtrlBrightPanel : public QWidget {
Q_OBJECT
public:
CtrlBrightPanel();
protected:
void showEvent(QShowEvent *event) override;
void init();
void changeEvent(QEvent *) override;
void transUi();
private:
bool restoreScheduleJson(JValue &, int);
void getScheduleJson(QJsonObject &, int);
QLabel *lbTitle;
QRadioButton *radioAuto, *radioManual, *radioSchedule;
QCheckBox *fdAdaptToOld;
char mSensi = -1;
char mTask = -1;
std::vector<QPushButton *> btnSets, btnGets;
QLabel *lbSensi;
QSlider *fdSensi;
QLabel *lbMinBright, *lbMaxBright;
QSlider *edMinBright, *edMaxBright;
QRadioButton *fdR68;
QRadioButton *fdRL2;
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;
TableWidget *tableSche;
QPushButton *btnScheSet;
QPushButton *btnScheGet;
};
#endif // CTRLBRIGHTPANEL_H