#ifndef WPROGRAMPUBLISHITEM_H
#define WPROGRAMPUBLISHITEM_H

#include "sendprogthread.h"
#include <QDateTime>
#include <QDir>
#include <QJsonDocument>
#include <QJsonObject>
#include <QLabel>
#include <QProgressBar>
#include <QPushButton>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <base/loqtreewidget.h>
#include <communication/hpptclient.h>
#include <device/ledcard.h>

class wProgramPublishItem : public QObject, public QTreeWidgetItem {
    Q_OBJECT
public:
    explicit wProgramPublishItem(LedCard *pLedCard, LoQTreeWidget *parent = nullptr,QWidget *pWnd=nullptr,QString strProgramName="",QString strProgramPath="");
    void SetItemParam(LedCard *p);

    LedCard *mLedCard{nullptr};
    QProgressBar *fdProgress{nullptr};
    bool mIsSending{false};

public slots:
    void onVerifyLockPassword();

private:
    void SetPasswordItem(LedCard *p);

    QString m_strProgramName="";
    QString m_strProgramPath="";
    QLabel *m_ImageOnline=nullptr;
    LoQTreeWidget *m_parent = nullptr;
    QWidget *m_pWnd=nullptr;
    QPushButton *m_bnLock = nullptr;//

};
enum ENUM_DEVICE_PUBLISH_HEADERITEM {
    ENUM_DEVICE_PUBLISH_HEADE_CHECK=0,
    ENUM_DEVICE_PUBLISH_HEADE_SCREEN_ID,
    ENUM_DEVICE_PUBLISH_HEADE_ONLINE,
    ENUM_DEVICE_PUBLISH_HEADE_SCREEN_IP,
    ENUM_DEVICE_PUBLISH_HEADE_SCREEN_SIZE,
    ENUM_DEVICE_PUBLISH_HEADE_ENCRYPT,
    ENUM_DEVICE_PUBLISH_HEADE_REMARK_NAME,
    ENUM_DEVICE_PUBLISH_HEADE_PROGRESS,
    ENUM_DEVICE_PUBLISH_HEADE_REMARKS,
    ENUM_DEVICE_PUBLISH_HEADE_END,
};

#endif // WPROGRAMPUBLISHITEM_H
