Changeset View
Changeset View
Standalone View
Standalone View
kcm/config_handler.h
Show All 38 Lines | 30 | public: | |||
---|---|---|---|---|---|
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 | void revert() { | ||||
48 | m_config = m_previousConfig->clone(); | ||||
49 | } | ||||
50 | | ||||
47 | int retention() const; | 51 | int retention() const; | ||
48 | void setRetention(int retention); | 52 | void setRetention(int retention); | ||
49 | 53 | | |||
50 | void writeControl(); | 54 | void writeControl(); | ||
51 | 55 | | |||
52 | void checkNeedsSave(); | 56 | void checkNeedsSave(); | ||
53 | 57 | | |||
54 | Q_SIGNALS: | 58 | Q_SIGNALS: | ||
Show All 9 Lines | 66 | private: | |||
64 | QSize screenSize() const; | 68 | QSize screenSize() const; | ||
65 | Control::OutputRetention getRetention() const; | 69 | Control::OutputRetention getRetention() const; | ||
66 | void primaryOutputSelected(int index); | 70 | void primaryOutputSelected(int index); | ||
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; | ||
76 | KScreen::ConfigPtr m_previousConfig = nullptr; | ||||
72 | OutputModel *m_outputs = nullptr; | 77 | OutputModel *m_outputs = nullptr; | ||
73 | 78 | | |||
74 | std::unique_ptr<ControlConfig> m_control; | 79 | std::unique_ptr<ControlConfig> m_control; | ||
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 | }; |