qt/LedOK/devicepanel.h

55 lines
1.3 KiB
C
Raw Normal View History

2022-08-25 18:37:24 +08:00
#ifndef DEVICEPANEL_H
#define DEVICEPANEL_H
#include "deviceitem.h"
#include <QWidget>
#include <QFile>
#include <QBoxLayout>
#include <QPainter>
#include <QStyledItemDelegate>
#include <communication/network.h>
#include <QTreeWidgetItem>
#include <QCheckBox>
#include <QComboBox>
#include <wDevicesManager/ctrlbrightpanel.h>
class DeviceCtrlPanel;
class DevicePanel : public QWidget {
Q_OBJECT
public:
explicit DevicePanel(QWidget *parent = nullptr);
~DevicePanel();
void sendGetInfo();
QLabel *fdCardNumInfo;
LoQTreeWidget *mDeviceTable;
NetComm *pNetComm;
protected:
void changeEvent(QEvent *) override;
void transUi();
public slots:
void ShowDevicesInfoOrControlWidget(int index);
protected slots:
void onCheckStateChanged(int f);
void FilterProgram(const QString &strtemp);
void OnControlSendJson(QJsonObject &json,QString strFanYi);
void OnControlTcpSend(int iProgramIndex);
void OnOutputInfo(QString);
signals:
void sigSelectedDeviceList(QList<LedCard *> *);
private:
QLabel *label_3, *nDeviceNum;
QComboBox *bnSpecifyIP;
QPushButton *btnRefrash;
QTreeWidgetItem *m_headerItem;
QHBoxLayout *mHBox{0};
DeviceCtrlPanel *mDeviceCtrlPanel{0};
int m_intIndexFlagOfInfoOrControl{0};
int GetSelectDeviceNum();
QList<LedCard*> mSelCards;
};
#endif // DEVICEPANEL_H