Changeset View
Changeset View
Standalone View
Standalone View
colorcorrection/manager.h
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Line(s) | 94 | public: | |||
---|---|---|---|---|---|
170 | */ | 170 | */ | ||
171 | int targetTemperature() const; | 171 | int targetTemperature() const; | ||
172 | 172 | | |||
173 | /** | 173 | /** | ||
174 | * Returns the mode in which Night Color is operating. | 174 | * Returns the mode in which Night Color is operating. | ||
175 | */ | 175 | */ | ||
176 | NightColorMode mode() const; | 176 | NightColorMode mode() const; | ||
177 | 177 | | |||
178 | /** | ||||
179 | * Returns the datetime that specifies when the previous screen color temperature transition | ||||
180 | * had started. Notice that when Night Color operates in the Constant mode, the returned date | ||||
181 | * time object is not valid. | ||||
182 | */ | ||||
183 | QDateTime previousTransitionDateTime() const; | ||||
184 | | ||||
185 | /** | ||||
186 | * Returns the duration of the previous screen color temperature transition, in milliseconds. | ||||
187 | */ | ||||
188 | qint64 previousTransitionDuration() const; | ||||
189 | | ||||
190 | /** | ||||
191 | * Returns the datetime that specifies when the next screen color temperature transition will | ||||
192 | * start. Notice that when Night Color operates in the Constant mode, the returned date time | ||||
193 | * object is not valid. | ||||
194 | */ | ||||
195 | QDateTime scheduledTransitionDateTime() const; | ||||
196 | | ||||
197 | /** | ||||
198 | * Returns the duration of the next screen color temperature transition, in milliseconds. | ||||
199 | */ | ||||
200 | qint64 scheduledTransitionDuration() const; | ||||
201 | | ||||
178 | // for auto tests | 202 | // for auto tests | ||
179 | void reparseConfigAndReset(); | 203 | void reparseConfigAndReset(); | ||
180 | 204 | | |||
181 | public Q_SLOTS: | 205 | public Q_SLOTS: | ||
182 | void resetSlowUpdateStartTimer(); | 206 | void resetSlowUpdateStartTimer(); | ||
183 | void quickAdjust(); | 207 | void quickAdjust(); | ||
184 | 208 | | |||
185 | Q_SIGNALS: | 209 | Q_SIGNALS: | ||
Show All 24 Lines | |||||
210 | */ | 234 | */ | ||
211 | void targetTemperatureChanged(); | 235 | void targetTemperatureChanged(); | ||
212 | 236 | | |||
213 | /** | 237 | /** | ||
214 | * Emitted whenver the operation mode has changed. | 238 | * Emitted whenver the operation mode has changed. | ||
215 | */ | 239 | */ | ||
216 | void modeChanged(); | 240 | void modeChanged(); | ||
217 | 241 | | |||
242 | /** | ||||
243 | * Emitted whenever the timings of the previous color temperature transition have changed. | ||||
244 | */ | ||||
245 | void previousTransitionTimingsChanged(); | ||||
246 | | ||||
247 | /** | ||||
248 | * Emitted whenever the timings of the next color temperature transition have changed. | ||||
249 | */ | ||||
250 | void scheduledTransitionTimingsChanged(); | ||||
251 | | ||||
218 | private: | 252 | private: | ||
219 | void initShortcuts(); | 253 | void initShortcuts(); | ||
220 | void readConfig(); | 254 | void readConfig(); | ||
221 | void hardReset(); | 255 | void hardReset(); | ||
222 | void slowUpdate(int targetTemp); | 256 | void slowUpdate(int targetTemp); | ||
223 | void resetAllTimers(); | 257 | void resetAllTimers(); | ||
224 | int currentTargetTemp() const; | 258 | int currentTargetTemp() const; | ||
225 | void cancelAllTimers(); | 259 | void cancelAllTimers(); | ||
226 | /** | 260 | /** | ||
227 | * Quick shift on manual change to current target Temperature | 261 | * Quick shift on manual change to current target Temperature | ||
228 | */ | 262 | */ | ||
229 | void resetQuickAdjustTimer(); | 263 | void resetQuickAdjustTimer(); | ||
230 | /** | 264 | /** | ||
231 | * Slow shift to daytime target Temperature | 265 | * Slow shift to daytime target Temperature | ||
232 | */ | 266 | */ | ||
233 | void resetSlowUpdateTimer(); | 267 | void resetSlowUpdateTimer(); | ||
234 | 268 | | |||
235 | void updateTargetTemperature(); | 269 | void updateTargetTemperature(); | ||
236 | void updateSunTimings(bool force); | 270 | void updateTransitionTimings(bool force); | ||
237 | DateTimes getSunTimings(const QDateTime &dateTime, double latitude, double longitude, bool morning) const; | 271 | DateTimes getSunTimings(const QDateTime &dateTime, double latitude, double longitude, bool morning) const; | ||
238 | bool checkAutomaticSunTimings() const; | 272 | bool checkAutomaticSunTimings() const; | ||
239 | bool daylight() const; | 273 | bool daylight() const; | ||
240 | 274 | | |||
241 | void commitGammaRamps(int temperature); | 275 | void commitGammaRamps(int temperature); | ||
242 | 276 | | |||
243 | void setEnabled(bool enabled); | 277 | void setEnabled(bool enabled); | ||
244 | void setRunning(bool running); | 278 | void setRunning(bool running); | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |