diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-09-01 10:51:39 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-09-02 12:13:41 +0200 |
commit | 5addf79903a9007cfb65ad09e46d2c47f4a2cc37 (patch) | |
tree | d6957e81250ce3d4714a54c7f77a4a1af4c7b165 /src/compositor/compositor_api/qwaylandoutput.h | |
parent | 4f86a16f0366cea103b68d2e39e86eb3bbd30734 (diff) |
Make Manufacturer & Model modifiable properties of QWaylandOutput
This to make construction look nicer and make them modifyable from QML
Change-Id: I5f5ffffb34f664914cdb531736c42a6873bfe18c
Diffstat (limited to 'src/compositor/compositor_api/qwaylandoutput.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandoutput.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compositor/compositor_api/qwaylandoutput.h b/src/compositor/compositor_api/qwaylandoutput.h index 763bfa2ed..dcf06c02b 100644 --- a/src/compositor/compositor_api/qwaylandoutput.h +++ b/src/compositor/compositor_api/qwaylandoutput.h @@ -61,8 +61,8 @@ class Q_COMPOSITOR_EXPORT QWaylandOutput : public QObject, public QWaylandExtens { Q_OBJECT Q_DECLARE_PRIVATE(QWaylandOutput) - Q_PROPERTY(QString manufacturer READ manufacturer CONSTANT) - Q_PROPERTY(QString model READ model CONSTANT) + Q_PROPERTY(QString manufacturer READ manufacturer WRITE setManufacturer NOTIFY manufacturerChanged) + Q_PROPERTY(QString model READ model WRITE setModel NOTIFY modelChanged) Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged) Q_PROPERTY(QWaylandOutput::Mode mode READ mode WRITE setMode NOTIFY modeChanged) Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged) @@ -104,8 +104,7 @@ public: int refreshRate; }; - QWaylandOutput(QWaylandOutputSpace *outputSpace, QWindow *window, - const QString &manufacturer, const QString &model); + QWaylandOutput(QWaylandOutputSpace *outputSpace, QWindow *window); ~QWaylandOutput(); static QWaylandOutput *fromResource(wl_resource *resource); @@ -119,8 +118,10 @@ public: QString manufacturer() const; + void setManufacturer(const QString &manufacturer); QString model() const; + void setModel(const QString &model); QPoint position() const; void setPosition(const QPoint &pt); @@ -179,6 +180,8 @@ Q_SIGNALS: void sizeFollowsWindowChanged(); void physicalSizeFollowsSizeChanged(); void outputSpaceChanged(); + void manufacturerChanged(); + void modelChanged(); private Q_SLOTS: void windowDestroyed(); |