Changeset View
Changeset View
Standalone View
Standalone View
libcolorcorrect/compositorcoloradaptor.h
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 87 | enum class ErrorCode { | |||
---|---|---|---|---|---|
92 | // rendering backend doesn't support hardware color correction | 92 | // rendering backend doesn't support hardware color correction | ||
93 | ErrorCodeBackendNoSupport | 93 | ErrorCodeBackendNoSupport | ||
94 | }; | 94 | }; | ||
95 | Q_ENUMS(ErrorCode) | 95 | Q_ENUMS(ErrorCode) | ||
96 | 96 | | |||
97 | enum class Mode { | 97 | enum class Mode { | ||
98 | ModeAutomatic, | 98 | ModeAutomatic, | ||
99 | ModeLocation, | 99 | ModeLocation, | ||
100 | ModeTimings | 100 | ModeTimings, | ||
101 | ModeConstant, | ||||
101 | }; | 102 | }; | ||
102 | Q_ENUMS(Mode) | 103 | Q_ENUMS(Mode) | ||
103 | 104 | | |||
104 | explicit CompositorAdaptor(QObject *parent = nullptr); | 105 | explicit CompositorAdaptor(QObject *parent = nullptr); | ||
105 | ~CompositorAdaptor() override = default; | 106 | ~CompositorAdaptor() override = default; | ||
106 | 107 | | |||
107 | int error() const { | 108 | int error() const { | ||
108 | return (int)m_error; | 109 | return (int)m_error; | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
155 | } | 156 | } | ||
156 | int mode() const { | 157 | int mode() const { | ||
157 | return (int)m_mode; | 158 | return (int)m_mode; | ||
158 | } | 159 | } | ||
159 | int modeStaged() const { | 160 | int modeStaged() const { | ||
160 | return (int)m_modeStaged; | 161 | return (int)m_modeStaged; | ||
161 | } | 162 | } | ||
162 | void setModeStaged(int mode) { | 163 | void setModeStaged(int mode) { | ||
163 | if (mode < 0 || 2 < mode || (int)m_modeStaged == mode) { | 164 | if (mode < 0 || 3 < mode || (int)m_modeStaged == mode) { | ||
164 | return; | 165 | return; | ||
165 | } | 166 | } | ||
166 | m_modeStaged = (Mode)mode; | 167 | m_modeStaged = (Mode)mode; | ||
167 | emit modeStagedChanged(); | 168 | emit modeStagedChanged(); | ||
168 | } | 169 | } | ||
169 | int modeDefault() const { | 170 | int modeDefault() const { | ||
170 | return (int)Mode::ModeAutomatic; | 171 | return (int)Mode::ModeAutomatic; | ||
171 | } | 172 | } | ||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |