| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef __MAINWINDOW_H__
- #define __MAINWINDOW_H__
- #include <QMainWindow>
- #include <QStackedWidget>
- #include <QTimer>
- #include <QLabel>
- #include "broadcast.h"
- #define MAX_CANVAS_COUNT 12
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
- public:
- explicit MainWindow(const int &frequency, QWidget *parent = nullptr);
- ~MainWindow();
- protected:
- void init_ui();
- bool reload();
- void clear();
- void setCurrentCanvas(bool isNewComfigure = false);
- private:
- QStackedWidget *m_pStackedWidget;
- QTimer m_timer; // 数据中断检测定时器
- QTimer m_updateScreenTimer; // 更新画面显示定时器
- int m_frequency; // 更新频率
- QLabel *m_pErrStrLabel;
- Broadcast m_broadcast;
- QTimer m_reportTimer;
- QString m_packageCount;
- public slots:
- void onUpdateScreen(const QJsonObject &obj);
- void onPageSwitdh(int state);
- void onConfigureUpdate(const QString &filename);
- void onReloadCanvas();
- private slots:
- void onReport();
-
- };
- #endif // MAINWINDOW_H
|