9#include <qpa/qplatformdrag.h>
10#include <QtGui/qpixmap.h>
11#include <QtGui/qdrag.h>
12#include <QtCore/private/qcomobject_p.h>
14struct IDropTargetHelper;
35 STDMETHOD(
DragOver)(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
noexcept override;
38 (LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
noexcept override;
41 void handleDrag(QWindow *window, DWORD grfKeyState,
const QPoint &, LPDWORD pdwEffect);
43 QWindow *
const m_window;
46 DWORD m_chosenEffect = 0;
47 DWORD m_lastKeyState = 0;
70 static bool m_canceled;
73 IDataObject *m_dropDataObject =
nullptr;
75 IDropTargetHelper* m_cachedDropTargetHelper =
nullptr;
\inmodule QtCore\reentrant
Singleton container for all relevant information.
QWindowsScreenManager & screenManager()
static QWindowsContext * instance()
Platform cursor implementation.
static QPoint mousePosition()
static State cursorState()
A toplevel window showing the drag icon in case of touch drag.
void setPixmap(const QPixmap &p)
void paintEvent(QPaintEvent *) override
Handles paint events passed in the event parameter.
QWindowsDragCursorWindow(QWindow *parent=nullptr)
Windows drag implementation.
IDataObject * dropDataObject() const
QMimeData * dropData()
Return data for a drop in process.
void setDropDataObject(IDataObject *dataObject)
static QWindowsDrag * instance()
void releaseDropDataObject()
IDropTargetHelper * dropHelper()
May be used to handle extended cursors functionality for drags from outside the app.
Qt::DropAction drag(QDrag *drag) override
void cancelDrag() override
Cancels the currently active drag (only for drags of the current application initiated by QPlatformDr...
QWindowsOleDataObject subclass specialized for handling Drag&Drop.
QWindowsDropDataObject(QMimeData *mimeData)
Special mime data class for data retrieval from Drag operations.
QWindowsDropMimeData()=default
IDataObject * retrieveDataObject() const override
static QWindowsIntegration * instance()
Implementation of IDropSource.
STDMETHOD GiveFeedback(DWORD dwEffect) noexcept override
Give feedback: Change cursor according to action.
~QWindowsOleDropSource() override
void createCursors()
Blend custom pixmap with cursors.
QWindowsOleDropSource(QWindowsDrag *drag)
STDMETHOD QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState) noexcept override
Check for cancel.
Implementation of IDropTarget.
~QWindowsOleDropTarget() override
LPDATAOBJECT DWORD grfKeyState
STDMETHOD DragLeave() noexcept override
LPDATAOBJECT DWORD POINTL pt
QWindowsOleDropTarget(QWindow *w)
STDMETHOD DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) noexcept override
const QWindowsScreen * screenAtDp(const QPoint &p) const
bool hasMouseCapture() const
static HRESULT startDoDragDrop(LPDATAOBJECT pDataObj, LPDROPSOURCE pDropSource, DWORD dwOKEffects, LPDWORD pdwEffect)
static Qt::DropActions translateToQDragDropActions(DWORD pdwEffects)
static Qt::KeyboardModifiers toQtKeyboardModifiers(DWORD keyState)
static Qt::MouseButtons lastButtons
static Qt::DropAction translateToQDragDropAction(DWORD pdwEffect)
static DWORD translateToWinDragEffects(Qt::DropActions action)
static Qt::KeyboardModifiers lastModifiers