5#include "private/qguiapplication_p.h"
6#include "qpa/qplatformintegration.h"
7#include "qpa/qplatformdrag.h"
77 d->source = dragSource;
104 if (
d->data !=
nullptr)
149 d->hotspot = hotspot;
227 qWarning(
"QDrag: No mimedata set before starting the drag");
228 return d->executed_action;
241 transformedDefaultDropAction = defaultDropAction;
244 d->default_action = transformedDefaultDropAction;
249 d->executed_action = executed_action;
250 return d->executed_action;
266 d->customCursors.remove(action);
268 d->customCursors[action] =
cursor;
282 const Iterator
it =
d->customCursors.constFind(action);
283 if (
it !=
d->customCursors.constEnd())
311 return d->supported_actions;
323 return d->default_action;
337 platformDrag->cancelDrag();
360#include "moc_qdrag.cpp"
Qt::DropAction drag(QDrag *)
static QDragManager * self()
void setHotSpot(const QPoint &hotspot)
Sets the position of the hot spot relative to the top-left corner of the pixmap used to the point spe...
Qt::DropAction exec(Qt::DropActions supportedActions=Qt::MoveAction)
QMimeData * mimeData() const
Returns the MIME data that is encapsulated by the drag object.
void setDragCursor(const QPixmap &cursor, Qt::DropAction action)
Sets the drag cursor for the action.
void setMimeData(QMimeData *data)
Sets the data to be sent to the given MIME data.
QDrag(QObject *dragSource)
Constructs a new drag object for the widget specified by dragSource.
QObject * source() const
Returns the source of the drag object.
QPixmap pixmap() const
Returns the pixmap used to represent the data in a drag and drop operation.
Qt::DropAction defaultAction() const
Returns the default proposed drop action for this drag operation.
void setPixmap(const QPixmap &)
Sets pixmap as the pixmap used to represent the data in a drag and drop operation.
QPixmap dragCursor(Qt::DropAction action) const
Returns the drag cursor for the action.
QPoint hotSpot() const
Returns the position of the hot spot relative to the top-left corner of the cursor.
~QDrag()
Destroys the drag object.
QObject * target() const
Returns the target of the drag and drop operation.
static void cancel()
Cancels a drag operation initiated by Qt.
Qt::DropActions supportedActions() const
Returns the set of possible drop actions for this drag operation.
static QPlatformIntegration * platformIntegration()
static QGuiApplicationPrivate * instance()
QPixmap getPixmapCursor(Qt::CursorShape cshape)
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
bool isNull() const
Returns true if this string is null; otherwise returns false.
QChar * data()
Returns a pointer to the data stored in the QString.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data