Changeset View
Changeset View
Standalone View
Standalone View
colorcorrection/manager.h
Show All 36 Lines | |||||
37 | namespace ColorCorrect | 37 | namespace ColorCorrect | ||
38 | { | 38 | { | ||
39 | 39 | | |||
40 | typedef QPair<QDateTime,QDateTime> DateTimes; | 40 | typedef QPair<QDateTime,QDateTime> DateTimes; | ||
41 | typedef QPair<QTime,QTime> Times; | 41 | typedef QPair<QTime,QTime> Times; | ||
42 | 42 | | |||
43 | class ColorCorrectDBusInterface; | 43 | class ColorCorrectDBusInterface; | ||
44 | 44 | | |||
45 | 45 | /** | |||
46 | * This enum type is used to specify operation mode of the night color manager. | ||||
47 | **/ | ||||
46 | enum NightColorMode { | 48 | enum NightColorMode { | ||
47 | // timings are based on provided location data | 49 | /** | ||
48 | Automatic = 0, | 50 | * Color temperature is computed based on the current position of the Sun. | ||
49 | // timings are based on fixed location data | 51 | * | ||
52 | * Location of the user is provided by Plasma. | ||||
53 | **/ | ||||
54 | Automatic, | ||||
55 | /** | ||||
56 | * Color temperature is computed based on the current position of the Sun. | ||||
57 | * | ||||
58 | * Location of the user is provided by themselves. | ||||
59 | **/ | ||||
50 | Location, | 60 | Location, | ||
51 | // fixed timings | 61 | /** | ||
52 | Timings | 62 | * Color temperature is computed based on the current time. | ||
63 | * | ||||
64 | * Sunrise and sunset times have to be specified by the user. | ||||
65 | **/ | ||||
66 | Timings, | ||||
67 | /** | ||||
68 | * Color temperature is constant thoughout the day. | ||||
69 | **/ | ||||
70 | Constant, | ||||
53 | }; | 71 | }; | ||
54 | 72 | | |||
73 | /** | ||||
74 | * The night color manager is a blue light filter similar to Redshift. | ||||
75 | * | ||||
76 | * There are four modes this manager can operate in: Automatic, Location, Timings, | ||||
77 | * and Constant. Both Automatic and Location modes derive screen color temperature | ||||
78 | * from the current position of the Sun, the only difference between two is how | ||||
79 | * coordinates of the user are specified. If the user is located near the North or | ||||
80 | * South pole, we can't compute correct position of the Sun, that's why we need | ||||
81 | * Timings and Constant mode. | ||||
82 | * | ||||
83 | * With the Timings mode, screen color temperature is computed based on the clock | ||||
84 | * time. The user needs to specify timings of the sunset and sunrise as well the | ||||
85 | * transition time. | ||||
86 | * | ||||
87 | * With the Constant mode, screen color temperature is always constant. | ||||
88 | **/ | ||||
55 | class KWIN_EXPORT Manager : public QObject | 89 | class KWIN_EXPORT Manager : public QObject | ||
56 | { | 90 | { | ||
57 | Q_OBJECT | 91 | Q_OBJECT | ||
58 | 92 | | |||
59 | public: | 93 | public: | ||
60 | Manager(QObject *parent); | 94 | Manager(QObject *parent); | ||
61 | void init(); | 95 | void init(); | ||
62 | 96 | | |||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |