![]() |
Qt 6.x
The Qt SDK
|
Implementation of IDropSource. More...
Public Types | |
enum | Mode { MouseDrag , TouchDrag } |
Public Member Functions | |
QWindowsOleDropSource (QWindowsDrag *drag) | |
~QWindowsOleDropSource () override | |
void | createCursors () |
Blend custom pixmap with cursors. | |
STDMETHOD() | QueryContinueDrag (BOOL fEscapePressed, DWORD grfKeyState) override |
Check for cancel. | |
STDMETHOD() | GiveFeedback (DWORD dwEffect) override |
Give feedback: Change cursor according to action. | |
![]() | |
QWindowsComBase (ULONG initialRefCount=1) | |
virtual | ~QWindowsComBase ()=default |
HRESULT STDMETHODCALLTYPE | QueryInterface (REFIID id, LPVOID *iface) override |
ULONG STDMETHODCALLTYPE | AddRef () override |
ULONG STDMETHODCALLTYPE | Release () override |
Friends | |
QDebug | operator<< (QDebug, const QWindowsOleDropSource::CursorEntry &) |
Implementation of IDropSource.
Used for drag operations.
Definition at line 170 of file qwindowsdrag.cpp.
Enumerator | |
---|---|
MouseDrag | |
TouchDrag |
Definition at line 173 of file qwindowsdrag.cpp.
|
explicit |
Definition at line 213 of file qwindowsdrag.cpp.
References qCDebug.
|
override |
Definition at line 223 of file qwindowsdrag.cpp.
References QMap< Key, T >::clear(), and qCDebug.
void QWindowsOleDropSource::createCursors | ( | ) |
Blend custom pixmap with cursors.
Definition at line 243 of file qwindowsdrag.cpp.
References QPixmap::cacheKey(), Qt::CopyAction, QWindowsCursor::createPixmapCursor(), QPlatformDrag::currentDrag(), QPlatformScreen::cursor(), QDrag::dragCursor(), QWindowsCursor::dragDefaultCursor(), QMap< Key, T >::end(), QHighDpiScaling::factor(), QPixmap::fill(), QMap< Key, T >::find(), QPixmap::height(), QDrag::hotSpot(), Qt::IgnoreAction, QMap< Key, T >::insert(), QWindowsContext::instance(), QPixmap::isNull(), it, Qt::KeepAspectRatio, Qt::LinkAction, QWindowsCursor::mousePosition(), Qt::MoveAction, QDrag::pixmap(), pixmap, QGuiApplication::primaryScreen, Q_ASSERT, qCDebug, qFuzzyCompare(), qMax(), qMin(), qRound(), qWarning, QWindowsScreenManager::screenAtDp(), QWindowsContext::screenManager(), QPixmap::setDevicePixelRatio(), QMap< Key, T >::size(), Qt::SmoothTransformation, TouchDrag, Qt::transparent, QPixmap::width(), QPoint::x(), and QPoint::y().
Referenced by GiveFeedback().
|
override |
Give feedback: Change cursor according to action.
Definition at line 391 of file qwindowsdrag.cpp.
References QPixmap::cacheKey(), QMap< Key, T >::constEnd(), QMap< Key, T >::constFind(), createCursors(), QPlatformDrag::currentDrag(), QWindowsCursor::cursorState(), QDrag::dragCursor(), e, it, MouseDrag, QCursor::pos(), QWindowsDragCursorWindow::setPixmap(), QWindow::show(), QWindowsCursor::Suppressed, TouchDrag, translateToQDragDropAction(), and QPlatformDrag::updateAction().
|
override |
Check for cancel.
Definition at line 337 of file qwindowsdrag.cpp.
References QPointer< T >::data(), Qt::dec(), QWindowSystemInterface::handleMouseEvent(), Qt::hex(), QWindowsDrag::isCanceled(), QPointer< T >::isNull(), lastButtons, Qt::LeftButton, QPlatformWindow::mapFromGlobal(), QEvent::MouseButtonRelease, QWindowsCursor::mousePosition(), Qt::NoButton, QCoreApplication::processEvents(), qCDebug, QWindowsMouseHandler::queryMouseButtons(), TouchDrag, and QWindowsContext::verbose.
Definition at line 231 of file qwindowsdrag.cpp.