Make mapping between Qt::CursorShape and theme name public
It's of general interest as Wayland cursor uses the same theme name.
This commit is contained in:
parent
d3c4a46c59
commit
e18bb1006a
2 changed files with 8 additions and 2 deletions
|
@ -300,7 +300,7 @@ xcb_cursor_t X11Cursor::createCursor(Qt::CursorShape shape)
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray X11Cursor::cursorName(Qt::CursorShape shape) const
|
QByteArray Cursor::cursorName(Qt::CursorShape shape) const
|
||||||
{
|
{
|
||||||
switch (shape) {
|
switch (shape) {
|
||||||
case Qt::ArrowCursor:
|
case Qt::ArrowCursor:
|
||||||
|
|
8
cursor.h
8
cursor.h
|
@ -99,6 +99,13 @@ public:
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
int themeSize() const;
|
int themeSize() const;
|
||||||
|
/**
|
||||||
|
* @brief The name of a cursor shape in the theme.
|
||||||
|
*
|
||||||
|
* @param shape The cursor for which the name needs to be known.
|
||||||
|
* @return QByteArray
|
||||||
|
*/
|
||||||
|
QByteArray cursorName(Qt::CursorShape shape) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current cursor position. This method does an update of the mouse position if
|
* Returns the current cursor position. This method does an update of the mouse position if
|
||||||
|
@ -219,7 +226,6 @@ private Q_SLOTS:
|
||||||
private:
|
private:
|
||||||
X11Cursor(QObject *parent);
|
X11Cursor(QObject *parent);
|
||||||
xcb_cursor_t createCursor(Qt::CursorShape shape);
|
xcb_cursor_t createCursor(Qt::CursorShape shape);
|
||||||
QByteArray cursorName(Qt::CursorShape shape) const;
|
|
||||||
QHash<Qt::CursorShape, xcb_cursor_t > m_cursors;
|
QHash<Qt::CursorShape, xcb_cursor_t > m_cursors;
|
||||||
xcb_timestamp_t m_timeStamp;
|
xcb_timestamp_t m_timeStamp;
|
||||||
uint16_t m_buttonMask;
|
uint16_t m_buttonMask;
|
||||||
|
|
Loading…
Reference in a new issue