| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef QWAYLANDDND_H |
| 6 |
#define QWAYLANDDND_H |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#include <qpa/qplatformdrag.h> |
| 20 |
#include <QtGui/private/qsimpledrag_p.h> |
| 21 |
|
| 22 |
#include <QtGui/QDrag> |
| 23 |
#include <QtCore/QMimeData> |
| 24 |
|
| 25 |
#include <QtWaylandClient/qtwaylandclientglobal.h> |
| 26 |
|
| 27 |
QT_BEGIN_NAMESPACE |
| 28 |
|
| 29 |
namespace QtWaylandClient { |
| 30 |
|
| 31 |
class QWaylandDisplay; |
| 32 |
#if QT_CONFIG(draganddrop) |
| 33 |
class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag |
| 34 |
{ |
| 35 |
public: |
| 36 |
QWaylandDrag(QWaylandDisplay *display); |
| 37 |
~QWaylandDrag() override; |
| 38 |
|
| 39 |
void updateTarget(const QString &mimeType); |
| 40 |
void setResponse(const QPlatformDragQtResponse &response); |
| 41 |
void finishDrag(const QPlatformDropQtResponse &response); |
| 42 |
|
| 43 |
protected: |
| 44 |
void startDrag() override; |
| 45 |
void cancel() override; |
| 46 |
void move(const QPoint &globalPos) override; |
| 47 |
void drop(const QPoint &globalPos) override; |
| 48 |
void endDrag() override; |
| 49 |
|
| 50 |
|
| 51 |
private: |
| 52 |
QWaylandDisplay *m_display = nullptr; |
| 53 |
}; |
| 54 |
#endif |
| 55 |
} |
| 56 |
|
| 57 |
QT_END_NAMESPACE |
| 58 |
|
| 59 |
#endif |