#ifndef DEVICEPANEL_H #define DEVICEPANEL_H #include "base/loqtreewidget.h" #include "globaldefine.h" #include "gutil/qgui.h" #include #include #include #include #include #include #include #include class DevicePanel : public QWidget { Q_OBJECT public: explicit DevicePanel(QSettings &, QWidget *parent = nullptr); ~DevicePanel(); void sendGetInfo(); void newCtrl(); void init(DeviceItem *item); QLabel *fdCardNumInfo; LoQTreeWidget *mDeviceTable; QUdpSocket mUdpSocket; QTimer mUdpTimer; QDialog *specifyIPDlg{0}; QTextEdit *fdIP{0}; int mainPanelIdx{0}; QWidget *mDeviceCtrlPanel{0}; QLabel *label_3, *nDeviceNum; QComboBox *bnSpecifyIP; QPushButton *btnRefresh; HBox *mHBox{0}; QTextEdit *fdInfo; QButtonGroup *mBtnGrp; QScrollArea *scrollArea; QPushButton *btnClear; QWidget *wgts[Setting_End]{}; int curIndex{-1}; protected: void changeEvent(QEvent *) override; void transUi(); void transCtrl(); signals: void sigSelectedDeviceList(); }; class ImgDlg : public QDialog { Q_OBJECT public: explicit ImgDlg(const QByteArray &, QWidget *parent = 0); QImage mImg; public: void paintEvent(QPaintEvent *) override; }; struct UDPPacket { unsigned char SyncHead[3]; unsigned char ucCommType; char serialCode[20]; unsigned int iLength; }; #endif // DEVICEPANEL_H