Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/virtual/scene_qpainter_virtual_backend.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 60 | { | |||
---|---|---|---|---|---|
65 | } | 65 | } | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | bool VirtualQPainterBackend::usesOverlayWindow() const | 68 | bool VirtualQPainterBackend::usesOverlayWindow() const | ||
69 | { | 69 | { | ||
70 | return false; | 70 | return false; | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | void VirtualQPainterBackend::renderCursor(QPainter *painter) | | |||
74 | { | | |||
75 | if (!m_backend->usesSoftwareCursor()) { | | |||
76 | return; | | |||
77 | } | | |||
78 | const QImage img = m_backend->softwareCursor(); | | |||
79 | if (img.isNull()) { | | |||
80 | return; | | |||
81 | } | | |||
82 | const QPoint cursorPos = Cursor::pos(); | | |||
83 | const QPoint hotspot = m_backend->softwareCursorHotspot(); | | |||
84 | painter->drawImage(cursorPos - hotspot, img); | | |||
85 | m_backend->markCursorAsRendered(); | | |||
86 | } | | |||
87 | | ||||
88 | } | 73 | } |