diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-09-16 12:37:04 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-09-17 12:59:32 +0000 |
commit | dca52a541eaf61269c8e746555380a7aef942b1e (patch) | |
tree | a19d253ad35f0e00ea77afa799fbf0483d96aa10 /src/compositor/compositor_api/qwaylanddrag.h | |
parent | 69194916afd652d0282b23b0db06059fe30fd2ae (diff) |
New API for drag and drop
Let the compositor implementation keep all the GUI state.
Change-Id: I73a865fa3407340276d6765e10378b8e23a76fe2
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylanddrag.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylanddrag.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/compositor/compositor_api/qwaylanddrag.h b/src/compositor/compositor_api/qwaylanddrag.h index 4903c3544..e7fcaad8e 100644 --- a/src/compositor/compositor_api/qwaylanddrag.h +++ b/src/compositor/compositor_api/qwaylanddrag.h @@ -49,25 +49,36 @@ class QWaylandSurface; class QWaylandView; class QWaylandInputDevice; +namespace QtWayland { + class DataDevice; +} + class Q_COMPOSITOR_EXPORT QWaylandDrag : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QWaylandDrag) Q_PROPERTY(QWaylandSurface *icon READ icon NOTIFY iconChanged) - Q_PROPERTY(QPointF position READ position NOTIFY positionChanged) Q_PROPERTY(bool visible READ visible NOTIFY iconChanged) public: explicit QWaylandDrag(QWaylandInputDevice *inputDevice); QWaylandSurface *icon() const; - QPointF position() const; + // QPointF position() const; bool visible() const; +public Q_SLOTS: + void dragMove(QWaylandSurface *target, const QPointF &pos); + void drop(); + void cancelDrag(); + Q_SIGNALS: void iconChanged(); - void positionChanged(); + void dragStarted(); // QWaylandSurface *icon???? + +private: + //friend class QtWayland::DataDevice; }; QT_END_NAMESPACE |