diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-10-31 08:42:58 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-11-30 12:47:16 +0100 |
commit | 17c76f2e8df43cf40e629bdde170ce2392e5be92 (patch) | |
tree | 0b9b5b8af8764281d6b7a848ccb560a95acd180d /src/plugins/platforms/wayland/qwaylanddnd.h | |
parent | 33d06a071c72998241654952322a58ce888a1f16 (diff) |
Added data objects
ie. new clipboard and dnd protocol
Change-Id: I0ebdc6dc2972b6cb1dc882cd6b6f4ddde2621186
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddnd.h')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylanddnd.h | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddnd.h b/src/plugins/platforms/wayland/qwaylanddnd.h index ebafd960e..b5f922519 100644 --- a/src/plugins/platforms/wayland/qwaylanddnd.h +++ b/src/plugins/platforms/wayland/qwaylanddnd.h @@ -46,41 +46,24 @@ #include <QtCore/QMimeData> #include "qwaylanddisplay.h" -class QWaylandDragWrapper; -class QWaylandDragOfferWrapper; -class QSocketNotifier; - -class QWaylandDrag : public QObject, public QPlatformDrag +class QWaylandDrag : public QPlatformDrag { - Q_OBJECT - public: - static QWaylandDrag *instance(QWaylandDisplay *display); + QWaylandDrag(QWaylandDisplay *display); ~QWaylandDrag(); - void createDragOffer(uint32_t id); QMimeData *platformDropData(); - void startDrag(); - void move(const QMouseEvent *) { } - void drop(const QMouseEvent *) { } - void cancel() { } -private slots: - void pipeReadable(int fd); + void startDrag(QDrag *drag); + void move(const QMouseEvent *me); + bool canDrop() const; + void drop(const QMouseEvent *me); + void cancel(); -private: - QWaylandDrag(QWaylandDisplay *display); + virtual Qt::DropAction executedDropAction() const; - QWaylandDisplay *mDisplay; - QMimeData *mDropData; - QWaylandDragWrapper *mCurrentDrag; - QWaylandDragOfferWrapper *mCurrentOffer; - int mPipeWriteEnd; - QSocketNotifier *mPipeWatcher; - QByteArray mPipeData; - QString mMimeFormat; - friend class QWaylandDragWrapper; - friend class QWaylandDragOfferWrapper; +private: + QWaylandDisplay *m_display; }; #endif // QWAYLANDDND_H |