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

QExtend::Emitter Class Reference

Interfaces a QObject instance with one of its signal. More...

#include <connector.hpp>

List of all members.

Public Member Functions

 Emitter (const QObject *obj=0, const char *signal=0)
 Create a Emitter.
 Emitter (const char *signal)
 Creates an Emitter to a specific signal.
const QObject * emitter () const
 Gives the interfaced QObject Emitter. If QObject has been deleted, this function returns 0.
const char * signal () const
 Gives the interfaced signal signature.
void replaceObject (const QObject *obj)
 Replaces the interfaced QObject.
void replaceSignal (const char *signal)
 Replaces the signal signature.
void replaceEmitter (const QObject *obj, const char *signal)
 Replaces the interfaced QObject and the signal signature.
const Emitteroperator>> (const Receiver &r) const
 Connects an Emitter to a Receiver.
const Emitteroperator>> (const Emitter &e) const
 Connects Emitter to another Emitter.
const Emitteroperator<< (const Emitter &e) const
const Emitteroperator>> (Qt::ConnectionType type) const
 Modify the next connexion type.

Detailed Description

Interfaces a QObject instance with one of its signal.

Emitter is use to simplify connexion lisibility with connect coding like a stream. Emitter could be connect to a Receiver or another Emitter.

Definition at line 41 of file connector.hpp.


Constructor & Destructor Documentation

QExtend::Emitter::Emitter ( const QObject *  obj = 0,
const char *  signal = 0 
)

Create a Emitter.

Create a Emitter

Parameters:
obj QObject pointer.
signal Object signal signature. Like normal connect, you should use SIGNAL macro.
QExtend::Emitter::Emitter ( const char *  signal  ) 

Creates an Emitter to a specific signal.

Creates an Emitter to a spécific signal

Parameters:
signal Object signal signature. like normale connect, you should use SIGNAL macro.

Member Function Documentation

const QObject* QExtend::Emitter::emitter (  )  const

Gives the interfaced QObject Emitter. If QObject has been deleted, this function returns 0.

const Emitter& QExtend::Emitter::operator<< ( const Emitter e  )  const
const Emitter& QExtend::Emitter::operator>> ( Qt::ConnectionType  type  )  const

Modify the next connexion type.

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

Parameters:
type Connection type.
const Emitter& QExtend::Emitter::operator>> ( const Emitter e  )  const

Connects Emitter to another Emitter.

Connect Emitter to another Emitter

Parameters:
e Emitter target.
const Emitter& QExtend::Emitter::operator>> ( const Receiver r  )  const

Connects an Emitter to a Receiver.

Connects an Emitter to a Receiver

Parameters:
r Target Receiver.
void QExtend::Emitter::replaceEmitter ( const QObject *  obj,
const char *  signal 
)

Replaces the interfaced QObject and the signal signature.

Replaces interfaced QObject and signal signature.

Parameters:
obj QObject pointer.
signal Object signal signature. Like normal connect, you should use SIGNAL macro.
void QExtend::Emitter::replaceObject ( const QObject *  obj  ) 

Replaces the interfaced QObject.

Replaces interfaced QObject

Parameters:
obj QObject pointer.
void QExtend::Emitter::replaceSignal ( const char *  signal  ) 

Replaces the signal signature.

Replace signal signature.

Parameters:
signal Object signal signature. Like normal connect, you should use SIGNAL macro.
const char* QExtend::Emitter::signal (  )  const

Gives the interfaced signal signature.

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