Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qdnd_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 QDND_P_H
5#define QDND_P_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 for the convenience
12// of other Qt classes. 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 <QtGui/private/qtguiglobal_p.h>
19#include "QtCore/qobject.h"
20#include "QtCore/qmap.h"
21#include "QtCore/qmimedata.h"
22#include "QtGui/qdrag.h"
23#include "QtGui/qpixmap.h"
24#include "QtGui/qcursor.h"
25#include "QtGui/qwindow.h"
26#include "QtCore/qpoint.h"
27#include "private/qobject_p.h"
28#include "QtGui/qbackingstore.h"
29
30QT_REQUIRE_CONFIG(draganddrop);
31
33
34class QPlatformDrag;
35
37{
38public:
42 , data(nullptr)
43 { }
50 Qt::DropActions supported_actions;
53};
54
55class Q_GUI_EXPORT QDragManager : public QObject {
57
58public:
61 static QDragManager *self();
62
63 Qt::DropAction drag(QDrag *);
64
65 void setCurrentTarget(QObject *target, bool dropped = false);
66 QObject *currentTarget() const;
67
68 QPointer<QDrag> object() const { return m_object; }
69 QObject *source() const;
70
71private:
72 QObject *m_currentDropTarget;
73 QPlatformDrag *m_platformDrag;
74 QPointer<QDrag> m_object;
75
76 static QDragManager *m_instance;
77 Q_DISABLE_COPY_MOVE(QDragManager)
78};
79
81
82#endif // QDND_P_H
QPointer< QDrag > object() const
Definition qdnd_p.h:68
QDragPrivate()
Definition qdnd_p.h:39
Qt::DropActions supported_actions
Definition qdnd_p.h:50
Qt::DropAction default_action
Definition qdnd_p.h:51
QObject * source
Definition qdnd_p.h:44
Qt::DropAction executed_action
Definition qdnd_p.h:49
QPixmap pixmap
Definition qdnd_p.h:47
QObject * target
Definition qdnd_p.h:45
QMap< Qt::DropAction, QPixmap > customCursors
Definition qdnd_p.h:52
QMimeData * data
Definition qdnd_p.h:46
QPoint hotspot
Definition qdnd_p.h:48
\inmodule QtGui
Definition qdrag.h:22
Definition qmap.h:186
\inmodule QtCore
Definition qmimedata.h:16
\inmodule QtCore
Definition qobject.h:90
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.
\inmodule QtCore\reentrant
Definition qpoint.h:23
\inmodule QtCore
Definition qpointer.h:18
Combined button and popup list for selecting options.
DropAction
GLenum target
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLsizei GLchar * source
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
QObject::connect nullptr