Changeset View
Changeset View
Standalone View
Standalone View
src/config.h
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 52 | public: | |||
---|---|---|---|---|---|
62 | * @since 5.7 | 62 | * @since 5.7 | ||
63 | */ | 63 | */ | ||
64 | enum class Feature { | 64 | enum class Feature { | ||
65 | None = 0, ///< None of the mentioned features are supported. | 65 | None = 0, ///< None of the mentioned features are supported. | ||
66 | PrimaryDisplay = 1, ///< The backend knows about the concept of a primary display, this is mostly limited to X11. | 66 | PrimaryDisplay = 1, ///< The backend knows about the concept of a primary display, this is mostly limited to X11. | ||
67 | Writable = 1 << 1, ///< The backend supports setting the config, it's not read-only. | 67 | Writable = 1 << 1, ///< The backend supports setting the config, it's not read-only. | ||
68 | PerOutputScaling = 1 << 2, ///< The backend supports scaling each output individually. | 68 | PerOutputScaling = 1 << 2, ///< The backend supports scaling each output individually. | ||
69 | OutputReplication = 1 << 3, ///< The backend supports replication of outputs. | 69 | OutputReplication = 1 << 3, ///< The backend supports replication of outputs. | ||
70 | AutoRotation = 1 << 4, ///< The backend supports automatic rotation of outputs. | ||||
71 | TabletMode = 1 << 5, ///< The backend supports querying if a device is in tablet mode. | ||||
70 | }; | 72 | }; | ||
71 | Q_DECLARE_FLAGS(Features, Feature) | 73 | Q_DECLARE_FLAGS(Features, Feature) | ||
72 | 74 | | |||
73 | /** | 75 | /** | ||
74 | * Validates that a config can be applied in the current system | 76 | * Validates that a config can be applied in the current system | ||
75 | * | 77 | * | ||
76 | * Each system has different constrains, this method will test | 78 | * Each system has different constrains, this method will test | ||
77 | * the given config with those constrains to see if it | 79 | * the given config with those constrains to see if it | ||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | |||||
160 | /** Sets the features supported by this backend. This should not be called by the | 162 | /** Sets the features supported by this backend. This should not be called by the | ||
161 | * user, but by the backend. | 163 | * user, but by the backend. | ||
162 | * | 164 | * | ||
163 | * @see supportedFeatures | 165 | * @see supportedFeatures | ||
164 | * @since 5.7 | 166 | * @since 5.7 | ||
165 | */ | 167 | */ | ||
166 | void setSupportedFeatures(const Features &features); | 168 | void setSupportedFeatures(const Features &features); | ||
167 | 169 | | |||
170 | /** | ||||
171 | * Indicates that the device supports switching between a default and a tablet mode. This is | ||||
172 | * common for convertibles. | ||||
173 | * | ||||
174 | * @return true when tablet mode is available, otherwise false | ||||
175 | * @see setTabletModeAvailable | ||||
176 | * @since 5.18 | ||||
177 | */ | ||||
178 | bool tabletModeAvailable() const; | ||||
179 | | ||||
180 | /** Sets if the device supports a tablet mode. This should not be called by the | ||||
181 | * user, but by the backend. | ||||
182 | * | ||||
183 | * @see tabletModeAvailable | ||||
184 | * @since 5.18 | ||||
185 | */ | ||||
186 | void setTabletModeAvailable(bool available); | ||||
187 | | ||||
188 | /** | ||||
189 | * Indicates that the device is currently in tablet mode. | ||||
190 | * | ||||
191 | * @return true when in tablet mode, otherwise false | ||||
192 | * @see setTabletModeEngaged | ||||
193 | * @since 5.18 | ||||
194 | */ | ||||
195 | bool tabletModeEngaged() const; | ||||
196 | | ||||
197 | /** | ||||
198 | * Sets if the device is currently in tablet mode. This should not be called by the | ||||
199 | * user, but by the backend. | ||||
200 | * | ||||
201 | * @see tabletModeEngaged | ||||
202 | * @since 5.18 | ||||
203 | */ | ||||
204 | void setTabletModeEngaged(bool engaged); | ||||
205 | | ||||
168 | Q_SIGNALS: | 206 | Q_SIGNALS: | ||
169 | void outputAdded(const KScreen::OutputPtr &output); | 207 | void outputAdded(const KScreen::OutputPtr &output); | ||
170 | void outputRemoved(int outputId); | 208 | void outputRemoved(int outputId); | ||
171 | void primaryOutputChanged(const KScreen::OutputPtr &output); | 209 | void primaryOutputChanged(const KScreen::OutputPtr &output); | ||
172 | 210 | | |||
173 | private: | 211 | private: | ||
174 | Q_DISABLE_COPY(Config) | 212 | Q_DISABLE_COPY(Config) | ||
175 | 213 | | |||
Show All 13 Lines |