File indexing completed on 2024-05-12 15:42:39
0001 /* 0002 * SPDX-FileCopyrightText: 2018 Marco Martin <mart@kde.org> 0003 * SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KIRIGAMI_VIRTUALKEYBOARDWATCHER_H 0009 #define KIRIGAMI_VIRTUALKEYBOARDWATCHER_H 0010 0011 #include <memory> 0012 0013 #include <QObject> 0014 0015 #include "kirigami2_export.h" 0016 0017 namespace Kirigami 0018 { 0019 /** 0020 * @class VirtualKeyboardWatcher virtualkeyboardwatcher.h <Kirigami/VirtualKeyboardWatcher> 0021 * 0022 * This class reports on the status of KWin's VirtualKeyboard DBus interface. 0023 * 0024 * @since KDE Frameworks 5.91 0025 */ 0026 class KIRIGAMI2_EXPORT VirtualKeyboardWatcher : public QObject 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 VirtualKeyboardWatcher(QObject *parent = nullptr); 0032 ~VirtualKeyboardWatcher(); 0033 0034 Q_PROPERTY(bool available READ available NOTIFY availableChanged) 0035 bool available() const; 0036 Q_SIGNAL void availableChanged(); 0037 0038 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) 0039 bool enabled() const; 0040 void setEnabled(bool newEnabled); 0041 Q_SIGNAL void enabledChanged(); 0042 0043 Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) 0044 bool active() const; 0045 void setActive(bool newActive); 0046 Q_SIGNAL void activeChanged(); 0047 0048 Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged) 0049 bool visible() const; 0050 Q_SIGNAL void visibleChanged(); 0051 0052 Q_PROPERTY(bool willShowOnActive READ willShowOnActive NOTIFY willShowOnActiveChanged) 0053 bool willShowOnActive() const; 0054 Q_SIGNAL void willShowOnActiveChanged(); 0055 0056 static VirtualKeyboardWatcher *self(); 0057 0058 private: 0059 class Private; 0060 const std::unique_ptr<Private> d; 0061 }; 0062 0063 } 0064 0065 #endif // KIRIGAMI_VIRTUALKEYBOARDWATCHER