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  · 

QSlotInvoker Class Reference
[QtBaseModule]

The QSlotInvoker class provides an interface for invoking slots with explicit arguments More...

    #include <QSlotInvoker>

Inherits QObject.

Public Functions

  • 29 public functions inherited from QObject

Public Slots

  • QVariant invoke ( const QList<QVariant> & args )
  • 1 public slot inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 signal inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QSlotInvoker class provides an interface for invoking slots with explicit arguments

IPC mechanisms need to intercept protocol messages and convert them into slot invocations, but it is generally impractical to create explicit code for every slot that needs to be dispatched. The QSlotInvoker class allows an IPC dispatching mechanism to invoke slots in a generic fashion using the invoke() method.

Methods that are marked with Q_INVOKABLE or Q_SCRIPTABLE can also be invoked with this class.

See also QSignalIntercepter.


Member Function Documentation

QSlotInvoker::QSlotInvoker ( QObject * receiver, const QByteArray & member, QObject * parent = 0 )

Create a slot invoker that can invoke member on receiver. The object will be attached to parent, if present.

QSlotInvoker::~QSlotInvoker ()

Destroy a slot invoker.

bool QSlotInvoker::canInvoke ( int numArgs ) const

Returns true if the member can be invoked with numArgs arguments. That is, the receiver has not been destroyed, the member is present, and it requires numArgs or less arguments.

QVariant QSlotInvoker::invoke ( const QList<QVariant> & args )   [slot]

Invokes the slot represented by this object with the argument list args. The slot's return value is returned from this method. If the slot's return type is "void", then a QVariant instance of type QVariant::Invalid will be returned.

If it is possible that the slot may throw an exception, it is the responsibility of the caller to catch and handle the exception.

QByteArray QSlotInvoker::member () const

Returns the member that will receiver slot invocations.

bool QSlotInvoker::memberPresent () const

Returns true if the member is present on the object.

int * QSlotInvoker::parameterTypes () const

Returns the parameter types associated with this member.

int QSlotInvoker::parameterTypesCount () const

Returns the number of parameter types associated with this member.

QObject * QSlotInvoker::receiver () const

Returns the object that will receive slot invocations.

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 qtextended4.4
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