blob: 06b0a321bd5761559b7b6f69842d08ef6fad5d82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "NhekoCursorShape.h"
#include <QCursor>
NhekoCursorShape::NhekoCursorShape(QQuickItem *parent)
: QQuickItem(parent)
, currentShape_(Qt::CursorShape::ArrowCursor)
{}
Qt::CursorShape
NhekoCursorShape::cursorShape() const
{
return cursor().shape();
}
void
NhekoCursorShape::setCursorShape(Qt::CursorShape cursorShape)
{
if (currentShape_ == cursorShape)
return;
currentShape_ = cursorShape;
setCursor(cursorShape);
emit cursorShapeChanged();
}
|