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
qplatformdrag.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
QPLATFORMDRAG_H
6
#
define
QPLATFORMDRAG_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is part of the QPA API and is not meant to be used
13
// in applications. Usage of this API may make your code
14
// source and binary incompatible with future versions of Qt.
15
//
16
17
#
include
<
QtGui
/
qtguiglobal
.
h
>
18
#
include
<
QtGui
/
QPixmap
>
19
20
QT_REQUIRE_CONFIG
(
draganddrop
);
21
22
QT_BEGIN_NAMESPACE
23
24
class
QMimeData;
25
class
QMouseEvent;
26
class
QDrag;
27
class
QObject;
28
class
QEvent;
29
class
QPlatformDragPrivate
;
30
31
class
Q_GUI_EXPORT
QPlatformDropQtResponse
32
{
33
public
:
34
QPlatformDropQtResponse(
bool
accepted, Qt::DropAction acceptedAction);
35
bool
isAccepted()
const
;
36
Qt::DropAction acceptedAction()
const
;
37
38
private
:
39
bool
m_accepted;
40
Qt::DropAction m_accepted_action;
41
42
};
43
44
class
Q_GUI_EXPORT
QPlatformDragQtResponse
:
public
QPlatformDropQtResponse
45
{
46
public
:
47
QPlatformDragQtResponse(
bool
accepted, Qt::DropAction acceptedAction, QRect answerRect);
48
49
QRect answerRect()
const
;
50
51
private
:
52
QRect m_answer_rect;
53
};
54
55
class
Q_GUI_EXPORT
QPlatformDrag
56
{
57
Q_DECLARE_PRIVATE(QPlatformDrag)
58
public
:
59
Q_DISABLE_COPY_MOVE(QPlatformDrag)
60
61
QPlatformDrag();
62
virtual
~QPlatformDrag();
63
64
QDrag *
currentDrag
()
const
;
65
66
virtual
Qt
::
DropAction
drag
(QDrag *m_drag) = 0;
67
virtual
void
cancelDrag
();
68
void
updateAction
(Qt::DropAction action);
69
70
virtual
Qt
::
DropAction
defaultAction
(Qt::DropActions possibleActions, Qt::KeyboardModifiers modifiers)
const
;
71
72
static
QPixmap
defaultPixmap
();
73
74
virtual
bool
ownsDragObject
()
const
;
75
76
private
:
77
QPlatformDragPrivate *d_ptr;
78
};
79
80
QT_END_NAMESPACE
81
82
#
endif
QPlatformDragPrivate
Definition
qplatformdrag.cpp:45
QPlatformDragPrivate::cursor_drop_action
Qt::DropAction cursor_drop_action
Definition
qplatformdrag.cpp:49
QPlatformDragPrivate::QPlatformDragPrivate
QPlatformDragPrivate()
Definition
qplatformdrag.cpp:47
QPlatformDragQtResponse
Definition
qplatformdrag.h:45
QPlatformDrag
The QPlatformDrag class provides an abstraction for drag.
Definition
qplatformdrag.h:56
QPlatformDrag::cancelDrag
virtual void cancelDrag()
Cancels the currently active drag (only for drags of the current application initiated by QPlatformDr...
Definition
qplatformdrag.cpp:136
QPlatformDrag::ownsDragObject
virtual bool ownsDragObject() const
Returns bool indicating whether QPlatformDrag takes ownership and therefore responsibility of deletin...
Definition
qplatformdrag.cpp:184
QPlatformDrag::currentDrag
QDrag * currentDrag() const
Definition
qplatformdrag.cpp:70
QPlatformDrag::defaultPixmap
static QPixmap defaultPixmap()
Definition
qplatformdrag.cpp:172
QPlatformDrag::drag
virtual Qt::DropAction drag(QDrag *m_drag)=0
QPlatformDrag::defaultAction
virtual Qt::DropAction defaultAction(Qt::DropActions possibleActions, Qt::KeyboardModifiers modifiers) const
Definition
qplatformdrag.cpp:75
QPlatformDrag::updateAction
void updateAction(Qt::DropAction action)
Called to notify QDrag about changes of the current action.
Definition
qplatformdrag.cpp:145
QPlatformDropQtResponse
Definition
qplatformdrag.h:32
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(draganddrop)
Q_GLOBAL_STATIC_WITH_ARGS
Q_GLOBAL_STATIC_WITH_ARGS(PermissionStatusHash, g_permissionStatusHash,({ { qMetaTypeId< QCameraPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QMicrophonePermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QBluetoothPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QContactsPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QCalendarPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QLocationPermission >(), Qt::PermissionStatus::Undetermined } }))
default_pm
static const char *const default_pm[]
Definition
qplatformdrag.cpp:154
qtbase
src
gui
kernel
qplatformdrag.h
Generated on
for Qt by
1.18.0