17 #include "dashconnection.h"
19 #include <QDBusInterface>
20 #include <QDBusPendingCall>
33 class AsyncDBusInterface :
public QDBusAbstractInterface
36 AsyncDBusInterface(
const QString &service,
const QString &path,
37 const QString &interface,
const QDBusConnection &connection,
39 : QDBusAbstractInterface(service, path, interface.toLatin1().data(), connection, parent)
41 ~AsyncDBusInterface() =
default;
45 DashConnection::DashConnection(
const QString &service,
const QString &path,
const QString &interface, QObject *parent):
46 AbstractDBusServiceMonitor(service, path, interface, SessionBus, parent)
52 QDBusAbstractInterface* DashConnection::createInterface(
const QString &service,
const QString &path,
53 const QString &interface,
const QDBusConnection &connection)
55 return new AsyncDBusInterface(service, path, interface, connection);
58 void DashConnection::setCurrentScope(
int index,
bool animate,
bool isSwipe)
60 if (dbusInterface()) {
61 dbusInterface()->asyncCall(QStringLiteral(
"SetCurrentScope"), index, animate, isSwipe);