1/*
2 * This file was generated by qdbusxml2cpp version 0.7
3 * Command line was: qdbusxml2cpp -N -p qibusproxy -c QIBusProxy interfaces/org.freedesktop.IBus.xml
4 *
5 * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd.
6 *
7 * This is an auto-generated file.
8 * This file may have been hand-edited. Look for HAND-EDIT comments
9 * before re-generating it.
10 */
11
12#include <QtDBus/qdbusextratypes.h>
13
14#include "qibusproxy.h"
15
16#include <QDBusReply>
17
18/*
19 * Implementation of interface class QIBusProxy
20 */
21
22QIBusProxy::QIBusProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
23 : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
24{
25 this->connection().connect(service,
26 path,
27 interface: this->interface(), // interface
28 QStringLiteral("GlobalEngineChanged"),
29 argumentMatch: QStringList(),
30 signature: QString(), // signature
31 receiver: this, SLOT(globalEngineChanged(QString)));
32}
33
34QIBusProxy::~QIBusProxy()
35{
36}
37
38#ifdef QIBUS_GET_ADDRESS
39QString QIBusProxy::getAddress()
40{
41 QDBusReply<QDBusVariant> reply = Address();
42 QVariant variant = reply.value().variant();
43 if (!variant.isValid())
44 return QString();
45 return variant.toString();
46}
47#endif
48
49#ifdef QIBUS_GET_ENGINES
50QList<QIBusEngineDesc> QIBusProxy::getEngines()
51{
52 QList<QIBusEngineDesc> engines;
53 QDBusReply<QDBusVariant> reply = Engines();
54 QVariant variant = reply.value().variant();
55 if (!variant.isValid())
56 return engines;
57 const QDBusArgument argument = variant.value<QDBusArgument>();
58 qCDebug(qtQpaInputMethodsSerialize) << "QIBusProxy::getEngines()" << argument.currentSignature();
59
60 int i = 1;
61 argument.beginMap();
62 while (!argument.atEnd()) {
63 QDBusVariant value;
64 argument >> value;
65 if (!value.variant().isValid()) {
66 qWarning() << "Warning in QIBusProxy::getEngines():" << QString::asprintf("%dth variant is wrong", i);
67 break;
68 }
69 const QDBusArgument desc_arg = value.variant().value<QDBusArgument>();
70
71 QIBusEngineDesc desc;
72 desc_arg >> desc;
73 engines.append(desc);
74 ++i;
75 }
76 argument.endMap();
77 return engines;
78}
79#endif
80
81QIBusEngineDesc QIBusProxy::getGlobalEngine()
82{
83 QIBusEngineDesc desc;
84 QDBusReply<QDBusVariant> reply = GlobalEngine();
85 QVariant variant = reply.value().variant();
86 if (!variant.isValid())
87 return desc;
88 QVariant child = qvariant_cast<QDBusVariant>(v: variant).variant();
89 if (!child.isValid())
90 return desc;
91 const QDBusArgument argument = qvariant_cast<QDBusArgument>(v: child);
92 argument >> desc;
93 return desc;
94}
95
96void QIBusProxy::globalEngineChanged(const QString &engine_name)
97{
98 emit GlobalEngineChanged(engine_name);
99}
100
101#include "moc_qibusproxy.cpp"
102

source code of qtbase/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp