Changeset View
Changeset View
Standalone View
Standalone View
kcm/config_handler.h
Show All 26 Lines | |||||
27 | class ConfigHandler : public QObject | 27 | class ConfigHandler : public QObject | ||
28 | { | 28 | { | ||
29 | Q_OBJECT | 29 | Q_OBJECT | ||
30 | public: | 30 | public: | ||
31 | explicit ConfigHandler (QObject *parent = nullptr); | 31 | explicit ConfigHandler (QObject *parent = nullptr); | ||
32 | ~ConfigHandler() override = default; | 32 | ~ConfigHandler() override = default; | ||
33 | 33 | | |||
34 | void setConfig(KScreen::ConfigPtr config); | 34 | void setConfig(KScreen::ConfigPtr config); | ||
35 | void updateInitialConfig(); | 35 | void updateInitialData(); | ||
36 | 36 | | |||
37 | OutputModel* outputModel() const { | 37 | OutputModel* outputModel() const { | ||
38 | return m_outputs; | 38 | return m_outputs; | ||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | QSize normalizeScreen(); | 41 | QSize normalizeScreen(); | ||
42 | 42 | | |||
43 | KScreen::ConfigPtr config() const { | 43 | KScreen::ConfigPtr config() const { | ||
44 | return m_config; | 44 | return m_config; | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | int retention() const; | 47 | int retention() const; | ||
48 | void setRetention(int retention); | 48 | void setRetention(int retention); | ||
49 | 49 | | |||
50 | | ||||
51 | bool autoRotate(const KScreen::OutputPtr &output) const; | ||||
52 | void setAutoRotate(KScreen::OutputPtr &output, bool autoRotate); | ||||
53 | | ||||
50 | void writeControl(); | 54 | void writeControl(); | ||
51 | 55 | | |||
52 | void checkNeedsSave(); | 56 | void checkNeedsSave(); | ||
53 | 57 | | |||
54 | Q_SIGNALS: | 58 | Q_SIGNALS: | ||
55 | void outputModelChanged(); | 59 | void outputModelChanged(); | ||
56 | void changed(); | 60 | void changed(); | ||
57 | void screenNormalizationUpdate(bool normalized); | 61 | void screenNormalizationUpdate(bool normalized); | ||
Show All 9 Lines | 66 | private: | |||
67 | void primaryOutputChanged(const KScreen::OutputPtr &output); | 71 | void primaryOutputChanged(const KScreen::OutputPtr &output); | ||
68 | void initOutput(const KScreen::OutputPtr &output); | 72 | void initOutput(const KScreen::OutputPtr &output); | ||
69 | 73 | | |||
70 | KScreen::ConfigPtr m_config = nullptr; | 74 | KScreen::ConfigPtr m_config = nullptr; | ||
71 | KScreen::ConfigPtr m_initialConfig; | 75 | KScreen::ConfigPtr m_initialConfig; | ||
72 | OutputModel *m_outputs = nullptr; | 76 | OutputModel *m_outputs = nullptr; | ||
73 | 77 | | |||
74 | std::unique_ptr<ControlConfig> m_control; | 78 | std::unique_ptr<ControlConfig> m_control; | ||
79 | std::unique_ptr<ControlConfig> m_initialControl; | ||||
75 | Control::OutputRetention m_initialRetention = Control::OutputRetention:: | 80 | Control::OutputRetention m_initialRetention = Control::OutputRetention:: | ||
76 | Undefined; | 81 | Undefined; | ||
77 | QSize m_lastNormalizedScreenSize; | 82 | QSize m_lastNormalizedScreenSize; | ||
78 | }; | 83 | }; |