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>
24Q_MOC_INCLUDE(<QtDBus/QDBusError>)
25
26#include "bus_interface.h"
27#include "properties_interface.h"
28
29QT_BEGIN_NAMESPACE
30
31class QDBusServiceWatcher;
32
33class QAtSpiDBusConnection : public QObject
34{
35 Q_OBJECT
36
37public:
38 QAtSpiDBusConnection(QObject *parent = nullptr);
39 QDBusConnection connection() const;
40 bool isEnabled() const { return m_enabled; }
41
42Q_SIGNALS:
43 // Emitted when the global accessibility status changes to enabled
44 void enabledChanged(bool enabled);
45
46private Q_SLOTS:
47 QString getAddressFromXCB();
48 void checkEnabledState();
49 void serviceUnregistered();
50 void connectA11yBus(const QString &address);
51
52 void dbusError(const QDBusError &error);
53
54private:
55 QString getAccessibilityBusAddress() const;
56
57 QDBusServiceWatcher *dbusWatcher;
58 OrgFreedesktopDBusPropertiesInterface *m_dbusProperties;
59 OrgA11yStatusInterface *m_a11yStatus;
60 QDBusConnection m_a11yConnection;
61 bool m_enabled;
62};
63
64QT_END_NAMESPACE
65
66#endif // DBUSCONNECTION_H
67

Provided by KDAB

Privacy Policy
Improve your Profiling and Debugging skills
Find out more

source code of qtbase/src/gui/accessible/linux/dbusconnection_p.h