Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
33
QT_REQUIRE_CONFIG
(
draganddrop
);
34
35
QT_BEGIN_NAMESPACE
36
37
class
QPlatformDrag;
38
39
class
QDragPrivate
:
public
QObjectPrivate
40
{
41
public
:
42
QDragPrivate
()
43
:
source
(
nullptr
)
44
,
target
(
nullptr
)
45
,
data
(
nullptr
)
46
{ }
47
QObject
*
source
;
48
QObject
*
target
;
49
QMimeData
*
data
;
50
QPixmap
pixmap
;
51
QPoint
hotspot
;
52
Qt
::
DropAction
executed_action
;
53
Qt
::
DropActions
supported_actions
;
54
Qt
::
DropAction
default_action
;
55
QMap
<
Qt
::
DropAction
,
QPixmap
>
customCursors
;
56
};
57
58
class
Q_GUI_EXPORT
QDragManager
:
public
QObject {
59
Q_OBJECT
60
61
public
:
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
74
private
:
75
QObject *m_currentDropTarget;
76
QPlatformDrag *m_platformDrag;
77
QPointer<QDrag> m_object;
78
79
friend
class
QDrag;
80
static
QDragManager *m_instance;
81
Q_DISABLE_COPY_MOVE(QDragManager)
82
};
83
84
QT_END_NAMESPACE
85
86
#
endif
// QDND_P_H
QDragManager
Definition
qdnd_p.h:58
QDragPrivate
Definition
qdnd_p.h:40
QDragPrivate::QDragPrivate
QDragPrivate()
Definition
qdnd_p.h:42
QDragPrivate::supported_actions
Qt::DropActions supported_actions
Definition
qdnd_p.h:53
QDragPrivate::default_action
Qt::DropAction default_action
Definition
qdnd_p.h:54
QDragPrivate::source
QObject * source
Definition
qdnd_p.h:47
QDragPrivate::executed_action
Qt::DropAction executed_action
Definition
qdnd_p.h:52
QDragPrivate::pixmap
QPixmap pixmap
Definition
qdnd_p.h:50
QDragPrivate::target
QObject * target
Definition
qdnd_p.h:48
QDragPrivate::customCursors
QMap< Qt::DropAction, QPixmap > customCursors
Definition
qdnd_p.h:55
QDragPrivate::data
QMimeData * data
Definition
qdnd_p.h:49
QDragPrivate::hotspot
QPoint hotspot
Definition
qdnd_p.h:51
qApp
#define qApp
Definition
qcoreapplication.h:38
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(draganddrop)
qtbase
src
gui
kernel
qdnd_p.h
Generated on
for Qt by
1.18.0