Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QDBusAbstractAdaptor Class Reference

The QDBusAbstractAdaptor class is the base class of D-Bus adaptor classes. More...

 #include <QDBusAbstractAdaptor>

Inherits: QObject.

This class was introduced in Qt 4.2.

Public Functions

~QDBusAbstractAdaptor ()
  • 29 public functions inherited from QObject

Protected Functions

QDBusAbstractAdaptor ( QObject * obj )
bool autoRelaySignals () const
void setAutoRelaySignals ( bool enable )
  • 8 protected functions inherited from QObject

Macros

Q_NOREPLY

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 signal inherited from QObject
  • 7 static public members inherited from QObject

Detailed Description

The QDBusAbstractAdaptor class is the base class of D-Bus adaptor classes.

The QDBusAbstractAdaptor class is the starting point for all objects intending to provide interfaces to the external world using D-Bus. This is accomplished by attaching a one or more classes derived from QDBusAbstractAdaptor to a normal QObject and then registering that QObject with QDBusConnection::registerObject. QDBusAbstractAdaptor objects are intended to be light-weight wrappers, mostly just relaying calls into the real object (its parent) and the signals from it.

Each QDBusAbstractAdaptor-derived class should define the D-Bus interface it is implementing using the Q_CLASSINFO macro in the class definition. Note that only one interface can be exposed in this way.

QDBusAbstractAdaptor uses the standard QObject mechanism of signals, slots and properties to determine what signals, methods and properties to export to the bus. Any signal emitted by QDBusAbstractAdaptor-derived classes will be automatically be relayed through any D-Bus connections the object is registered on.

Classes derived from QDBusAbstractAdaptor must be created on the heap using the new operator and must not be deleted by the user (they will be deleted automatically when the object they are connected to is also deleted).

See also Using adaptors and QDBusConnection.

Member Function Documentation

QDBusAbstractAdaptor::QDBusAbstractAdaptor ( QObject * obj ) [protected]

Constructs a QDBusAbstractAdaptor with obj as the parent object.

QDBusAbstractAdaptor::~QDBusAbstractAdaptor ()

Destroys the adaptor.

Warning: Adaptors are destroyed automatically when the real object they refer to is destroyed. Do not delete the adaptors yourself.

bool QDBusAbstractAdaptor::autoRelaySignals () const [protected]

Returns true if automatic signal relaying from the real object (see object()) is enabled, otherwiser returns false.

See also setAutoRelaySignals().

void QDBusAbstractAdaptor::setAutoRelaySignals ( bool enable ) [protected]

Toggles automatic signal relaying from the real object (see object()).

Automatic signal relaying consists of signal-to-signal connection of the signals on the parent that have the exact same method signatue in both classes.

If enable is set to true, connect the signals; if set to false, disconnect all signals.

See also autoRelaySignals().

Macro Documentation

Q_NOREPLY

The Q_NOREPLY macro can be used to mark a method to be called and not wait for it to finish processing before returning from QDBusInterface::call(). The called method cannot return any output arguments and, if it does, any such arguments will be discarded.

You can use this macro in your own adaptors by placing it before your method's return value (which must be "void") in the class declaration, as shown in the example:

 Q_NOREPLY void myMethod();

Its presence in the method implementation (outside the class declaration) is optional.

This function was introduced in Qt 4.2.

See also Using QtDBus Adaptors.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.8
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web