![]() |
Qt 6.x
The Qt SDK
|
The QPlatformDrag class provides an abstraction for drag. More...
#include <qplatformdrag.h>
Public Member Functions | |
QPlatformDrag () | |
virtual | ~QPlatformDrag () |
QDrag * | currentDrag () const |
virtual Qt::DropAction | drag (QDrag *m_drag)=0 |
virtual void | cancelDrag () |
Cancels the currently active drag (only for drags of the current application initiated by QPlatformDrag::drag()). | |
void | updateAction (Qt::DropAction action) |
Called to notify QDrag about changes of the current action. | |
virtual Qt::DropAction | defaultAction (Qt::DropActions possibleActions, Qt::KeyboardModifiers modifiers) const |
virtual bool | ownsDragObject () const |
Returns bool indicating whether QPlatformDrag takes ownership and therefore responsibility of deleting the QDrag object passed in from QPlatformDrag::drag. This can be useful on platforms where QDrag object has to be kept around. | |
Static Public Member Functions | |
static QPixmap | defaultPixmap () |
The QPlatformDrag class provides an abstraction for drag.
\preliminary
Definition at line 54 of file qplatformdrag.h.
QPlatformDrag::QPlatformDrag | ( | ) |
Definition at line 60 of file qplatformdrag.cpp.
|
virtual |
Definition at line 64 of file qplatformdrag.cpp.
|
virtual |
Cancels the currently active drag (only for drags of the current application initiated by QPlatformDrag::drag()).
The default implementation does nothing.
Reimplemented in QBasicDrag, and QWindowsDrag.
Definition at line 135 of file qplatformdrag.cpp.
References Q_UNIMPLEMENTED.
QDrag * QPlatformDrag::currentDrag | ( | ) | const |
Definition at line 69 of file qplatformdrag.cpp.
References QDragManager::object(), and QDragManager::self().
Referenced by QXcbDrag::cancel(), QWindowsOleDropSource::createCursors(), defaultAction(), QCocoaDrag::defaultAction(), QXcbDrag::defaultAction(), QXcbDrag::drop(), QWindowsDrag::dropData(), QAbstractItemDelegatePrivate::editorEventFilter(), QWindowsOleDropSource::GiveFeedback(), QXcbDrag::handleDrop(), QXcbDrag::handleSelectionRequest(), QXcbDrag::move(), updateAction(), and QXcbDropData::xdndObtainData().
|
virtual |
Reimplemented in QCocoaDrag, and QXcbDrag.
Definition at line 74 of file qplatformdrag.cpp.
References Qt::AltModifier, Qt::ControlModifier, Qt::CopyAction, currentDrag(), QDrag::defaultAction(), Qt::IgnoreAction, Qt::LinkAction, Qt::MoveAction, qDebug, and Qt::ShiftModifier.
Referenced by QXcbDrag::defaultAction().
|
static |
Definition at line 171 of file qplatformdrag.cpp.
|
pure virtual |
Implemented in QBasicDrag, QWindowsDrag, and QCocoaDrag.
Referenced by QDragManager::drag().
|
virtual |
Returns bool indicating whether QPlatformDrag takes ownership and therefore responsibility of deleting the QDrag object passed in from QPlatformDrag::drag. This can be useful on platforms where QDrag object has to be kept around.
Reimplemented in QXcbDrag.
Definition at line 183 of file qplatformdrag.cpp.
Referenced by QDragManager::drag().
void QPlatformDrag::updateAction | ( | Qt::DropAction | action | ) |
Called to notify QDrag about changes of the current action.
Definition at line 144 of file qplatformdrag.cpp.
References QDrag::actionChanged(), currentDrag(), d, and emit.
Referenced by QWindowsOleDropSource::GiveFeedback(), and QBasicDrag::updateCursor().