mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-02 07:08:48 +03:00
26 lines
515 B
C++
26 lines
515 B
C++
|
#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();
|
||
|
}
|