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// Qt-Security score:significant reason:default
4
5#ifndef QDND_P_H
6#define QDND_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of other Qt classes. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtGui/private/qtguiglobal_p.h>
20#include "QtCore/qobject.h"
21#include "QtCore/qmap.h"
22#include "QtCore/qmimedata.h"
23#include "QtGui/qdrag.h"
24#include "QtGui/qpixmap.h"
25#include "QtGui/qcursor.h"
26#include "QtGui/qwindow.h"
27#include "QtCore/qpoint.h"
28#include "private/qobject_p.h"
29#include "QtGui/qbackingstore.h"
30
31#include <QtCore/qpointer.h>
32
34
35QT_BEGIN_NAMESPACE
36
37class QPlatformDrag;
38
57
58class Q_GUI_EXPORT QDragManager : public QObject {
59 Q_OBJECT
60
61public:
62 QDragManager();
63 ~QDragManager();
64 static QDragManager *self();
65
66 Qt::DropAction drag(QDrag *);
67
68 void setCurrentTarget(QObject *target, bool dropped = false);
69 QObject *currentTarget() const;
70
71 QPointer<QDrag> object() const { return m_object; }
72 QObject *source() const;
73
74private:
75 QObject *m_currentDropTarget;
76 QPlatformDrag *m_platformDrag;
77 QPointer<QDrag> m_object;
78
79 static QDragManager *m_instance;
80 Q_DISABLE_COPY_MOVE(QDragManager)
81};
82
83QT_END_NAMESPACE
84
85#endif // QDND_P_H
QDragPrivate()
Definition qdnd_p.h:42
Qt::DropActions supported_actions
Definition qdnd_p.h:53
Qt::DropAction default_action
Definition qdnd_p.h:54
QObject * source
Definition qdnd_p.h:47
Qt::DropAction executed_action
Definition qdnd_p.h:52
QPixmap pixmap
Definition qdnd_p.h:50
QObject * target
Definition qdnd_p.h:48
QMap< Qt::DropAction, QPixmap > customCursors
Definition qdnd_p.h:55
QMimeData * data
Definition qdnd_p.h:49
QPoint hotspot
Definition qdnd_p.h:51
#define qApp
QT_REQUIRE_CONFIG(draganddrop)