Changeset View
Changeset View
Standalone View
Standalone View
cursor.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | */ | 50 | */ | ||
51 | 51 | | |||
52 | 52 | | |||
53 | /** | 53 | /** | ||
54 | * @brief Wrapper round Qt::CursorShape with extensions enums into a single entity | 54 | * @brief Wrapper round Qt::CursorShape with extensions enums into a single entity | ||
55 | */ | 55 | */ | ||
56 | class KWIN_EXPORT CursorShape { | 56 | class KWIN_EXPORT CursorShape { | ||
57 | public: | 57 | public: | ||
58 | CursorShape() = default; | ||||
58 | CursorShape(Qt::CursorShape qtShape) { | 59 | CursorShape(Qt::CursorShape qtShape) { | ||
59 | m_shape = qtShape; | 60 | m_shape = qtShape; | ||
60 | } | 61 | } | ||
61 | CursorShape(KWin::ExtendedCursor::Shape kwinShape) { | 62 | CursorShape(KWin::ExtendedCursor::Shape kwinShape) { | ||
62 | m_shape = kwinShape; | 63 | m_shape = kwinShape; | ||
63 | } | 64 | } | ||
64 | bool operator==(const CursorShape &o) const { | 65 | bool operator==(const CursorShape &o) const { | ||
65 | return m_shape == o.m_shape; | 66 | return m_shape == o.m_shape; | ||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Line(s) | |||||
295 | 296 | | |||
296 | inline bool Cursor::isCursorTracking() const | 297 | inline bool Cursor::isCursorTracking() const | ||
297 | { | 298 | { | ||
298 | return m_cursorTrackingCounter > 0; | 299 | return m_cursorTrackingCounter > 0; | ||
299 | } | 300 | } | ||
300 | 301 | | |||
301 | } | 302 | } | ||
302 | 303 | | |||
304 | Q_DECLARE_METATYPE(KWin::CursorShape) | ||||
305 | | ||||
303 | #endif // KWIN_CURSOR_H | 306 | #endif // KWIN_CURSOR_H |