My Project
Loading...
Searching...
No Matches
MirMousePointerInterface.h
1/*
2 * Copyright (C) 2015-2016 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIR_MOUSE_POINTER_INTERFACE_H
18#define MIR_MOUSE_POINTER_INTERFACE_H
19
20#include <QQuickItem>
21
29class MirMousePointerInterface : public QQuickItem {
30 Q_OBJECT
31
36 Q_PROPERTY(QString cursorName READ cursorName NOTIFY cursorNameChanged)
37
38
43 Q_PROPERTY(QString themeName READ themeName NOTIFY themeNameChanged)
44
45public:
49 MirMousePointerInterface(QQuickItem *parent = nullptr) : QQuickItem(parent) {}
50
52 virtual void setCursorName(const QString &cursorName) = 0;
53 virtual QString cursorName() const = 0;
54
55 virtual void setThemeName(const QString &themeName) = 0;
56 virtual QString themeName() const = 0;
57
58 virtual void moveTo(const QPoint& position) = 0;
60
68 virtual void setCustomCursor(const QCursor &) = 0;
69
70Q_SIGNALS:
72 void cursorNameChanged(QString name);
73 void themeNameChanged(QString name);
75};
76
77#endif // MIR_MOUSE_POINTER_INTERFACE_H
The QML mouse pointer.
Definition MirMousePointerInterface.h:29
MirMousePointerInterface(QQuickItem *parent=nullptr)
The constructor.
Definition MirMousePointerInterface.h:49
QString themeName
Name of the cursor theme Defines the look of the mouse pointer along with cursorName Its default valu...
Definition MirMousePointerInterface.h:43
QString cursorName
Name of the cursor Defines the look of the mouse pointer along with themeName.
Definition MirMousePointerInterface.h:36
virtual void setCustomCursor(const QCursor &)=0
Sets the custom cursor.