2022-08-25 18:37:24 +08:00
|
|
|
|
#ifndef DEVICEITEM_H
|
|
|
|
|
#define DEVICEITEM_H
|
|
|
|
|
#include <QTreeWidget>
|
|
|
|
|
#include <QDir>
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
#include <QJsonObject>
|
|
|
|
|
#include <QJsonDocument>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <base/loqtreewidget.h>
|
2023-04-18 14:14:46 +08:00
|
|
|
|
#include <device/ledcard.h>
|
2022-08-25 18:37:24 +08:00
|
|
|
|
#include <communication/hpptclient.h>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QMap>
|
2022-10-27 15:07:45 +08:00
|
|
|
|
#include <base/loemptydialog.h>
|
2022-08-25 18:37:24 +08:00
|
|
|
|
|
|
|
|
|
enum DeviceTableField {
|
|
|
|
|
DeviceTable_Check = 0,
|
|
|
|
|
DeviceTable_ID,
|
|
|
|
|
DeviceTable_Online,
|
|
|
|
|
DeviceTable_IP,
|
|
|
|
|
DeviceTable_ScreenSize,
|
|
|
|
|
DeviceTable_Remark,
|
|
|
|
|
DeviceTable_Brightness,
|
|
|
|
|
DeviceTable_Power,
|
|
|
|
|
DeviceTable_Password,
|
|
|
|
|
DeviceTable_Info,
|
|
|
|
|
DeviceTable_Screenshot,
|
|
|
|
|
DeviceTable_End,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DeviceItem : public QObject, public QTreeWidgetItem {
|
|
|
|
|
friend class DevicePanel;
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
explicit DeviceItem(LedCard *pLedCard, LoQTreeWidget *parent = nullptr,QWidget *pWnd=nullptr);
|
|
|
|
|
~DeviceItem();
|
|
|
|
|
void HttpPostByTypeJsonObject(QJsonObject json);
|
|
|
|
|
void OnControlTcpSend(int iProgramIndex);
|
|
|
|
|
|
|
|
|
|
void refreshLable();
|
|
|
|
|
void SetMainTabWidgetIndex(int index);
|
|
|
|
|
//http获取控制卡信息的函数
|
|
|
|
|
void HttpGetLedCardWidthHeight();
|
|
|
|
|
void HttpGetLedCardRemarkName();
|
|
|
|
|
QPixmap Base64_To_Image(QByteArray bytearray,QString SavePath);
|
|
|
|
|
|
2023-04-18 14:14:46 +08:00
|
|
|
|
LedCard *mCard{0};
|
2022-08-25 18:37:24 +08:00
|
|
|
|
QTimer mHeartbeatTimer;
|
|
|
|
|
signals:
|
|
|
|
|
void sigOutputInfo(QString);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
void DeletePostingDlg();
|
|
|
|
|
void OnProHttpResponse(QString url, QString postMD5, QByteArray data);
|
|
|
|
|
void DeviceItemHttpPost();
|
|
|
|
|
protected slots:
|
|
|
|
|
void onReadbackPic();
|
|
|
|
|
void onVerifyLockPassword();
|
|
|
|
|
private:
|
|
|
|
|
int m_intIndexFlagOfInfoOrControl=0;
|
|
|
|
|
void SetPasswordItem(LedCard *p);
|
|
|
|
|
private:
|
|
|
|
|
QPushButton *m_bnCardDetailInfo = nullptr;//
|
|
|
|
|
QPushButton *m_bnReadbackPic = nullptr;//
|
|
|
|
|
QPushButton *m_bnLock = nullptr;//
|
|
|
|
|
QLabel *m_ImageOnline=nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LoQTreeWidget *m_parent = nullptr;
|
|
|
|
|
HpptClient *pHpptClient = nullptr;
|
|
|
|
|
QString m_strUrl="";
|
|
|
|
|
QWidget *m_pWnd=nullptr;
|
|
|
|
|
int m_HeartbeatCount=0;
|
|
|
|
|
LoEmptyDialog * m_PostingDlg=nullptr;
|
|
|
|
|
QTimer *m_pGetAskTimer=nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // DEVICEITEM_H
|