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 , executingNativeDrag(
false)
53 , dragRestarted(
false)
56 , overrideActions(
false)
57 , dragType(QQuickDrag::Internal)
61 void itemGeometryChanged(QQuickItem *, QQuickGeometryChange,
const QRectF &) override;
62 void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
63 void updatePosition();
65 void deliverEnterEvent();
66 void deliverMoveEvent();
67 void deliverLeaveEvent();
68 void deliverEvent(QQuickWindow *window, QEvent *event);
69 void start(Qt::DropActions supportedActions);
70 Qt::DropAction startDrag(Qt::DropActions supportedActions);
71 void setTarget(QQuickItem *item);
72 QMimeData *createMimeData()
const;
75 QQuickDragGrabber dragGrabber;
77 QPointer<QObject> source;
78 QPointer<QObject> target;
79 QPointer<QQuickWindow> window;
80 QQuickItem *attachedItem;
81 QQuickDragMimeData *mimeData;
82 Qt::DropAction proposedAction;
83 Qt::DropActions supportedActions;
87 bool executingNativeDrag : 1;
88 bool dragRestarted : 1;
91 bool overrideActions : 1;
94 QSize imageSourceSize;
95 QQuickPixmap pixmapLoader;
97 QVariantMap externalMimeData;
98 QQuickDrag::DragType dragType;