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

QExtend::Receiver Class Reference

Interfaces a QObject instance with one of its slot or signal that will be connected to a signal. More...

#include <connector.hpp>

List of all members.

Public Member Functions

 Receiver (const QObject *obj=0, const char *slot=0)
 Create a Receiver.
 Receiver (const char *slot)
 Create a Receiver.
const QObject * receiver () const
 Give interfaced QObject Receiver. If QObject has been deleted, this function return 0.
const char * slot () const
 Give interfaced slot signature.
void replaceObject (const QObject *obj)
 Replace interfaced QObject.
void replaceSlot (const char *slot)
 Replace slot signature.
void replaceReceiver (const QObject *obj, const char *slot)
 Replace interfaced QObject ans slot signature.
const Receiveroperator<< (const Emitter &e) const
 Connect an Emitter to Receiver.
const Receiveroperator<< (Qt::ConnectionType type) const
 Modify the next connexion type.

Detailed Description

Interfaces a QObject instance with one of its slot or signal that will be connected to a signal.

Receiver is used to simplify connection lisibility with connect coded like streams. Receiver could be connected to an Emitter.

Definition at line 245 of file connector.hpp.


Constructor & Destructor Documentation

QExtend::Receiver::Receiver ( const QObject *  obj = 0,
const char *  slot = 0 
)

Create a Receiver.

Create a Receiver

Parameters:
obj QObject pointer.
slot Object slot signature. like normale connect, you should use SLOT macro.
QExtend::Receiver::Receiver ( const char *  slot  ) 

Create a Receiver.

Create a Receiver to a spécific slot

Parameters:
slot Object slot signature. like normale connect, you should use SLOT macro.

Member Function Documentation

const Receiver& QExtend::Receiver::operator<< ( const Emitter e  )  const

Connect an Emitter to Receiver.

Connect an Emitter to Receiver

Parameters:
e Emitter source.
const Receiver& QExtend::Receiver::operator<< ( Qt::ConnectionType  type  )  const

Modify the next connexion type.

By default connexion type is Qt::AutoConnection. After the next connexion, type is reinitialized to Qt::AutoConnection.

Parameters:
type Connexion type.
const QObject* QExtend::Receiver::receiver (  )  const

Give interfaced QObject Receiver. If QObject has been deleted, this function return 0.

void QExtend::Receiver::replaceObject ( const QObject *  obj  ) 

Replace interfaced QObject.

Replace interfaced QObject

Parameters:
obj QObject pointer.
void QExtend::Receiver::replaceReceiver ( const QObject *  obj,
const char *  slot 
)

Replace interfaced QObject ans slot signature.

Create a Receiver

Parameters:
obj QObject pointer.
slot Object slot signature. like normale connect, you should use SLOT macro.
void QExtend::Receiver::replaceSlot ( const char *  slot  ) 

Replace slot signature.

Replace slot signature.

Parameters:
slot Object slot signature. like normale connect, you should use SLOT macro.
const char* QExtend::Receiver::slot (  )  const

Give interfaced slot signature.

Responsable bénévole de la rubrique Qt : Thibaut Cuvelier -