guiscenemanager.h 937 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef INCLUDEGUIGUISCENEMANAGER_H
  2. #define INCLUDEGUIGUISCENEMANAGER_H
  3. #include <QObject>
  4. #include <QMainWindow>
  5. #include <QGridLayout>
  6. #include <map>
  7. const QString PROJECT_VERSION = "v.0.3.1dev";
  8. class Scene;
  9. class GuiSceneManager : public QObject
  10. {
  11. Q_OBJECT
  12. private:
  13. explicit GuiSceneManager(QObject *parent = nullptr);
  14. ~GuiSceneManager();
  15. public:
  16. static GuiSceneManager& getInstance() {
  17. static GuiSceneManager instance;
  18. return instance;
  19. }
  20. public slots:
  21. bool registerScene(QString scene_name, Scene* name);
  22. bool changeScene(QString scene_name, QString args = "");
  23. Scene *getScene(QString scene_name);
  24. bool show(QString scene_name);
  25. bool hide(QString scene_name);
  26. private:
  27. std::map<QString, Scene*> scenes_;
  28. QString current_scene_;
  29. QMainWindow* window_;
  30. QGridLayout* window_layout_;
  31. signals:
  32. public slots:
  33. };
  34. #endif // INCLUDEGUIGUISCENEMANAGER_H