Changeset View
Changeset View
Standalone View
Standalone View
libcolorcorrect/autotests/mock_kwin.h
- This file was added.
1 | /******************************************************************** | ||||
---|---|---|---|---|---|
2 | Copyright 2017 Roman Gilg <subdiff@gmail.com> | ||||
3 | | ||||
4 | This program is free software; you can redistribute it and/or modify | ||||
5 | it under the terms of the GNU General Public License as published by | ||||
6 | the Free Software Foundation; either version 2 of the License, or | ||||
7 | (at your option) any later version. | ||||
8 | | ||||
9 | This program is distributed in the hope that it will be useful, | ||||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | GNU General Public License for more details. | ||||
13 | | ||||
14 | You should have received a copy of the GNU General Public License | ||||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
16 | *********************************************************************/ | ||||
17 | #ifndef COLORCORRECT_AUTOTESTS_MOCK_KWIN_H | ||||
18 | #define COLORCORRECT_AUTOTESTS_MOCK_KWIN_H | ||||
19 | | ||||
20 | #include "../colorcorrectconstants.h" | ||||
21 | | ||||
22 | #include <QObject> | ||||
23 | #include <QVariant> | ||||
24 | #include <QTime> | ||||
25 | | ||||
26 | using namespace ColorCorrect; | ||||
27 | | ||||
28 | class kwin_dbus : public QObject | ||||
29 | { | ||||
30 | Q_OBJECT | ||||
31 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.ColorCorrect") | ||||
32 | | ||||
33 | public: | ||||
34 | kwin_dbus(); | ||||
35 | ~kwin_dbus(); | ||||
36 | | ||||
37 | bool registerDBus(); | ||||
38 | bool unregisterDBus(); | ||||
39 | | ||||
40 | bool nightColorAvailable = true; | ||||
41 | | ||||
42 | bool activeEnabled = true; | ||||
43 | bool active = true; | ||||
44 | | ||||
45 | bool modeEnabled = true; | ||||
46 | int mode = 0; | ||||
47 | | ||||
48 | bool nightTemperatureEnabled = true; | ||||
49 | int nightTemperature = DEFAULT_NIGHT_TEMPERATURE; | ||||
50 | | ||||
51 | bool running = false; | ||||
52 | int currentColorTemperature = NEUTRAL_TEMPERATURE; | ||||
53 | | ||||
54 | double latitudeAuto = 0; | ||||
55 | double longitudeAuto = 0; | ||||
56 | | ||||
57 | bool locationEnabled = true; | ||||
58 | double latitudeFixed = 0; | ||||
59 | double longitudeFixed = 0; | ||||
60 | | ||||
61 | bool timingsEnabled = true; | ||||
62 | QTime morningBeginFixed = QTime(6,0,0); | ||||
63 | QTime eveningBeginFixed = QTime(18,0,0); | ||||
64 | int transitionTime = FALLBACK_SLOW_UPDATE_TIME; | ||||
65 | | ||||
66 | bool configChangeExpectSuccess; | ||||
67 | | ||||
68 | public Q_SLOTS: | ||||
69 | QHash<QString, QVariant> nightColorInfo(); | ||||
70 | bool nightColorConfigChange(QHash<QString, QVariant> data); | ||||
71 | void nightColorAutoLocationUpdate(double latitude, double longitude); | ||||
72 | | ||||
73 | Q_SIGNALS: | ||||
74 | void nightColorConfigChangeSignal(QHash<QString, QVariant> data); | ||||
75 | | ||||
76 | private: | ||||
77 | QHash<QString, QVariant> getData(); | ||||
78 | }; | ||||
79 | | ||||
80 | #endif //COLORCORRECT_AUTOTESTS_MOCK_KWIN_H |