Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
dbusconnection_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
5#ifndef DBUSCONNECTION_H
6#define DBUSCONNECTION_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/QObject>
20#include <QtCore/QString>
21#include <QtDBus/QDBusConnection>
22#include <QtDBus/QDBusVariant>
23#include <QtCore/private/qglobal_p.h>
25
27
29
30class DBusConnection : public QObject
31{
33
34public:
35 DBusConnection(QObject *parent = nullptr);
37 bool isEnabled() const { return m_enabled; }
38
40 // Emitted when the global accessibility status changes to enabled
42
43private Q_SLOTS:
44 QString getAddressFromXCB();
45 void serviceRegistered();
46 void serviceUnregistered();
47 void connectA11yBus(const QString &address);
48
49 void dbusError(const QDBusError &error);
50
51private:
52 QString getAccessibilityBusAddress() const;
53
54 QDBusServiceWatcher *dbusWatcher;
55 QDBusConnection m_a11yConnection;
56 bool m_enabled;
57};
58
60
61#endif // DBUSCONNECTION_H
Connects to the accessibility dbus.
void enabledChanged(bool enabled)
bool isEnabled() const
\inmodule QtDBus
\inmodule QtDBus
Definition qdbuserror.h:21
The QDBusServiceWatcher class allows the user to watch for a bus service change.
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
DBusConnection * connection
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint GLuint64EXT address
#define Q_OBJECT
#define Q_SLOTS
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS