1 | /* |
2 | * SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org> |
3 | * SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl> |
4 | * |
5 | * SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef KIRIGAMI_VIRTUALKEYBOARDWATCHER_H |
9 | #define KIRIGAMI_VIRTUALKEYBOARDWATCHER_H |
10 | |
11 | #include <memory> |
12 | |
13 | #include <QObject> |
14 | |
15 | #include "kirigamiplatform_export.h" |
16 | |
17 | namespace Kirigami |
18 | { |
19 | namespace Platform |
20 | { |
21 | /*! |
22 | * \class Kirigami::Platform::VirtualKeyboardWatcher |
23 | * \inmodule KirigamiPlatform |
24 | * \inheaderfile Kirigami/Platform/VirtualKeyboardWatcher |
25 | * |
26 | * \brief This class reports on the status of KWin's VirtualKeyboard DBus interface. |
27 | * |
28 | * \since 5.91 |
29 | */ |
30 | class KIRIGAMIPLATFORM_EXPORT VirtualKeyboardWatcher : public QObject |
31 | { |
32 | Q_OBJECT |
33 | |
34 | public: |
35 | VirtualKeyboardWatcher(QObject *parent = nullptr); |
36 | ~VirtualKeyboardWatcher(); |
37 | |
38 | /*! |
39 | * \property Kirigami::Platform::VirtualKeyboardWatcher::available |
40 | */ |
41 | Q_PROPERTY(bool available READ available NOTIFY availableChanged FINAL) |
42 | bool available() const; |
43 | Q_SIGNAL void availableChanged(); |
44 | |
45 | /*! |
46 | * \property Kirigami::Platform::VirtualKeyboardWatcher::enabled |
47 | */ |
48 | Q_PROPERTY(bool enabled READ enabled NOTIFY enabledChanged FINAL) |
49 | bool enabled() const; |
50 | Q_SIGNAL void enabledChanged(); |
51 | |
52 | /*! |
53 | * \property Kirigami::Platform::VirtualKeyboardWatcher::active |
54 | */ |
55 | Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL) |
56 | bool active() const; |
57 | Q_SIGNAL void activeChanged(); |
58 | |
59 | /*! |
60 | * \property Kirigami::Platform::VirtualKeyboardWatcher::visible |
61 | */ |
62 | Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged FINAL) |
63 | bool visible() const; |
64 | Q_SIGNAL void visibleChanged(); |
65 | |
66 | /*! |
67 | * \property Kirigami::Platform::VirtualKeyboardWatcher::willShowOnActive |
68 | */ |
69 | Q_PROPERTY(bool willShowOnActive READ willShowOnActive NOTIFY willShowOnActiveChanged FINAL) |
70 | bool willShowOnActive() const; |
71 | Q_SIGNAL void willShowOnActiveChanged(); |
72 | |
73 | static VirtualKeyboardWatcher *self(); |
74 | |
75 | private: |
76 | class Private; |
77 | const std::unique_ptr<Private> d; |
78 | }; |
79 | |
80 | } |
81 | } |
82 | |
83 | #endif // KIRIGAMI_VIRTUALKEYBOARDWATCHER |
84 | |