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
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
30#include <QtCore/qpointer.h>
31
32QT_REQUIRE_CONFIG(draganddrop);
33
35
36class QPlatformDrag;
37
56
57class Q_GUI_EXPORT QDragManager : public QObject {
59
60public:
63 static QDragManager *self();
64
65 Qt::DropAction drag(QDrag *);
66
67 void setCurrentTarget(QObject *target, bool dropped = false);
68 QObject *currentTarget() const;
69
70 QPointer<QDrag> object() const { return m_object; }
71 QObject *source() const;
72
73private:
74 QObject *m_currentDropTarget;
75 QPlatformDrag *m_platformDrag;
76 QPointer<QDrag> m_object;
77
78 static QDragManager *m_instance;
79 Q_DISABLE_COPY_MOVE(QDragManager)
80};
81
83
84#endif // QDND_P_H
QPointer< QDrag > object() const
Definition qdnd_p.h:70
QDragPrivate()
Definition qdnd_p.h:41
Qt::DropActions supported_actions
Definition qdnd_p.h:52
Qt::DropAction default_action
Definition qdnd_p.h:53
QObject * source
Definition qdnd_p.h:46
Qt::DropAction executed_action
Definition qdnd_p.h:51
QPixmap pixmap
Definition qdnd_p.h:49
QObject * target
Definition qdnd_p.h:47
QMap< Qt::DropAction, QPixmap > customCursors
Definition qdnd_p.h:54
QMimeData * data
Definition qdnd_p.h:48
QPoint hotspot
Definition qdnd_p.h:50
\inmodule QtGui
Definition qdrag.h:22
\inmodule QtCore
Definition qmimedata.h:16
\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.
\inmodule QtCore\reentrant
Definition qpoint.h:25
Combined button and popup list for selecting options.
DropAction
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum target
GLsizei GLsizei GLchar * source
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
QObject::connect nullptr