mainwindow.h 729 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __MAINWINDOW_H__
  2. #define __MAINWINDOW_H__
  3. #include <QMainWindow>
  4. #include <QStackedWidget>
  5. #include <QTimer>
  6. #include <QLabel>
  7. #define MAX_CANVAS_COUNT 12
  8. class MainWindow : public QMainWindow
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit MainWindow(QWidget *parent = nullptr);
  13. ~MainWindow();
  14. protected:
  15. void init_ui();
  16. void reload();
  17. void clear();
  18. void setCurrentCanvas(bool isNewComfigure = false);
  19. private:
  20. QStackedWidget *m_pStackedWidget;
  21. QTimer m_timer;
  22. QLabel *m_pErrStrLabel;
  23. public slots:
  24. void onUpdateScreen(const QJsonObject &obj);
  25. void onPageSwitdh(int state);
  26. void onConfigureUpdate(const QString &filename);
  27. void onReloadCanvas();
  28. };
  29. #endif // MAINWINDOW_H