IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QDBusVirtualObject Class

The QDBusVirtualObject class is used to handle several DBus paths with one class.

This class was introduced in Qt 5.1.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QDBusVirtualObject Class

  • Header: QDBusVirtualObject

  • Since: Qt 5.1

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Dbus)

    target_link_libraries(mytarget PRIVATE Qt6::Dbus)

  • qmake: QT += dbus

  • Inherits: QObject

  • Inherited By:

Detailed Description

 

Member Function Documentation

 

[explicit] QDBusVirtualObject::QDBusVirtualObject(QObject *parent = nullptr)

Constructs a QDBusVirtualObject with parent.

[virtual] QDBusVirtualObject::~QDBusVirtualObject()

Destroys the object, deleting all of its child objects.

[pure virtual] bool QDBusVirtualObject::handleMessage(const QDBusMessage &message, const QDBusConnection &connection)

This function needs to handle all messages to the path of the virtual object, when the SubPath option is specified. The service, path, interface and methods are all part of the message. Parameter connection is the connection handle. Must return true when the message is handled, otherwise false (will generate dbus error message).

[pure virtual] QString QDBusVirtualObject::introspect(const QString &path) const

This function needs to handle the introspection of the virtual object on path. It must return xml of the form:

 
Sélectionnez
<interface name="org.qtproject.QtDBus.MyObject" >
    <property access="readwrite" type="i" name="prop1" />
</interface>

If you pass the SubPath option, this introspection has to include all child nodes. Otherwise QDBus handles the introspection of the child nodes.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+