17#ifndef CURSOR_IMAGE_INFO_H
18#define CURSOR_IMAGE_INFO_H
20#include "CursorImageProvider.h"
26class CursorImageInfo :
public QObject
30 Q_PROPERTY(QString themeName READ themeName WRITE setThemeName NOTIFY themeNameChanged)
31 Q_PROPERTY(QString cursorName READ cursorName WRITE setCursorName NOTIFY cursorNameChanged)
32 Q_PROPERTY(qreal cursorHeight READ cursorHeight WRITE setCursorHeight NOTIFY cursorHeightChanged)
34 Q_PROPERTY(QPoint hotspot READ hotspot NOTIFY hotspotChanged)
35 Q_PROPERTY(qreal frameWidth READ frameWidth NOTIFY frameWidthChanged)
36 Q_PROPERTY(qreal frameHeight READ frameHeight NOTIFY frameHeightChanged)
37 Q_PROPERTY(
int frameCount READ frameCount NOTIFY frameCountChanged)
38 Q_PROPERTY(
int frameDuration READ frameDuration NOTIFY frameDurationChanged)
39 Q_PROPERTY(QUrl imageSource READ imageSource NOTIFY imageSourceChanged)
42 CursorImageInfo(QObject *parent =
nullptr);
44 QString themeName()
const {
return m_themeName; }
45 void setThemeName(
const QString &);
47 QString cursorName()
const {
return m_cursorName; }
48 void setCursorName(
const QString &);
50 qreal cursorHeight()
const {
return m_cursorHeight; }
51 void setCursorHeight(qreal);
53 QPoint hotspot()
const;
54 qreal frameWidth()
const;
55 qreal frameHeight()
const;
56 int frameCount()
const;
57 int frameDuration()
const;
58 QUrl imageSource()
const;
61 void themeNameChanged();
62 void cursorNameChanged();
63 void cursorHeightChanged();
64 void hotspotChanged();
65 void frameWidthChanged();
66 void frameHeightChanged();
67 void frameCountChanged();
68 void frameDurationChanged();
69 void imageSourceChanged();
77 qreal m_cursorHeight{0};
79 CursorImage *m_cursorImage{
nullptr};