File indexing completed on 2024-05-05 03:56:28

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 "kirigamiplatform_export.h"
0016 
0017 namespace Kirigami
0018 {
0019 namespace Platform
0020 {
0021 /**
0022  * @class VirtualKeyboardWatcher virtualkeyboardwatcher.h <Kirigami/VirtualKeyboardWatcher>
0023  *
0024  * This class reports on the status of KWin's VirtualKeyboard DBus interface.
0025  *
0026  * @since 5.91
0027  */
0028 class KIRIGAMIPLATFORM_EXPORT VirtualKeyboardWatcher : public QObject
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033     VirtualKeyboardWatcher(QObject *parent = nullptr);
0034     ~VirtualKeyboardWatcher();
0035 
0036     Q_PROPERTY(bool available READ available NOTIFY availableChanged FINAL)
0037     bool available() const;
0038     Q_SIGNAL void availableChanged();
0039 
0040     Q_PROPERTY(bool enabled READ enabled NOTIFY enabledChanged FINAL)
0041     bool enabled() const;
0042     Q_SIGNAL void enabledChanged();
0043 
0044     Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL)
0045     bool active() const;
0046     Q_SIGNAL void activeChanged();
0047 
0048     Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged FINAL)
0049     bool visible() const;
0050     Q_SIGNAL void visibleChanged();
0051 
0052     Q_PROPERTY(bool willShowOnActive READ willShowOnActive NOTIFY willShowOnActiveChanged FINAL)
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 
0066 #endif // KIRIGAMI_VIRTUALKEYBOARDWATCHER