123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef INCLUDEGUIGUISCENEMANAGER_H
- #define INCLUDEGUIGUISCENEMANAGER_H
- #include <QObject>
- #include <QMainWindow>
- #include <QGridLayout>
- #include <map>
- class Scene;
- class GuiSceneManager : public QObject
- {
- Q_OBJECT
- private:
- explicit GuiSceneManager(QObject *parent = nullptr);
- ~GuiSceneManager();
- public:
- static GuiSceneManager& getInstance() {
- static GuiSceneManager instance;
- return instance;
- }
- public slots:
- bool registerScene(QString scene_name, Scene* name);
- bool changeScene(QString scene_name, QString args = "");
- Scene *getScene(QString scene_name);
- bool show(QString scene_name);
- bool hide(QString scene_name);
- private:
- std::map<QString, Scene*> scenes_;
- QString current_scene_;
- QMainWindow* window_;
- QGridLayout* window_layout_;
- signals:
- public slots:
- };
- #endif // INCLUDEGUIGUISCENEMANAGER_H
|