Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylanddnd_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDDND_H
5#define QWAYLANDDND_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatformdrag.h>
19#include <QtGui/private/qsimpledrag_p.h>
20
21#include <QtGui/QDrag>
22#include <QtCore/QMimeData>
23
24#include <QtWaylandClient/qtwaylandclientglobal.h>
25
27
28namespace QtWaylandClient {
29
30class QWaylandDisplay;
31#if QT_CONFIG(draganddrop)
32class Q_WAYLANDCLIENT_EXPORT QWaylandDrag : public QBasicDrag
33{
34public:
35 QWaylandDrag(QWaylandDisplay *display);
36 ~QWaylandDrag() override;
37
38 void setResponse(bool accepted);
39 void setResponse(const QPlatformDropQtResponse &response);
40 void setDropResponse(const QPlatformDropQtResponse &response);
41 void finishDrag();
42
43protected:
44 void startDrag() override;
45 void cancel() override;
46 void move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override;
47 void drop(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardModifiers mods) override;
48 void endDrag() override;
49
50 bool ownsDragObject() const override;
51
52private:
53 QWaylandDisplay *m_display = nullptr;
54};
55#endif
56}
57
59
60#endif // QWAYLANDDND_H
QBasicDrag is a base class for implementing platform drag and drop.
\inmodule QtCore\reentrant
Definition qpoint.h:25
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
GLboolean GLboolean GLboolean b
future cancel()