#ifndef COUNTERWINDOWRT_H #define COUNTERWINDOWRT_H #include <QWidget> #include <QLabel> #include <QTimer> #include <QDate> #include <QTime> #include <QFile> #include <QThread> #include <QMessageBox> #include "CounterDevice.h" #include "CounterChannel.h" #include "QLabelDblClick.h" #include "ChannelChartForm.h" #include "CounterSettingForm.h" #include "common/utils/SettingConfig.h" #include "common/utils/TimerCounterUtil.h" #include "common/HttpRequestController.h" QT_BEGIN_NAMESPACE namespace Ui { class CounterWindowRT; } QT_END_NAMESPACE class CounterWindowRT : public QWidget { Q_OBJECT public: CounterWindowRT(QWidget *parent = nullptr); ~CounterWindowRT(); public slots: void drawCounterDataOnPage(QJsonArray messageArray); void updateDeviceWidget(); void initChannelForm(); private: Ui::CounterWindowRT *ui; CounterSettingForm * settingForm; QVector<QLabel *> devTitleList; // 计数器设备标题的QLabel集合 QVector<QLabel *> devRefList; // Ref通道 QVector<QLabel *> channelNameList; // 通道名的QLabel集合 QVector<QLabel *> channelValueList; // 通道测量值的QLabel集合 HttpRequestController * httpReq; void keyPressEvent(QKeyEvent *event); int initHttpToken(); void getDeviceList(); void getChannelList(QString deviceId); void initDevAndChannelForm(int count); void updateChannelDataForm(QJsonArray messageArray); private slots: void on_btnMenuMin_clicked(); void on_btnMenuSetting_clicked(); void onChannelNameLabelDblClicked(); void updateDateAndTime(); }; #endif // COUNTERWINDOWRT_H