qt/LedOK/deviceitem.h

50 lines
1.1 KiB
C
Raw Normal View History

2022-08-25 18:37:24 +08:00
#ifndef DEVICEITEM_H
#define DEVICEITEM_H
2023-05-15 16:06:10 +08:00
2022-08-25 18:37:24 +08:00
#include <QPushButton>
#include <base/loqtreewidget.h>
2023-05-15 16:06:10 +08:00
#include "globaldefine.h"
2022-08-25 18:37:24 +08:00
#include <QLabel>
2023-05-15 16:06:10 +08:00
#include <QDialog>
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:
2023-05-15 16:06:10 +08:00
explicit DeviceItem(LoQTreeWidget *parent);
void init();
2022-08-25 18:37:24 +08:00
void DeviceItemHttpPost();
2023-05-15 16:06:10 +08:00
LedCard mCard;
QPushButton *btnUnlock = nullptr;
2022-08-25 18:37:24 +08:00
private:
2023-05-15 16:06:10 +08:00
QPushButton *m_bnCardDetailInfo = nullptr;
QPushButton *m_bnReadbackPic = nullptr;
2022-08-25 18:37:24 +08:00
QLabel *m_ImageOnline=nullptr;
LoQTreeWidget *m_parent = nullptr;
};
2023-04-25 16:30:58 +08:00
class ImgDlg : public QDialog {
2023-05-15 16:06:10 +08:00
Q_OBJECT
2023-04-25 16:30:58 +08:00
public:
explicit ImgDlg(const QByteArray &, QWidget *parent = 0);
QImage mImg;
public:
void paintEvent(QPaintEvent *) override;
};
2022-08-25 18:37:24 +08:00
#endif // DEVICEITEM_H