Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qspidbuscache.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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
7
8#if QT_CONFIG(accessibility)
9#include "cache_adaptor.h"
10
11#define QSPI_OBJECT_PATH_CACHE "/org/a11y/atspi/cache"
12
13QT_BEGIN_NAMESPACE
14
15using namespace Qt::StringLiterals;
16using namespace QtGuiPrivate; // for D-Bus accessibility wrappers
17
18/*!
19 \class QSpiDBusCache
20 \internal
21 \brief This class is responsible for the AT-SPI cache interface.
22
23 The idea behind the cache is that starting an application would
24 result in many dbus calls. The way GTK/Gail/ATK work is that
25 they create accessibles for all objects on startup.
26 In order to avoid querying all the objects individually via DBus
27 they get sent by using the GetItems call of the cache.
28
29 Additionally the AddAccessible and RemoveAccessible signals
30 are responsible for adding/removing objects from the cache.
31
32 Currently the Qt bridge chooses to ignore these.
33*/
34
35QSpiDBusCache::QSpiDBusCache(QDBusConnection c, QObject* parent)
36 : QObject(parent)
37{
38 new CacheAdaptor(this);
39 c.registerObject(QSPI_OBJECT_PATH_CACHE ""_L1, this, QDBusConnection::ExportAdaptors);
40}
41
42void QSpiDBusCache::emitAddAccessible(const QSpiAccessibleCacheItem& item)
43{
44 emit AddAccessible(item);
45}
46
47void QSpiDBusCache::emitRemoveAccessible(const QSpiObjectReference& item)
48{
49 emit RemoveAccessible(item);
50}
51
52QSpiAccessibleCacheArray QSpiDBusCache::GetItems()
53{
54 return QSpiAccessibleCacheArray();
55}
56
57QT_END_NAMESPACE
58
59#include "moc_qspidbuscache_p.cpp"
60#endif // QT_CONFIG(accessibility)