qt/LedOK/devicepanel.h

51 lines
1.1 KiB
C
Raw Normal View History

2022-08-25 18:37:24 +08:00
#ifndef DEVICEPANEL_H
#define DEVICEPANEL_H
2023-05-15 16:06:10 +08:00
#include "base/loqtreewidget.h"
#include <QLabel>
#include <QTimer>
#include <QPushButton>
2022-09-28 18:21:57 +08:00
#include <QUdpSocket>
2022-08-25 18:37:24 +08:00
#include <QCheckBox>
#include <QComboBox>
2022-09-28 18:21:57 +08:00
#include <QTextEdit>
2022-09-30 18:08:39 +08:00
#include <QSettings>
2023-05-15 16:06:10 +08:00
#include <QHBoxLayout>
2022-08-25 18:37:24 +08:00
class DeviceCtrlPanel;
class DevicePanel : public QWidget {
Q_OBJECT
public:
2022-09-30 18:08:39 +08:00
explicit DevicePanel(QSettings &, QWidget *parent = nullptr);
2022-08-25 18:37:24 +08:00
~DevicePanel();
void sendGetInfo();
QLabel *fdCardNumInfo;
LoQTreeWidget *mDeviceTable;
2022-09-28 18:21:57 +08:00
QUdpSocket mUdpSocket;
QTimer mUdpTimer;
QDialog *specifyIPDlg{0};
QTextEdit *fdIP{0};
2023-05-15 16:06:10 +08:00
int mainPanelIdx{0};
DeviceCtrlPanel *mDeviceCtrlPanel{0};
2022-08-25 18:37:24 +08:00
QLabel *label_3, *nDeviceNum;
QComboBox *bnSpecifyIP;
2022-09-28 18:21:57 +08:00
QPushButton *btnRefresh;
2022-08-25 18:37:24 +08:00
QTreeWidgetItem *m_headerItem;
QHBoxLayout *mHBox{0};
2023-05-15 16:06:10 +08:00
protected:
void changeEvent(QEvent *) override;
void transUi();
signals:
void sigSelectedDeviceList();
2022-08-25 18:37:24 +08:00
};
2023-05-19 18:50:21 +08:00
struct UDPPacket {
unsigned char SyncHead[3];
unsigned char ucCommType;
char serialCode[20];
unsigned int iLength;
};
2022-08-25 18:37:24 +08:00
#endif // DEVICEPANEL_H