Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
33
34QT_BEGIN_NAMESPACE
35
36class QPlatformDrag;
37
56
57class Q_GUI_EXPORT QDragManager : public QObject {
58 Q_OBJECT
59
60public:
61 QDragManager();
62 ~QDragManager();
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
82QT_END_NAMESPACE
83
84#endif // QDND_P_H
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
#define qApp
QT_REQUIRE_CONFIG(draganddrop)