Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/xcursor/cursortheme.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | * the icon from that. | 45 | * the icon from that. | ||
46 | */ | 46 | */ | ||
47 | class CursorTheme | 47 | class CursorTheme | ||
48 | { | 48 | { | ||
49 | public: | 49 | public: | ||
50 | enum ItemDataRole { | 50 | enum ItemDataRole { | ||
51 | // Note: use printf "0x%08X\n" $(($RANDOM*$RANDOM)) | 51 | // Note: use printf "0x%08X\n" $(($RANDOM*$RANDOM)) | ||
52 | // to define additional roles. | 52 | // to define additional roles. | ||
53 | DisplayDetailRole = 0x24A3DAF8 | 53 | DisplayDetailRole = 0x24A3DAF8, | ||
54 | IsWritableRole | ||||
54 | }; | 55 | }; | ||
55 | 56 | | |||
56 | CursorTheme() {} | 57 | CursorTheme() {} | ||
57 | CursorTheme(const QString &title, const QString &description = QString()); | 58 | CursorTheme(const QString &title, const QString &description = QString()); | ||
58 | virtual ~CursorTheme() {} | 59 | virtual ~CursorTheme() {} | ||
59 | 60 | | |||
60 | const QString title() const { return m_title; } | 61 | const QString title() const { return m_title; } | ||
61 | const QString description() const { return m_description; } | 62 | const QString description() const { return m_description; } | ||
Show All 21 Lines | |||||
83 | /// QPixmap::fromImage(loadImage()); | 84 | /// QPixmap::fromImage(loadImage()); | ||
84 | virtual QPixmap loadPixmap(const QString &name, int size = 0) const; | 85 | virtual QPixmap loadPixmap(const QString &name, int size = 0) const; | ||
85 | 86 | | |||
86 | /// Loads the cursor @p name, with the nominal size @p size. | 87 | /// Loads the cursor @p name, with the nominal size @p size. | ||
87 | /// If the theme doesn't have the cursor @p name, it should return | 88 | /// If the theme doesn't have the cursor @p name, it should return | ||
88 | /// the default cursor from the active theme instead. | 89 | /// the default cursor from the active theme instead. | ||
89 | virtual qulonglong loadCursor(const QString &name, int size = 0) const = 0; | 90 | virtual qulonglong loadCursor(const QString &name, int size = 0) const = 0; | ||
90 | 91 | | |||
92 | virtual int defaultCursorSize() const = 0; | ||||
93 | | ||||
91 | /** Creates the icon returned by @ref icon(). Don't use this function | 94 | /** Creates the icon returned by @ref icon(). Don't use this function | ||
92 | directly but use @ref icon() instead, because @ref icon() caches | 95 | directly but use @ref icon() instead, because @ref icon() caches | ||
93 | the icon. | 96 | the icon. | ||
94 | @returns A pixmap with a cursor (usually left_ptr) that can | 97 | @returns A pixmap with a cursor (usually left_ptr) that can | ||
95 | be used as icon for this theme. The size is adopted to | 98 | be used as icon for this theme. The size is adopted to | ||
96 | standard icon sizes.*/ | 99 | standard icon sizes.*/ | ||
97 | virtual QPixmap createIcon() const; | 100 | virtual QPixmap createIcon() const; | ||
98 | /** @returns A pixmap with a cursor (usually left_ptr) that can | 101 | /** @returns A pixmap with a cursor (usually left_ptr) that can | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |