![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Visualization/VTK/Core/ctkVTKConnection.h>
Public Types | |
typedef QObject | Superclass |
Signals | |
void | emitExecute (vtkObject *caller, void *call_data, unsigned long vtk_event, void *client_data) |
void | emitExecute (vtkObject *caller, vtkObject *call_data) |
Public Member Functions | |
ctkVTKConnection (QObject *parent) | |
bool | deletionObserved () const |
QString | id () const |
bool | isBlocked () const |
bool | isEqual (vtkObject *vtk_obj, unsigned long vtk_event, const QObject *qt_obj, const char *qt_slot) const |
QObject * | object () const |
Return the QObject set using setup() method. More... | |
void | observeDeletion (bool enable) |
false by default, it is slower to observe vtk object deletion More... | |
void | setBlocked (bool block) |
void | setup (vtkObject *vtk_obj, unsigned long vtk_event, const QObject *qt_obj, const char *qt_slot, float priority=0.f, Qt::ConnectionType connectionType=Qt::AutoConnection) |
QString | shortDescription () |
vtkObject * | vtkobject () const |
Return the vtkObject set using setup() method. More... | |
virtual | ~ctkVTKConnection () |
Static Public Member Functions | |
static bool | isValid (vtkObject *vtk_obj, unsigned long vtk_event, const QObject *qt_obj, const char *qt_slot) |
static QString | shortDescription (vtkObject *vtk_obj, unsigned long vtk_event, const QObject *qt_obj, const char *qt_slot=0) |
Protected Slots | |
void | qobjectDeleted () |
void | vtkObjectDeleted () |
Protected Member Functions | |
virtual void | addObserver (vtkObject *caller, unsigned long vtk_event, vtkCallbackCommand *callback, float priority=0.0f) |
ctkVTKConnection (ctkVTKConnectionPrivate *pimpl, QObject *_parent) | |
void | disconnect () |
virtual void | removeObserver (vtkObject *caller, unsigned long vtk_event, vtkCallbackCommand *callback) |
Protected Attributes | |
QScopedPointer< ctkVTKConnectionPrivate > | d_ptr |
Friends | |
QDebug | operator<< (QDebug dbg, const ctkVTKConnection &connection) |
Warning the slot must have its signature order: vtkObject*, vtkObject* : sender, callData or vtkObject*, void*, unsigned long, void*: sender, callData, eventId, clientData Of course the slot can contain less parameters, but always the same order though.
Definition at line 44 of file ctkVTKConnection.h.
typedef QObject ctkVTKConnection::Superclass |
Definition at line 49 of file ctkVTKConnection.h.
|
explicit |
|
virtual |
|
protected |
|
protectedvirtual |
bool ctkVTKConnection::deletionObserved | ( | ) | const |
|
protected |
|
signal |
Note: even if the signal has a signature with 4 args, you can connect it to a slot with less arguments as long as the types of the argument are matching: connect(obj1,SIGNAL(signalFunc(A,B,C,D)),obj2,SLOT(slotFunc(A)));
|
signal |
The qt signal emited by the VTK Callback The signal corresponding to the slot will be emited
QString ctkVTKConnection::id | ( | ) | const |
Return a string uniquely identifying the connection within the current process
bool ctkVTKConnection::isBlocked | ( | ) | const |
bool ctkVTKConnection::isEqual | ( | vtkObject * | vtk_obj, |
unsigned long | vtk_event, | ||
const QObject * | qt_obj, | ||
const char * | qt_slot | ||
) | const |
|
static |
Check the validity of the parameters. Parameters must be valid to add a connection
QObject* ctkVTKConnection::object | ( | ) | const |
Return the QObject set using setup() method.
void ctkVTKConnection::observeDeletion | ( | bool | enable | ) |
false by default, it is slower to observe vtk object deletion
|
protectedslot |
|
protectedvirtual |
void ctkVTKConnection::setBlocked | ( | bool | block | ) |
Temporarilly block any signals/slots. If the event is fired, the slot won't be called. You can restore the connection by calling SetBlocked with block = false.
void ctkVTKConnection::setup | ( | vtkObject * | vtk_obj, |
unsigned long | vtk_event, | ||
const QObject * | qt_obj, | ||
const char * | qt_slot, | ||
float | priority = 0.f , |
||
Qt::ConnectionType | connectionType = Qt::AutoConnection |
||
) |
Warning the slot must have its signature order: vtkObject*, vtkObject* : sender, callData or vtkObject*, void*, unsigned long, void*: sender, callData, eventId, clientData Of course the slot can contain less parameters, but always the same order though.
QString ctkVTKConnection::shortDescription | ( | ) |
|
static |
vtkObject* ctkVTKConnection::vtkobject | ( | ) | const |
Return the vtkObject set using setup() method.
|
protectedslot |
|
friend |
|
protected |
Definition at line 119 of file ctkVTKConnection.h.