mainwindow.h 645 B

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