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
qplatformdrag.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 QPLATFORMDRAG_H
5#define QPLATFORMDRAG_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the QPA API and is not meant to be used
12// in applications. Usage of this API may make your code
13// source and binary incompatible with future versions of Qt.
14//
15
16#include <QtGui/qtguiglobal.h>
17#include <QtGui/QPixmap>
18
19QT_REQUIRE_CONFIG(draganddrop);
20
22
23class QMimeData;
24class QMouseEvent;
25class QDrag;
26class QObject;
27class QEvent;
29
30class Q_GUI_EXPORT QPlatformDropQtResponse
31{
32public:
33 QPlatformDropQtResponse(bool accepted, Qt::DropAction acceptedAction);
34 bool isAccepted() const;
35 Qt::DropAction acceptedAction() const;
36
37private:
38 bool m_accepted;
39 Qt::DropAction m_accepted_action;
40
41};
42
44{
45public:
46 QPlatformDragQtResponse(bool accepted, Qt::DropAction acceptedAction, QRect answerRect);
47
48 QRect answerRect() const;
49
50private:
51 QRect m_answer_rect;
52};
53
54class Q_GUI_EXPORT QPlatformDrag
55{
56 Q_DECLARE_PRIVATE(QPlatformDrag)
57public:
58 Q_DISABLE_COPY_MOVE(QPlatformDrag)
59
61 virtual ~QPlatformDrag();
62
63 QDrag *currentDrag() const;
64
65 virtual Qt::DropAction drag(QDrag *m_drag) = 0;
66 virtual void cancelDrag();
67 void updateAction(Qt::DropAction action);
68
69 virtual Qt::DropAction defaultAction(Qt::DropActions possibleActions, Qt::KeyboardModifiers modifiers) const;
70
71 static QPixmap defaultPixmap();
72
73 virtual bool ownsDragObject() const;
74
75private:
77};
78
80
81#endif
\inmodule QtGui
Definition qdrag.h:22
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qmimedata.h:16
\inmodule QtGui
Definition qevent.h:196
\inmodule QtCore
Definition qobject.h:103
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
The QPlatformDrag class provides an abstraction for drag.
virtual Qt::DropAction drag(QDrag *m_drag)=0
\inmodule QtCore\reentrant
Definition qrect.h:30
EGLImageKHR int int EGLuint64KHR * modifiers
Combined button and popup list for selecting options.
DropAction
#define QT_REQUIRE_CONFIG(feature)