8#include <score_lib_base_export.h>
80const CursorArtworkInfo& cursorArtworkInfo(
CursorArtwork)
noexcept;
90 return s >= Qt::ArrowCursor && s <= Qt::LastCursor && s != Qt::BlankCursor;
113CursorPlatform cursorPlatform(
const QString& platformName)
noexcept;
119 qreal devicePixelRatio{1.};
142 CursorPlatform platform, QSize canvas, QPointF hotspot,
double zoom,
143 double screenScale)
noexcept;
168constexpr int Error = -2;
169constexpr int Transparent = -1;
170constexpr int Nowhere = 0;
171constexpr int Client = 1;
172constexpr int Caption = 2;
173constexpr int SysMenu = 3;
174constexpr int GrowBox = 4;
175constexpr int Menu = 5;
176constexpr int HScroll = 6;
177constexpr int VScroll = 7;
178constexpr int MinButton = 8;
179constexpr int MaxButton = 9;
180constexpr int Left = 10;
181constexpr int Right = 11;
182constexpr int Top = 12;
183constexpr int TopLeft = 13;
184constexpr int TopRight = 14;
185constexpr int Bottom = 15;
186constexpr int BottomLeft = 16;
187constexpr int BottomRight = 17;
188constexpr int Border = 18;
189constexpr int Object = 19;
190constexpr int Close = 20;
191constexpr int Help = 21;
222 static void setStartupZoom(
double zoom)
noexcept;
226 void setZoom(
double zoom);
227 double zoom()
const noexcept {
return m_zoom; }
237 QCursor cursor(Qt::CursorShape s)
const noexcept;
240 const QCursor& cursor(
CursorArtwork a,
double screenScale)
const noexcept;
244 double screenScaleOf(
const QScreen* screen)
const noexcept;
245 double screenScaleOf(
const QWindow& window)
const noexcept;
246 double screenScaleOf(
const QWidget& widget)
const noexcept;
250 QPixmap dragCursor(Qt::DropAction action)
const noexcept;
251 QPixmap dragCursor(Qt::DropAction action,
double screenScale)
const noexcept;
255 void setDragCursors(QDrag& drag)
const;
263 bool installed()
const noexcept {
return m_installed; }
268 void fixWidget(QWidget& w)
const;
269 void fixWindow(QWindow& w)
const;
273 double screenScale() const noexcept;
281 bool eventFilter(QObject* watched, QEvent* event) override;
284 void watchScreen(QScreen* screen);
285 void screensChanged();
286 void refixEverything();
287 void fixOverrideCursor() const;
288 void updatePointerScreen(QPointF globalPos) const;
289 void ensureBuilt() const;
291 const Set& set(
double screenScale) const;
292 const Set& defaultSet() const;
293 const QCursor* remap(const QCursor& c, const Set& target) const;
295 std::unique_ptr<Impl> m_impl;
296 QPointF m_lastMousePos;
298 const QObject* m_lastMoveTarget{};
299 QPointF m_lastMoveLocal;
Definition CursorTheme.hpp:216
CursorPlatform platform() const noexcept
Geometry the cursors of the primary screen are built with.
Definition CursorTheme.hpp:272
Base toolkit upon which the software is built.
Definition Application.cpp:85
CursorGeometry cursorGeometry(CursorPlatform platform, QSize canvas, QPointF hotspot, double zoom, double screenScale) noexcept
Definition CursorTheme.cpp:350
CursorArtwork windowsHitTestCursor(int hitTest, bool windowBlocked) noexcept
Definition CursorTheme.cpp:503
CursorArtwork cursorArtworkForShape(Qt::CursorShape s) noexcept
Definition CursorTheme.cpp:332
constexpr bool isThemeCursorShape(Qt::CursorShape s) noexcept
The shapes of Qt::CursorShape that the platform draws from its own theme.
Definition CursorTheme.hpp:88
QImage renderCursorArtwork(CursorArtwork a, const CursorGeometry &g)
Definition CursorTheme.cpp:419
CursorPlatform
How a platform plug-in of Qt turns a pixmap cursor into the one on screen.
Definition CursorTheme.hpp:95
@ X11
xcb: the pixmap is shown pixel for pixel, the hotspot is in pixels.
QPixmap renderDragCursor(CursorArtwork a, const CursorGeometry &g, bool topLeft)
Definition CursorTheme.cpp:462
CursorArtwork
Definition CursorTheme.hpp:33
Definition CursorTheme.hpp:64
QPointF hotspot
Definition CursorTheme.hpp:73
bool mirrored
Definition CursorTheme.hpp:76
const char * svg
Path of the SVG source in the resources.
Definition CursorTheme.hpp:66
QSize size
Definition CursorTheme.hpp:69
Definition CursorTheme.hpp:116
QPoint pixelHotspot
The pixel of the pixmap the platform puts the hotspot on.
Definition CursorTheme.hpp:123
QSize pixelSize
Size and device pixel ratio of the pixmap to build the QCursor from.
Definition CursorTheme.hpp:118
QPoint renderOffset
Definition CursorTheme.hpp:127
QPoint hotspot
What to give QCursor as hotspot on that platform.
Definition CursorTheme.hpp:121