#ifndef CONTROLTESTWIDGET_H
#define CONTROLTESTWIDGET_H

#include <QWidget>
#include <wDevicesManager/ledcard.h>
#include <communication/hpptclient.h>
#include <LoUIClass/loemptydialog.h>
namespace Ui {
class ControlTestWidget;
}

class ControlTestWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ControlTestWidget(QWidget *parent = nullptr,QList<LedCard *> *m_pLedlist=nullptr);
    ~ControlTestWidget();

private:
    Ui::ControlTestWidget *ui;
protected slots:
    void OnStartTestLine();
    void OnStartTestGray();
    void OnStartTestColor();
    void OnStopTest();

    void OnpushButton1();
    void OnpushButton2();
    void OnpushButton3();
    void OnpushButton4();
    void OnpushButton5();
    void OnpushButton6();
    void OnpushButton7();
    void OnpushButton8();
    void OnpushButton9();
    void OnpushButton0();
    void OnpushButtonClear();
    void OnpushButtonReset();
    void OnpushButtonAnycast();
    void refreshLable();
    //类似的控制操作信号和槽函数和变量定义
    signals:
        void sigTcpSend(int);
        void sigSend(QJsonObject &,QString);
    protected slots:
        void DeletePostingDlg();
        void OnProHttpResponse(QString url, QString postMD5, QByteArray data);
        void OnProHttpResponseAll(QString url, QString postMD5, QByteArray data);
        void onSelectedDeviceList(QList<LedCard*> *);
        void onReadbackAllThisPage();
        void OnControlTypeSwitchIndexChanged(int index);
    private:
        QList<LedCard *> *m_pLedlist=nullptr;
        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;
        void SendAnycastCmd(QString strIp,int iProgramIndex);

};

#endif // CONTROLTESTWIDGET_H
