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
qquickdrag_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QQUICKDRAG_P_P_H
5#define QQUICKDRAG_P_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 purely as an
12// implementation detail. 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 "qquickdrag_p.h"
19
20#include <QtCore/qobject.h>
21#include <QtCore/private/qobject_p.h>
22#include <QtCore/qpointer.h>
23#include <QtCore/qurl.h>
24#include <QtCore/qvariant.h>
25
26#include <QtQuick/qquickitem.h>
27#include <QtQuick/private/qquickitemchangelistener_p.h>
28#include <QtQuick/private/qquickpixmap_p.h>
29
31
33{
34 Q_DECLARE_PUBLIC(QQuickDragAttached)
37
38public:
40 return static_cast<QQuickDragAttachedPrivate *>(QObjectPrivate::get(attached)); }
41
43 : attachedItem(nullptr)
45 , proposedAction(Qt::MoveAction)
46 , supportedActions(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction)
47 , active(false)
48 , listening(false)
49 , inEvent(false)
50 , dragRestarted(false)
51 , itemMoved(false)
52 , eventQueued(false)
53 , overrideActions(false)
54 , dragType(QQuickDrag::Internal)
55 {
56 }
57
59 void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
60 void updatePosition();
61 void restartDrag();
62 void deliverEnterEvent();
63 void deliverMoveEvent();
64 void deliverLeaveEvent();
65 void deliverEvent(QQuickWindow *window, QEvent *event);
66 void start(Qt::DropActions supportedActions);
67 Qt::DropAction startDrag(Qt::DropActions supportedActions);
69 QMimeData *createMimeData() const;
70 void loadPixmap();
71
73
74 QPointer<QObject> source;
75 QPointer<QObject> target;
76 QPointer<QQuickWindow> window;
80 Qt::DropActions supportedActions;
81 bool active : 1;
82 bool listening : 1;
83 bool inEvent : 1;
84 bool dragRestarted : 1;
85 bool itemMoved : 1;
86 bool eventQueued : 1;
95};
96
98
99#endif
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qmimedata.h:16
static QObjectPrivate * get(QObject *o)
Definition qobject_p.h:150
\inmodule QtCore\reentrant
Definition qpoint.h:217
QQuickDrag::DragType dragType
Qt::DropAction proposedAction
QPointer< QObject > target
QQuickDragMimeData * mimeData
QQuickDragGrabber dragGrabber
QPointer< QObject > source
void setTarget(QQuickItem *item)
Qt::DropActions supportedActions
static QQuickDragAttachedPrivate * get(QQuickDragAttached *attached)
QPointer< QQuickWindow > window
virtual void itemParentChanged(QQuickItem *, QQuickItem *)
virtual void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore
Definition qsize.h:25
\inmodule QtCore
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
Definition qcompare.h:63
DropAction
GLuint start
struct _cl_event * event
#define QML_ANONYMOUS
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_AUTOTEST_EXPORT
QMimeData * mimeData
QObject::connect nullptr
QGraphicsItem * item
aWidget window() -> setWindowTitle("New Window Title")
[2]