Changeset View
Changeset View
Standalone View
Standalone View
common/globals.h
- This file was moved from kded/control.h.
1 | /******************************************************************** | 1 | /******************************************************************** | ||
---|---|---|---|---|---|
2 | Copyright 2019 Roman Gilg <subdiff@gmail.com> | 2 | Copyright 2018 Roman Gilg <subdiff@gmail.com> | ||
3 | 3 | | |||
4 | This program is free software; you can redistribute it and/or modify | 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 | 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 | 6 | the Free Software Foundation; either version 2 of the License, or | ||
7 | (at your option) any later version. | 7 | (at your option) any later version. | ||
8 | 8 | | |||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. | ||
13 | 13 | | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | *********************************************************************/ | 16 | *********************************************************************/ | ||
17 | #ifndef KDED_CONTROL_H | 17 | #ifndef COMMON_GLOBALS_H | ||
18 | #define KDED_CONTROL_H | 18 | #define COMMON_GLOBALS_H | ||
19 | 19 | | |||
20 | #include <kscreen/types.h> | 20 | #include <QString> | ||
21 | 21 | | |||
22 | #include <QVariantMap> | 22 | class Globals | ||
23 | | ||||
24 | class Control | | |||
25 | { | 23 | { | ||
26 | public: | 24 | public: | ||
27 | enum class OutputRetention { | 25 | static void setDirPath(const QString &path); | ||
28 | Undefined = -1, | | |||
29 | Global = 0, | | |||
30 | Individual = 1, | | |||
31 | }; | | |||
32 | | ||||
33 | static QMap<QString, OutputRetention> readInOutputRetentionValues(const QString &configId); | | |||
34 | static OutputRetention getOutputRetention(const QString &outputId, const QMap<QString, OutputRetention> &retentions); | | |||
35 | | ||||
36 | static QString configFilePath(const QString &hash); | | |||
37 | static QString outputFilePath(const QString &hash); | | |||
38 | | ||||
39 | private: | | |||
40 | static QString dirPath(); | 26 | static QString dirPath(); | ||
41 | static OutputRetention convertVariantToOutputRetention(QVariant variant); | | |||
42 | 27 | | |||
43 | static QString s_dirName; | 28 | private: | ||
29 | static QString s_dirPath; | ||||
44 | }; | 30 | }; | ||
45 | 31 | | |||
46 | #endif | 32 | #endif |