16#include <spdlog/spdlog.h>
22 spdlog::debug(
"OperationModelManager: Constructed.");
27 spdlog::info(
"OperationModelManager::createBasicAdjustmentModels: Creating basic adjustment models...");
30 if (!createAndAddModel<UI::Models::Operations::BrightnessModel>() ||
31 !createAndAddModel<UI::Models::Operations::ContrastModel>() ||
32 !createAndAddModel<UI::Models::Operations::HighlightsModel>() ||
33 !createAndAddModel<UI::Models::Operations::ShadowsModel>() ||
34 !createAndAddModel<UI::Models::Operations::WhitesModel>() ||
35 !createAndAddModel<UI::Models::Operations::BlacksModel>())
37 spdlog::error(
"OperationModelManager::createBasicAdjustmentModels: Failed to create one or more basic adjustment models.");
41 spdlog::info(
"OperationModelManager::createBasicAdjustmentModels: Successfully created {} basic adjustment models.", m_operation_models.size());
48 spdlog::error(
"OperationModelManager::registerModelsToQml: QML Context is null!");
52 spdlog::info(
"OperationModelManager::registerModelsToQml: Registering {} models to QML...", m_operation_models.size());
54 for (
const auto& model : m_operation_models) {
56 spdlog::warn(
"OperationModelManager::registerModelsToQml: Found null model in list, skipping.");
60 QString qml_name = model->name().toLower() +
"Control";
61 context->setContextProperty(qml_name, model.get());
62 spdlog::debug(
"OperationModelManager::registerModelsToQml: Registered model '{}' as '{}' in QML.", model->name().toStdString(), qml_name.toStdString());
65 spdlog::info(
"OperationModelManager::registerModelsToQml: Successfully registered {} models to QML.", m_operation_models.size());
Blacks operation model inheriting from BaseAdjustmentModel.
Brightness operation model inheriting from BaseAdjustmentModel.
bool registerModelsToQml(QQmlContext *context)
Registers the created operation models to the QML context. Makes the models available under their gen...
bool createBasicAdjustmentModels()
Creates instances of basic adjustment operation models. This method typically creates models like Bri...
OperationModelManager()
Constructs an OperationModelManager. Initializes the manager without requiring external dependencies ...
Contrast operation model inheriting from BaseAdjustmentModel.
Highlights operation model inheriting from BaseAdjustmentModel.
Shadows operation model inheriting from BaseAdjustmentModel.
Whites operation model inheriting from BaseAdjustmentModel.