Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPlatformDrag Class Referenceabstract

The QPlatformDrag class provides an abstraction for drag. More...

#include <qplatformdrag.h>

+ Inheritance diagram for QPlatformDrag:
+ Collaboration diagram for QPlatformDrag:

Public Member Functions

 QPlatformDrag ()
 
virtual ~QPlatformDrag ()
 
QDragcurrentDrag () 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 ()
 

Detailed Description

The QPlatformDrag class provides an abstraction for drag.

Since
5.0

\preliminary

Definition at line 54 of file qplatformdrag.h.

Constructor & Destructor Documentation

◆ QPlatformDrag()

QPlatformDrag::QPlatformDrag ( )

Definition at line 60 of file qplatformdrag.cpp.

◆ ~QPlatformDrag()

QPlatformDrag::~QPlatformDrag ( )
virtual

Definition at line 64 of file qplatformdrag.cpp.

Member Function Documentation

◆ cancelDrag()

void QPlatformDrag::cancelDrag ( )
virtual

Cancels the currently active drag (only for drags of the current application initiated by QPlatformDrag::drag()).

The default implementation does nothing.

Since
5.7

Reimplemented in QBasicDrag, and QWindowsDrag.

Definition at line 135 of file qplatformdrag.cpp.

References Q_UNIMPLEMENTED.

◆ currentDrag()

QDrag * QPlatformDrag::currentDrag ( ) const

Definition at line 69 of file qplatformdrag.cpp.

References QDragManager::self().

Referenced by QXcbDrag::cancel(), QWindowsOleDropSource::createCursors(), defaultAction(), QCocoaDrag::defaultAction(), QXcbDrag::defaultAction(), QXcbDrag::drop(), QWindowsDrag::dropData(), QWindowsOleDropSource::GiveFeedback(), QXcbDrag::handleDrop(), QXcbDrag::handleSelectionRequest(), QXcbDrag::move(), updateAction(), and QXcbDropData::xdndObtainData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultAction()

Qt::DropAction QPlatformDrag::defaultAction ( Qt::DropActions possibleActions,
Qt::KeyboardModifiers modifiers ) const
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultPixmap()

QPixmap QPlatformDrag::defaultPixmap ( )
static

Definition at line 171 of file qplatformdrag.cpp.

◆ drag()

virtual Qt::DropAction QPlatformDrag::drag ( QDrag * m_drag)
pure virtual

Implemented in QWasmDrag, QBasicDrag, QWindowsDrag, and QCocoaDrag.

Referenced by QDragManager::drag().

+ Here is the caller graph for this function:

◆ ownsDragObject()

bool QPlatformDrag::ownsDragObject ( ) const
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.

Since
5.4

Reimplemented in QXcbDrag.

Definition at line 183 of file qplatformdrag.cpp.

Referenced by QDragManager::drag().

+ Here is the caller graph for this function:

◆ updateAction()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: