Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
5
#
include
"qspidbuscache_p.h"
6
#
include
"qspiaccessiblebridge_p.h"
7
8
#
if
QT_CONFIG
(
accessibility
)
9
#
include
"cache_adaptor_p.h"
10
11
#
define
QSPI_OBJECT_PATH_CACHE
"/org/a11y/atspi/cache"
12
13
QT_BEGIN_NAMESPACE
14
15
using
namespace
Qt::StringLiterals;
16
using
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
35
QSpiDBusCache::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
42
void
QSpiDBusCache::emitAddAccessible(
const
QSpiAccessibleCacheItem& item)
43
{
44
emit AddAccessible(item);
45
}
46
47
void
QSpiDBusCache::emitRemoveAccessible(
const
QSpiObjectReference& item)
48
{
49
emit RemoveAccessible(item);
50
}
51
52
QSpiAccessibleCacheArray QSpiDBusCache::GetItems()
53
{
54
return
QSpiAccessibleCacheArray();
55
}
56
57
QT_END_NAMESPACE
58
59
#
include
"moc_qspidbuscache_p.cpp"
60
#
endif
// QT_CONFIG(accessibility)
qtbase
src
gui
accessible
linux
qspidbuscache.cpp
Generated on
for Qt by
1.18.0