CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
qml_context_setup.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <QQmlContext>
11#include <memory>
12
13namespace CaptureMoment::UI {
14
15namespace Controller {
16class ImageControllerBase;
17}
18
19namespace Serializer {
20class SerializerController;
21}
22
34public:
47 static bool setupContext(QQmlContext* context);
48
54 static void setSerializerController(std::unique_ptr<Serializer::SerializerController> ui_serializer_controller);
55
61 static bool registerSerializerToQml(QQmlContext* context);
62
67 static std::shared_ptr<Controller::ImageControllerBase> getControllerMainScene() { return m_controller_main_scene; }
68
73 static Serializer::SerializerController* getSerializerController() { return m_serializer_controller.get(); }
74
75private:
83 static std::shared_ptr<Controller::ImageControllerBase> m_controller_main_scene;
84
90 static std::unique_ptr<Serializer::SerializerController> m_serializer_controller;
91
96 [[nodiscard]] static bool createControllerMainScene();
97
103 [[nodiscard]] static bool registerCoreToQml(QQmlContext* context);
104};
105
106} // namespace CaptureMoment::UI
Central manager for QML context setup.
static void setSerializerController(std::unique_ptr< Serializer::SerializerController > ui_serializer_controller)
Sets the SerializerController instance to be registered with the QML context. This must be called bef...
static std::shared_ptr< Controller::ImageControllerBase > getControllerMainScene()
Getter for the main ImageControllerBase instance.
static bool registerSerializerToQml(QQmlContext *context)
Registers the SerializerController (if set) to the QML context.
static Serializer::SerializerController * getSerializerController()
Getter for the UISerializerManager instance.
static bool setupContext(QQmlContext *context)
Setup complete QML context with all objects.
UI manager for handling file-based serialization and deserialization of image operations.
CaptureMoment — footer