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/*
17 * Implementation of interface class QIBusProxy
18 */
19
20QIBusProxy::QIBusProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
21 : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
22{
23 this->connection().connect(service,
24 path,
25 interface: this->interface(), // interface
26 QStringLiteral("GlobalEngineChanged"),
27 argumentMatch: QStringList(),
28 signature: QString(), // signature
29 receiver: this, SLOT(globalEngineChanged(QString)));
30}
31
32QIBusProxy::~QIBusProxy()
33{
34}
35
36#ifdef QIBUS_GET_ADDRESS
37QString QIBusProxy::getAddress()
38{
39 QDBusReply<QDBusVariant> reply = Address();
40 QVariant variant = reply.value().variant();
41 if (!variant.isValid())
42 return QString();
43 return variant.toString();
44}
45#endif
46
47#ifdef QIBUS_GET_ENGINES
48QList<QIBusEngineDesc> QIBusProxy::getEngines()
49{
50 QList<QIBusEngineDesc> engines;
51 QDBusReply<QDBusVariant> reply = Engines();
52 QVariant variant = reply.value().variant();
53 if (!variant.isValid())
54 return engines;
55 const QDBusArgument argument = variant.value<QDBusArgument>();
56 qCDebug(qtQpaInputMethodsSerialize) << "QIBusProxy::getEngines()" << argument.currentSignature();
57
58 int i = 1;
59 argument.beginMap();
60 while (!argument.atEnd()) {
61 QDBusVariant value;
62 argument >> value;
63 if (!value.variant().isValid()) {
64 qWarning() << "Warning in QIBusProxy::getEngines():" << QString::asprintf("%dth variant is wrong", i);
65 break;
66 }
67 const QDBusArgument desc_arg = value.variant().value<QDBusArgument>();
68
69 QIBusEngineDesc desc;
70 desc_arg >> desc;
71 engines.append(desc);
72 ++i;
73 }
74 argument.endMap();
75 return engines;
76}
77#endif
78
79QIBusEngineDesc QIBusProxy::getGlobalEngine()
80{
81 QIBusEngineDesc desc;
82 QDBusReply<QDBusVariant> reply = GlobalEngine();
83 QVariant variant = reply.value().variant();
84 if (!variant.isValid())
85 return desc;
86 QVariant child = qvariant_cast<QDBusVariant>(v: variant).variant();
87 if (!child.isValid())
88 return desc;
89 const QDBusArgument argument = qvariant_cast<QDBusArgument>(v: child);
90 argument >> desc;
91 return desc;
92}
93
94void QIBusProxy::globalEngineChanged(const QString &engine_name)
95{
96 emit GlobalEngineChanged(engine_name);
97}
98
99

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