summaryrefslogtreecommitdiffstats
path: root/src/ui/NhekoCursorShape.h
blob: 123852f9bfb34201906593f85cab1ded34353879 (plain)
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
26
27
28
29
30
// SPDX-FileCopyrightText: Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later

#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
    QML_ELEMENT
    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();
};