48 #ifndef QT_NO_DRAGANDDROP 117 d->source = dragSource;
134 if (manager && manager->
object ==
this)
192 d->hotspot = hotspot;
274 qWarning(
"QDrag: No mimedata set before starting the drag");
275 return d->executed_action;
279 d->possible_actions = supportedActions;
291 d->defaultDropAction = defaultDropAction;
293 d->executed_action = manager->
drag(
this);
296 return d->executed_action;
321 qWarning(
"QDrag: No mimedata set before starting the drag");
322 return d->executed_action;
328 d->executed_action = manager->
drag(
this);
329 return d->executed_action;
346 d->customCursors.remove(action);
348 d->customCursors[action] = cursor;
374 #endif // QT_NO_DRAGANDDROP
void setDragCursor(const QPixmap &cursor, Qt::DropAction action)
Sets the drag cursor for the action.
QWidget * source() const
Returns the source of the drag object.
#define QT_END_NAMESPACE
This macro expands to.
void setPixmap(const QPixmap &)
Sets pixmap as the pixmap used to represent the data in a drag and drop operation.
The QDrag class provides support for MIME-based drag and drop data transfer.
void setMimeData(QMimeData *data)
Sets the data to be sent to the given MIME data.
void cancel(bool deleteSource=true)
Qt::DropAction exec(Qt::DropActions supportedActions=Qt::MoveAction)
Starts the drag and drop operation and returns a value indicating the requested drop action when it i...
The QObject class is the base class of all Qt objects.
Qt::DropAction drag(QDrag *)
QDrag(QWidget *dragSource)
Constructs a new drag object for the widget specified by dragSource.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
QPixmap pixmap() const
Returns the pixmap used to represent the data in a drag and drop operation.
The QMimeData class provides a container for data that records information about its MIME type...
static QDragManager * self()
QMimeData * mimeData() const
Returns the MIME data that is encapsulated by the drag object.
~QDrag()
Destroys the drag object.
The QPoint class defines a point in the plane using integer precision.
Qt::DropAction start(Qt::DropActions supportedActions=Qt::CopyAction)
Starts the drag and drop operation and returns a value indicating the requested drop action when it i...
The QPixmap class is an off-screen image representation that can be used as a paint device...
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...
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
QPoint hotSpot() const
Returns the position of the hot spot relative to the top-left corner of the cursor.
QWidget * target() const
Returns the target of the drag and drop operation.