#ifndef CTRLVOLUMEPANEL_H
#define CTRLVOLUMEPANEL_H

#include "gutil/qgui.h"
#include <QLabel>
#include <QPushButton>
#include <QRadioButton>

class CtrlVolumePanel : public QWidget {
    Q_OBJECT
public:
    CtrlVolumePanel();
protected:
    void showEvent(QShowEvent *event) override;
    void init();
    void changeEvent(QEvent *) override;
    void transUi();

private:
    bool restoreScheduleJson(QJsonObject);
    QJsonObject getScheduleJson();

    QLabel *lbVolumeControl;
    QRadioButton *fdManual;
    QRadioButton *fdSchedule;

    QLabel *lbVolume;
    QSlider *fdVolume;
    QPushButton *fdVolumeGet;

    QLabel *fdScheTip;
    QPushButton *btnScheAdd;
    QPushButton *btnScheDel;
    QPushButton *btnScheClear;
    QLabel *lbDefBright;
    QSlider *fdDefBright;
    QPushButton *btnScheImport;
    QPushButton *btnScheExport;
    Table *tableSche;
    QPushButton *btnScheSet;
    QPushButton *btnScheGet;
};

#endif // CTRLVOLUMEPANEL_H
