diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-12-14 15:46:11 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2016-04-20 13:13:50 +0000 |
commit | 5cfdd57ddaac7ea1c1fc1189fb03aa716d3ed128 (patch) | |
tree | a8f30864e62d84f090b408910941bb9f32e7498b /src/compositor/compositor_api/qwaylandquickitem.h | |
parent | 33e89749bcf88932e7c3dd515ffcc4da911a765d (diff) |
QML API for subsurfaces
Task-number: QTBUG-49809
Change-Id: I433fd5ee4d920e6fc6696627b45738631ab329c4
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandquickitem.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.h b/src/compositor/compositor_api/qwaylandquickitem.h index 9dab65acf..20b28b5f0 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.h +++ b/src/compositor/compositor_api/qwaylandquickitem.h @@ -67,7 +67,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickItem : public QQuickItem Q_PROPERTY(bool inputEventsEnabled READ inputEventsEnabled WRITE setInputEventsEnabled NOTIFY inputEventsEnabledChanged) Q_PROPERTY(bool focusOnClick READ focusOnClick WRITE setFocusOnClick NOTIFY focusOnClickChanged) Q_PROPERTY(bool sizeFollowsSurface READ sizeFollowsSurface WRITE setSizeFollowsSurface NOTIFY sizeFollowsSurfaceChanged) - + Q_PROPERTY(QObject *subsurfaceHandler READ subsurfaceHandler WRITE setSubsurfaceHandler NOTIFY subsurfaceHandlerChanged) public: QWaylandQuickItem(QQuickItem *parent = 0); ~QWaylandQuickItem(); @@ -104,6 +104,9 @@ public: Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; #endif + QObject *subsurfaceHandler() const; + void setSubsurfaceHandler(QObject*); + protected: void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; @@ -138,6 +141,8 @@ private Q_SLOTS: void updateBuffer(bool hasBuffer); void updateWindow(); void beforeSync(); + void handleSubsurfaceAdded(QWaylandSurface *childSurface); + void handleSubsurfacePosition(const QPoint &pos); #ifndef QT_NO_IM void updateInputMethod(Qt::InputMethodQueries queries); #endif @@ -152,7 +157,7 @@ Q_SIGNALS: void mouseMove(const QPointF &windowPosition); void mouseRelease(); void sizeFollowsSurfaceChanged(); - + void subsurfaceHandlerChanged(); protected: QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE; |