34 public QSafeQuickItemChangeListener<QQuickDragAttachedPrivate>
36 Q_DECLARE_PUBLIC(QQuickDragAttached)
38 QML_ADDED_IN_VERSION(2, 0)
41 static QQuickDragAttachedPrivate *get(QQuickDragAttached *attached) {
42 return static_cast<QQuickDragAttachedPrivate *>(QObjectPrivate::get(attached)); }
44 QQuickDragAttachedPrivate()
45 : attachedItem(
nullptr)
47 , proposedAction(Qt::MoveAction)
48 , supportedActions(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction)
52 , dragRestarted(
false)
55 , overrideActions(
false)
56 , dragType(QQuickDrag::Internal)
60 void itemGeometryChanged(QQuickItem *, QQuickGeometryChange,
const QRectF &) override;
61 void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
62 void updatePosition();
64 void deliverEnterEvent();
65 void deliverMoveEvent();
66 void deliverLeaveEvent();
67 void deliverEvent(QQuickWindow *window, QEvent *event);
68 void start(Qt::DropActions supportedActions);
69 Qt::DropAction startDrag(Qt::DropActions supportedActions);
70 void setTarget(QQuickItem *item);
71 QMimeData *createMimeData()
const;
74 QQuickDragGrabber dragGrabber;
76 QPointer<QObject> source;
77 QPointer<QObject> target;
78 QPointer<QQuickWindow> window;
79 QQuickItem *attachedItem;
80 QQuickDragMimeData *mimeData;
81 Qt::DropAction proposedAction;
82 Qt::DropActions supportedActions;
86 bool dragRestarted : 1;
89 bool overrideActions : 1;
92 QSize imageSourceSize;
93 QQuickPixmap pixmapLoader;
95 QVariantMap externalMimeData;
96 QQuickDrag::DragType dragType;