CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Friends | List of all members
ctkVTKConnection Class Reference

#include <Libs/Visualization/VTK/Core/ctkVTKConnection.h>

Inheritance diagram for ctkVTKConnection:
Inheritance graph
[legend]
Collaboration diagram for ctkVTKConnection:
Collaboration graph
[legend]

Public Types

typedef QObject Superclass
 

Signals

void emitExecute (vtkObject *caller, vtkObject *call_data)
 
void emitExecute (vtkObject *caller, void *call_data, unsigned long vtk_event, void *client_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)
 

Detailed Description

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.

Member Typedef Documentation

Definition at line 49 of file ctkVTKConnection.h.

Constructor & Destructor Documentation

ctkVTKConnection::ctkVTKConnection ( QObject *  parent)
explicit
virtual ctkVTKConnection::~ctkVTKConnection ( )
virtual
ctkVTKConnection::ctkVTKConnection ( ctkVTKConnectionPrivate *  pimpl,
QObject *  _parent 
)
protected

Member Function Documentation

virtual void ctkVTKConnection::addObserver ( vtkObject *  caller,
unsigned long  vtk_event,
vtkCallbackCommand *  callback,
float  priority = 0.0f 
)
protectedvirtual
bool ctkVTKConnection::deletionObserved ( ) const
void ctkVTKConnection::disconnect ( )
protected
void ctkVTKConnection::emitExecute ( vtkObject *  caller,
vtkObject *  call_data 
)
signal

The qt signal emited by the VTK Callback The signal corresponding to the slot will be emited

void ctkVTKConnection::emitExecute ( vtkObject *  caller,
void *  call_data,
unsigned long  vtk_event,
void *  client_data 
)
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)));

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 bool ctkVTKConnection::isValid ( vtkObject *  vtk_obj,
unsigned long  vtk_event,
const QObject *  qt_obj,
const char *  qt_slot 
)
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

void ctkVTKConnection::qobjectDeleted ( )
protectedslot
virtual void ctkVTKConnection::removeObserver ( vtkObject *  caller,
unsigned long  vtk_event,
vtkCallbackCommand *  callback 
)
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.

See also
object(), vtkobject()
QString ctkVTKConnection::shortDescription ( )
static QString ctkVTKConnection::shortDescription ( vtkObject *  vtk_obj,
unsigned long  vtk_event,
const QObject *  qt_obj,
const char *  qt_slot = 0 
)
static
vtkObject* ctkVTKConnection::vtkobject ( ) const

Return the vtkObject set using setup() method.

void ctkVTKConnection::vtkObjectDeleted ( )
protectedslot

Friends And Related Function Documentation

QDebug operator<< ( QDebug  dbg,
const ctkVTKConnection connection 
)
friend

Member Data Documentation

QScopedPointer<ctkVTKConnectionPrivate> ctkVTKConnection::d_ptr
protected

Definition at line 119 of file ctkVTKConnection.h.


The documentation for this class was generated from the following file: