#include <signal_multiplexer.h>
Classes | |
struct | Connection |
Public Slots | |
void | setCurrentObject (QObject *newObject) |
Signals | |
void | currentObjectChanged (QObject *newObject) |
Public Member Functions | |
void | connect (QObject *sender, const char *signal, const char *slot) |
void | connect (const char *signal, QObject *receiver, const char *slot) |
QObject * | currentObject () const |
bool | disconnect (QObject *sender, const char *signal, const char *slot) |
bool | disconnect (const char *signal, QObject *receiver, const char *slot) |
SignalMultiplexer (QObject *parent=0) | |
Private Member Functions | |
void | connect (const Connection &conn) |
void | disconnect (const Connection &conn) |
Private Attributes | |
QList< Connection > | connections |
QPointer< QObject > | object |
Definition at line 52 of file signal_multiplexer.h.
pcl::cloud_composer::SignalMultiplexer::SignalMultiplexer | ( | QObject * | parent = 0 | ) |
Definition at line 4 of file signal_multiplexer.cpp.
void pcl::cloud_composer::SignalMultiplexer::connect | ( | QObject * | sender, |
const char * | signal, | ||
const char * | slot | ||
) |
Use this connect function instead of QObject::connect() to connect an actions activation signal to the receiving, multiplexed object.
sender | the sending action or object |
signal | the signal in the sender object that is connected to |
slot | the slot in the receiving object that is set through setCurrentObject that the signal should be connected to. |
Definition at line 12 of file signal_multiplexer.cpp.
void pcl::cloud_composer::SignalMultiplexer::connect | ( | const char * | signal, |
QObject * | receiver, | ||
const char * | slot | ||
) |
Use this connect function instead of QObject::connect() to connect a multiplexed object's (status) signal to an action object's slot.
signal | the signal in the multiplexed sender object that is set through setCurrentObject that the connection should be from |
receiver | the receiving action or object |
slot | the slot in the receiving object |
Definition at line 25 of file signal_multiplexer.cpp.
void pcl::cloud_composer::SignalMultiplexer::connect | ( | const Connection & | conn | ) | [private] |
Definition at line 76 of file signal_multiplexer.cpp.
QObject* pcl::cloud_composer::SignalMultiplexer::currentObject | ( | ) | const [inline] |
Definition at line 109 of file signal_multiplexer.h.
void pcl::cloud_composer::SignalMultiplexer::currentObjectChanged | ( | QObject * | newObject | ) | [signal] |
Emitted when a new object is set to receive the signals managed by this SignalMultiplexer instance.
bool pcl::cloud_composer::SignalMultiplexer::disconnect | ( | QObject * | sender, |
const char * | signal, | ||
const char * | slot | ||
) |
Disconnects a signal connection from a sending object to a multiplexed receiving object.
Definition at line 38 of file signal_multiplexer.cpp.
bool pcl::cloud_composer::SignalMultiplexer::disconnect | ( | const char * | signal, |
QObject * | receiver, | ||
const char * | slot | ||
) |
Disconencts a signal from a multiplexed object to a receiving (action) object.
Definition at line 57 of file signal_multiplexer.cpp.
void pcl::cloud_composer::SignalMultiplexer::disconnect | ( | const Connection & | conn | ) | [private] |
Definition at line 91 of file signal_multiplexer.cpp.
void pcl::cloud_composer::SignalMultiplexer::setCurrentObject | ( | QObject * | newObject | ) | [slot] |
Sets the current object the signals that are managed by the SignalMultiplexer instance should be connected to. Any connections of these signals to the previous object will be disconnected. After the connections are hooked to the new object, the currentObjectChanged signal will be emitted.
newObject | the new object that the signals should be connected to |
Definition at line 107 of file signal_multiplexer.cpp.
QList<Connection> pcl::cloud_composer::SignalMultiplexer::connections [private] |
Definition at line 147 of file signal_multiplexer.h.
QPointer<QObject> pcl::cloud_composer::SignalMultiplexer::object [private] |
Definition at line 146 of file signal_multiplexer.h.