Krita Source Code Documentation
Loading...
Searching...
No Matches
KisProofingConfigModel.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KISPROOFINGCONFIGMODEL_H
7#define KISPROOFINGCONFIGMODEL_H
8
9#include <QObject>
10
11#include <lager/cursor.hpp>
12#include <lager/extra/qt.hpp>
13#include <lager/state.hpp>
14
16#include <KisDisplayConfig.h>
18
21
32class KisProofingConfigModel : public QObject
33{
34 Q_OBJECT
35public:
36 KisProofingConfigModel(lager::cursor<KisProofingConfiguration> _data = lager::make_state(KisProofingConfiguration(), lager::automatic_tag{}));
38 lager::cursor<KisProofingConfiguration> data;
39 lager::state<KisDisplayConfig::Options, lager::automatic_tag> displayConfigOptions;
40
41 using ColorSpaceId = std::tuple<QString,QString,QString>;
42
43 LAGER_QT_CURSOR(KoColor, warningColor);
44
45 // should be set atomically, hence "reader"; for writing use setProofingColorSpaceId
46 LAGER_QT_READER(ColorSpaceId, proofingSpaceTuple);
47
49 LAGER_QT_READER(ComboBoxState, conversionIntentState);
50
51 LAGER_QT_CURSOR(bool, convBlackPointCompensation);
52
54 LAGER_QT_READER(ComboBoxState, displayTransformModeState);
55
56 // Following are all part of the second transform if it is custom.
57 LAGER_QT_READER(bool, enableCustomDisplayConfig);
60 LAGER_QT_READER(ComboBoxState, effectiveDisplayIntentState);
61
62 LAGER_QT_CURSOR(bool, dispBlackPointCompensation);
63 LAGER_QT_READER(CheckBoxState, effectiveDispBlackPointCompensationState);
64
65 LAGER_QT_CURSOR(bool, adaptationSwitch);
66 LAGER_QT_READER(CheckBoxState, adaptationSwitchState);
67
69 void setProofingColorSpaceIdAtomic(const QString &model, const QString &depth, const QString &profile);
70
71Q_SIGNALS:
73
74private:
76};
77
78#endif // KISPROOFINGCONFIGMODEL_H
KisDisplayConfig This class keeps track of the color management configuration for image to display....
std::pair< KoColorConversionTransformation::Intent, KoColorConversionTransformation::ConversionFlags > Options
The KisProofingConfigModel class.
KisDisplayConfig::Options m_displayConfigOptions
LAGER_QT_READER(KoColorConversionTransformation::Intent, effectiveDisplayIntent)
LAGER_QT_READER(CheckBoxState, effectiveDispBlackPointCompensationState)
LAGER_QT_READER(ComboBoxState, effectiveDisplayIntentState)
LAGER_QT_READER(ComboBoxState, conversionIntentState)
LAGER_QT_READER(ComboBoxState, displayTransformModeState)
LAGER_QT_CURSOR(bool, dispBlackPointCompensation)
LAGER_QT_CURSOR(bool, adaptationSwitch)
std::tuple< QString, QString, QString > ColorSpaceId
void setProofingColorSpaceIdAtomic(const QString &model, const QString &depth, const QString &profile)
LAGER_QT_CURSOR(KoColorConversionTransformation::Intent, conversionIntent)
lager::state< KisDisplayConfig::Options, lager::automatic_tag > displayConfigOptions
lager::cursor< KisProofingConfiguration > data
LAGER_QT_READER(ColorSpaceId, proofingSpaceTuple)
LAGER_QT_CURSOR(KoColor, warningColor)
Warning color for out-of-gamut checks.
void updateDisplayConfigOptions(KisDisplayConfig::Options options)
LAGER_QT_CURSOR(bool, convBlackPointCompensation)
KisProofingConfigModel(lager::cursor< KisProofingConfiguration > _data=lager::make_state(KisProofingConfiguration(), lager::automatic_tag{}))
LAGER_QT_CURSOR(KisProofingConfiguration::DisplayTransformState, displayTransformMode)
LAGER_QT_READER(bool, enableCustomDisplayConfig)
LAGER_QT_READER(CheckBoxState, adaptationSwitchState)
LAGER_QT_CURSOR(KoColorConversionTransformation::Intent, displayIntent)
The KisProofingConfiguration struct Little struct that stores the proofing configuration for a given ...