summary refs log tree commit diff
path: root/src/ui/NhekoCursorShape.h
diff options
context:
space:
mode:
authorAkhil Nair <targetakhil@gmail.com>2021-02-14 00:04:27 -0500
committerGitHub <noreply@github.com>2021-02-14 00:04:27 -0500
commit84005404289da6c2be9f524b7b8c70a1be7ad565 (patch)
tree1de2d0fd5fb1aab4c5ea4604567edb0844ed3b26 /src/ui/NhekoCursorShape.h
parentreplaced with togglebutton using qtquickcontrols2 (diff)
parentAdd double tap to reply feature (diff)
downloadnheko-84005404289da6c2be9f524b7b8c70a1be7ad565.tar.xz
Merge branch 'master' into room_settings_qml
Diffstat (limited to 'src/ui/NhekoCursorShape.h')
-rw-r--r--src/ui/NhekoCursorShape.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ui/NhekoCursorShape.h b/src/ui/NhekoCursorShape.h
new file mode 100644

index 00000000..2eab5e42 --- /dev/null +++ b/src/ui/NhekoCursorShape.h
@@ -0,0 +1,26 @@ +#pragma once + +// see +// https://stackoverflow.com/questions/27821054/how-to-change-cursor-shape-in-qml-when-mousearea-is-covered-with-another-mousear/29382092#29382092 + +#include <QQuickItem> + +class NhekoCursorShape : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape NOTIFY + cursorShapeChanged) + +public: + explicit NhekoCursorShape(QQuickItem *parent = 0); + +private: + Qt::CursorShape cursorShape() const; + void setCursorShape(Qt::CursorShape cursorShape); + + Qt::CursorShape currentShape_; + +signals: + void cursorShapeChanged(); +};