Changeset View
Changeset View
Standalone View
Standalone View
kded/config.h
Show All 25 Lines | |||||
26 | 26 | | |||
27 | class Config | 27 | class Config | ||
28 | { | 28 | { | ||
29 | public: | 29 | public: | ||
30 | explicit Config(KScreen::ConfigPtr config); | 30 | explicit Config(KScreen::ConfigPtr config); | ||
31 | ~Config() = default; | 31 | ~Config() = default; | ||
32 | 32 | | |||
33 | static void setDirPath(const QString &path); | 33 | static void setDirPath(const QString &path); | ||
34 | static QString dirPath() { | ||||
35 | return s_dirPath; | ||||
36 | } | ||||
34 | 37 | | |||
35 | QString id() const; | 38 | QString id() const; | ||
36 | 39 | | |||
37 | bool fileExists() const; | 40 | bool fileExists() const; | ||
38 | std::unique_ptr<Config> readFile(); | 41 | std::unique_ptr<Config> readFile(); | ||
39 | std::unique_ptr<Config> readOpenLidFile(); | 42 | std::unique_ptr<Config> readOpenLidFile(); | ||
40 | bool writeFile(); | 43 | bool writeFile(); | ||
41 | bool writeOpenLidFile(); | 44 | bool writeOpenLidFile(); | ||
Show All 14 Lines | 58 | private: | |||
56 | friend class TestConfig; | 59 | friend class TestConfig; | ||
57 | 60 | | |||
58 | QString filePath(); | 61 | QString filePath(); | ||
59 | std::unique_ptr<Config> readFile(const QString &fileName); | 62 | std::unique_ptr<Config> readFile(const QString &fileName); | ||
60 | bool writeFile(const QString &filePath); | 63 | bool writeFile(const QString &filePath); | ||
61 | 64 | | |||
62 | bool canBeApplied(KScreen::ConfigPtr config) const; | 65 | bool canBeApplied(KScreen::ConfigPtr config) const; | ||
63 | 66 | | |||
64 | // this could probably be done on m_data | | |||
65 | KScreen::OutputPtr findOutput(const KScreen::ConfigPtr &config, const QVariantMap &info); | | |||
66 | | ||||
67 | KScreen::ConfigPtr m_data; | 67 | KScreen::ConfigPtr m_data; | ||
68 | | ||||
69 | KScreen::Config::ValidityFlags m_validityFlags; | 68 | KScreen::Config::ValidityFlags m_validityFlags; | ||
70 | 69 | | |||
71 | static QString s_dirPath; | 70 | static QString s_dirPath; | ||
72 | static QString s_configsDirName; | 71 | static QString s_configsDirName; | ||
73 | static QString s_fixedConfigFileName; | 72 | static QString s_fixedConfigFileName; | ||
74 | 73 | | |||
75 | static QString configsDirPath(); | 74 | static QString configsDirPath(); | ||
76 | }; | 75 | }; | ||
77 | 76 | | |||
78 | #endif | 77 | #endif |