DBusCall QML Type

Qml export for providing a wrapper for sending a message over the DBus session bus. More...

Import Statement: import org.kde.kwin

Properties

Signals

Detailed Description

Allows to setup the connection arguments just like in QDBusMessage and supports adding arguments to the call. To invoke the message use the slot call().

If the call succeeds the signal finished() is emitted, if the call fails the signal failed() is emitted.

Note: the DBusCall always uses the session bus and performs an async call.

Example on how to use in Qml:

DBusCall {
    id: dbus
    service: "org.kde.KWin"
    path: "/KWin"
    method: "nextDesktop"
    Component.onCompleted: dbus.call()
}

Example with arguments:

DBusCall {
    id: dbus
    service: "org.kde.KWin"
    path: "/KWin"
    method: "setCurrentDesktop"
    arguments: [1]
    Component.onCompleted: dbus.call()
}

Example with a callback:

DBusCall {
     id: dbus
     service: "org.kde.KWin"
     path: "/KWin"
     method: "currentDesktop"
     onFinished: console.log(returnValue[0])
 }

Property Documentation

arguments : string

This property specifies the arguments that will be passed to the request.


dbusInterface : string

This property specifies the dbus interface. (service, path, dbusInterface, method) tuplet forms the destination address.


method : string

This property specifies the name of the method. (service, path, dbusInterface, method) tuplet forms the destination address.


path : string

This property specifies the dbus object path. (service, path, dbusInterface, method) tuplet forms the destination address.


service : string

This property specifies the dbus service name of the remote object. (service, path, dbusInterface, method) tuplet forms the destination address.


Signal Documentation

failed()

This signal is emitted if a dbus method call fails.

Note: The corresponding handler is onFailed.


finished(list<variant> returnValue)

This signal is emitted if a dbus method call finishes successfully. The returnValue specifies an optional return value.

Note: The corresponding handler is onFinished.