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:
Martin Gräßlin 2013-06-27 09:45:58 +02:00
parent d3c4a46c59
commit e18bb1006a
2 changed files with 8 additions and 2 deletions

View file

@ -300,7 +300,7 @@ xcb_cursor_t X11Cursor::createCursor(Qt::CursorShape shape)
return cursor;
}
QByteArray X11Cursor::cursorName(Qt::CursorShape shape) const
QByteArray Cursor::cursorName(Qt::CursorShape shape) const
{
switch (shape) {
case Qt::ArrowCursor:

View file

@ -99,6 +99,13 @@ public:
* @return int
*/
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
@ -219,7 +226,6 @@ private Q_SLOTS:
private:
X11Cursor(QObject *parent);
xcb_cursor_t createCursor(Qt::CursorShape shape);
QByteArray cursorName(Qt::CursorShape shape) const;
QHash<Qt::CursorShape, xcb_cursor_t > m_cursors;
xcb_timestamp_t m_timeStamp;
uint16_t m_buttonMask;