Changeset View
Changeset View
Standalone View
Standalone View
src/output.h
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 42 | public: | |||
---|---|---|---|---|---|
51 | Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY sizeChanged) | 51 | Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY sizeChanged) | ||
52 | Q_PROPERTY(Rotation rotation READ rotation WRITE setRotation NOTIFY rotationChanged) | 52 | Q_PROPERTY(Rotation rotation READ rotation WRITE setRotation NOTIFY rotationChanged) | ||
53 | Q_PROPERTY(QString currentModeId READ currentModeId WRITE setCurrentModeId NOTIFY currentModeIdChanged) | 53 | Q_PROPERTY(QString currentModeId READ currentModeId WRITE setCurrentModeId NOTIFY currentModeIdChanged) | ||
54 | Q_PROPERTY(QString preferredModeId READ preferredModeId CONSTANT) | 54 | Q_PROPERTY(QString preferredModeId READ preferredModeId CONSTANT) | ||
55 | Q_PROPERTY(bool connected READ isConnected WRITE setConnected NOTIFY isConnectedChanged) | 55 | Q_PROPERTY(bool connected READ isConnected WRITE setConnected NOTIFY isConnectedChanged) | ||
56 | Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY isEnabledChanged) | 56 | Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY isEnabledChanged) | ||
57 | Q_PROPERTY(bool primary READ isPrimary WRITE setPrimary NOTIFY isPrimaryChanged) | 57 | Q_PROPERTY(bool primary READ isPrimary WRITE setPrimary NOTIFY isPrimaryChanged) | ||
58 | Q_PROPERTY(QList<int> clones READ clones WRITE setClones NOTIFY clonesChanged) | 58 | Q_PROPERTY(QList<int> clones READ clones WRITE setClones NOTIFY clonesChanged) | ||
59 | Q_PROPERTY(int replicationSource READ replicationSource | ||||
60 | WRITE setReplicationSource NOTIFY replicationSourceChanged) | ||||
59 | Q_PROPERTY(KScreen::Edid* edid READ edid CONSTANT) | 61 | Q_PROPERTY(KScreen::Edid* edid READ edid CONSTANT) | ||
60 | Q_PROPERTY(QSize sizeMm READ sizeMm CONSTANT) | 62 | Q_PROPERTY(QSize sizeMm READ sizeMm CONSTANT) | ||
61 | Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) | 63 | Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) | ||
62 | Q_PROPERTY(bool followPreferredMode READ followPreferredMode WRITE setFollowPreferredMode NOTIFY followPreferredModeChanged) | 64 | Q_PROPERTY(bool followPreferredMode READ followPreferredMode WRITE setFollowPreferredMode NOTIFY followPreferredModeChanged) | ||
63 | 65 | | |||
64 | 66 | | |||
65 | enum Type { | 67 | enum Type { | ||
66 | Unknown, | 68 | Unknown, | ||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | |||||
185 | void setConnected(bool connected); | 187 | void setConnected(bool connected); | ||
186 | 188 | | |||
187 | bool isEnabled() const; | 189 | bool isEnabled() const; | ||
188 | void setEnabled(bool enabled); | 190 | void setEnabled(bool enabled); | ||
189 | 191 | | |||
190 | bool isPrimary() const; | 192 | bool isPrimary() const; | ||
191 | void setPrimary(bool primary); | 193 | void setPrimary(bool primary); | ||
192 | 194 | | |||
195 | /** | ||||
196 | * @brief Immutable clones because of hardware restrictions | ||||
197 | * | ||||
198 | * Clones are set symmetcally on all outputs. The list contains ids | ||||
199 | * for all other outputs being clones of this output. | ||||
200 | * | ||||
201 | * @return List of output ids being clones of each other. | ||||
202 | */ | ||||
193 | QList<int> clones() const; | 203 | QList<int> clones() const; | ||
davidedmundson: Is this effectively deprecated with your changes?
The KCM rewrite drops use of it. | |||||
No, from my understanding of the backend code and the KCM code it was just handled incorrectly in the past. So before using it in some way again I need to find put how it should work correctly in detail. romangg: No, from my understanding of the backend code and the KCM code it was just handled incorrectly… | |||||
204 | /** | ||||
205 | * @brief Set the clones list. | ||||
206 | * | ||||
207 | * When this output is part of a configuration this call is followed by | ||||
208 | * similar calls on other outputs making the lists in all outputs | ||||
209 | * symmetric. | ||||
210 | * @param outputlist | ||||
211 | */ | ||||
194 | void setClones(const QList<int> &outputlist); | 212 | void setClones(const QList<int> &outputlist); | ||
195 | 213 | | |||
214 | /** | ||||
215 | * @brief Provides the source for an ongoing replication | ||||
216 | * | ||||
217 | * If the returned output id is non-null this output is a replica of the | ||||
218 | * returned output. If null is returned the output is no replica of any | ||||
219 | * other output. | ||||
220 | * | ||||
221 | * @return Replication source output id of this output | ||||
222 | */ | ||||
223 | int replicationSource() const; | ||||
224 | /** | ||||
225 | * @brief Set the replication source. | ||||
226 | * @param source | ||||
227 | */ | ||||
228 | void setReplicationSource(int source); | ||||
229 | | ||||
196 | void setEdid(const QByteArray &rawData); | 230 | void setEdid(const QByteArray &rawData); | ||
197 | 231 | | |||
198 | /** | 232 | /** | ||
199 | * edid returns the output's EDID information if available. | 233 | * edid returns the output's EDID information if available. | ||
200 | * | 234 | * | ||
201 | * The output maintains ownership of the returned Edid, so the caller should not delete it. | 235 | * The output maintains ownership of the returned Edid, so the caller should not delete it. | ||
202 | * Note that the edid is only valid as long as the output is alive. | 236 | * Note that the edid is only valid as long as the output is alive. | ||
203 | */ | 237 | */ | ||
204 | Edid* edid() const; | 238 | Edid* edid() const; | ||
205 | 239 | | |||
206 | /** | 240 | /** | ||
207 | * Returns the physical size of the screen in milimeters. | 241 | * Returns the physical size of the screen in milimeters. | ||
208 | * | 242 | * | ||
209 | * @note Some broken GPUs or monitors return the size in centimeters instead | 243 | * @note Some broken GPUs or monitors return the size in centimeters instead | ||
210 | * of millimeters. KScreen at the moment is not sanitizing the values. | 244 | * of millimeters. KScreen at the moment is not sanitizing the values. | ||
211 | */ | 245 | */ | ||
212 | QSize sizeMm() const; | 246 | QSize sizeMm() const; | ||
213 | void setSizeMm(const QSize &size); | 247 | void setSizeMm(const QSize &size); | ||
214 | 248 | | |||
215 | /** | 249 | /** | ||
250 | * Returns if the output needs to be taken account for in the overall compositor/screen | ||||
251 | * space and if it should be depicted on its own in a graphical view for repositioning. | ||||
252 | * | ||||
253 | * @return true if the output is positionable in compositor/screen space. | ||||
254 | * | ||||
255 | * @since 5.17 | ||||
256 | */ | ||||
257 | bool isPositionable() const; | ||||
258 | | ||||
259 | /** | ||||
216 | * Returns a rectangle containing the currently set output position and | 260 | * Returns a rectangle containing the currently set output position and | ||
217 | * size. | 261 | * size. | ||
218 | * | 262 | * | ||
219 | * The geometry also reflects current orientation (i.e. if current mode | 263 | * The geometry also reflects current orientation (i.e. if current mode | ||
220 | * is 1920x1080 and orientation is @p KScreen::Output::Left, then the | 264 | * is 1920x1080 and orientation is @p KScreen::Output::Left, then the | ||
221 | * size of the returned rectangle will be 1080x1920. | 265 | * size of the returned rectangle will be 1080x1920. | ||
222 | * | 266 | * | ||
223 | * This property contains the current settings stored in the particular | 267 | * This property contains the current settings stored in the particular | ||
Show All 40 Lines | 306 | Q_SIGNALS: | |||
264 | void posChanged(); | 308 | void posChanged(); | ||
265 | void sizeChanged(); | 309 | void sizeChanged(); | ||
266 | void currentModeIdChanged(); | 310 | void currentModeIdChanged(); | ||
267 | void rotationChanged(); | 311 | void rotationChanged(); | ||
268 | void isConnectedChanged(); | 312 | void isConnectedChanged(); | ||
269 | void isEnabledChanged(); | 313 | void isEnabledChanged(); | ||
270 | void isPrimaryChanged(); | 314 | void isPrimaryChanged(); | ||
271 | void clonesChanged(); | 315 | void clonesChanged(); | ||
316 | void replicationSourceChanged(); | ||||
272 | void scaleChanged(); | 317 | void scaleChanged(); | ||
273 | void followPreferredModeChanged(bool followPreferredMode); | 318 | void followPreferredModeChanged(bool followPreferredMode); | ||
274 | 319 | | |||
275 | /** The mode list changed. | 320 | /** The mode list changed. | ||
276 | * | 321 | * | ||
277 | * This may happen when a mode is added or changed. | 322 | * This may happen when a mode is added or changed. | ||
278 | * | 323 | * | ||
279 | * @since 5.8.3 | 324 | * @since 5.8.3 | ||
Show All 21 Lines |
Is this effectively deprecated with your changes?
The KCM rewrite drops use of it.