5#include <unordered_map>
15class ImageControllerBase;
18namespace Models::Manager {
41 template<
typename... TModels>
59 std::vector<std::shared_ptr<Models::Operations::IOperationModel>> m_operation_models;
63 [[nodiscard]]
bool addModel(
const QString& qmlName);
67 using has_name_method = std::is_same_v<decltype(std::declval<T>().name()), QString>;
71 [[nodiscard]]
bool createAndAddModel(
const QString& qmlName);
Manages the creation, storage, and QML registration of operation model instances.
OperationModelManager(Controller::ImageControllerBase *controller)
bool registerModelsToQml(QQmlContext *context)
Registers all operation models to the QML context.
bool createModels()
Creates all operation models. Uses a variadic template to create multiple models in one call.
~OperationModelManager()=default
bool connectModels()
Connects all operation models to the controller.
OperationModelManager(const OperationModelManager &)=delete
OperationModelManager & operator=(const OperationModelManager &)=delete
Qt bridge between Core (PhotoEngine) and Qt UI.