Changeset View
Changeset View
Standalone View
Standalone View
kded/config.h
Show All 11 Lines | |||||
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_CONFIG_H | 17 | #ifndef KDED_CONFIG_H | ||
18 | #define KDED_CONFIG_H | 18 | #define KDED_CONFIG_H | ||
19 | 19 | | |||
20 | | ||||
21 | #include <kscreen/config.h> | 20 | #include <kscreen/config.h> | ||
22 | 21 | | |||
22 | #include <QOrientationReading> | ||||
23 | | ||||
23 | #include <memory> | 24 | #include <memory> | ||
24 | 25 | | |||
25 | class ControlConfig; | 26 | class ControlConfig; | ||
26 | 27 | | |||
27 | class Config : public QObject | 28 | class Config : public QObject | ||
28 | { | 29 | { | ||
29 | Q_OBJECT | 30 | Q_OBJECT | ||
30 | public: | 31 | public: | ||
31 | explicit Config(KScreen::ConfigPtr config, QObject *parent = nullptr); | 32 | explicit Config(KScreen::ConfigPtr config, QObject *parent = nullptr); | ||
32 | ~Config() = default; | 33 | ~Config() = default; | ||
33 | 34 | | |||
34 | QString id() const; | 35 | QString id() const; | ||
35 | 36 | | |||
36 | bool fileExists() const; | 37 | bool fileExists() const; | ||
37 | std::unique_ptr<Config> readFile(); | 38 | std::unique_ptr<Config> readFile(); | ||
38 | std::unique_ptr<Config> readOpenLidFile(); | 39 | std::unique_ptr<Config> readOpenLidFile(); | ||
39 | bool writeFile(); | 40 | bool writeFile(); | ||
40 | bool writeOpenLidFile(); | 41 | bool writeOpenLidFile(); | ||
41 | 42 | | |||
42 | KScreen::ConfigPtr data() const { | 43 | KScreen::ConfigPtr data() const { | ||
43 | return m_data; | 44 | return m_data; | ||
44 | } | 45 | } | ||
45 | 46 | | |||
46 | void activateControlWatching(); | 47 | void activateControlWatching(); | ||
48 | bool autoRotationRequested() const; | ||||
49 | void setDeviceOrientation(QOrientationReading::Orientation orientation); | ||||
47 | void log(); | 50 | void log(); | ||
48 | 51 | | |||
49 | void setValidityFlags(KScreen::Config::ValidityFlags flags) { | 52 | void setValidityFlags(KScreen::Config::ValidityFlags flags) { | ||
50 | m_validityFlags = flags; | 53 | m_validityFlags = flags; | ||
51 | } | 54 | } | ||
52 | 55 | | |||
53 | bool canBeApplied() const; | 56 | bool canBeApplied() const; | ||
54 | 57 | | |||
Show All 23 Lines |