#ifndef CONTROLHDMIWIDGET_H
#define CONTROLHDMIWIDGET_H

#include "base/switchcontrol.h"
#include <wDevicesManager/controlhdmischedule.h>
#include <QStackedWidget>
#include <QRadioButton>

class ControlHdmiWidget : public QWidget {
    Q_OBJECT
public:
    explicit ControlHdmiWidget(QWidget *parent = nullptr,QList<LedCard *> *m_pLedlist=nullptr);
protected:
    void showEvent(QShowEvent *event) override;
    void init();
    void changeEvent(QEvent *) override;
    void transUi();

private:
    QLabel *labelHdmiConfiguration;
    QRadioButton *radioButtonManual;
    QRadioButton *radioButtonSchedule;

    QWidget *m_pManual=nullptr;
    ControlHdmiSchedule *m_pSchedule=nullptr;
    QStackedWidget *m_pStackedW;

    QLabel *lbAsync;
    SwitchControl *swich;
    QLabel *lbSync;
    QPushButton *btnGetSync;

    LedCard   *m_pLedCard = nullptr;
    LedCard   *m_oldLedlist = nullptr;
    HpptClient *pHpptClient = nullptr;
    HpptClient *pHpptClientAll = nullptr;
    QString m_strUrl="";
    LoEmptyDialog * m_PostingDlg=nullptr;
    QTimer *m_pGetAskTimer=nullptr;
    bool m_bSelected=false;
};

#endif // CONTROLHDMIWIDGET_H
