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, 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)
 

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

◆ Superclass

Definition at line 49 of file ctkVTKConnection.h.

Constructor & Destructor Documentation

◆ ctkVTKConnection() [1/2]

ctkVTKConnection::ctkVTKConnection ( QObject *  parent)
explicit

◆ ~ctkVTKConnection()

virtual ctkVTKConnection::~ctkVTKConnection ( )
virtual

◆ ctkVTKConnection() [2/2]

ctkVTKConnection::ctkVTKConnection ( ctkVTKConnectionPrivate *  pimpl,
QObject *  _parent 
)
protected

Member Function Documentation

◆ addObserver()

virtual void ctkVTKConnection::addObserver ( vtkObject *  caller,
unsigned long  vtk_event,
vtkCallbackCommand *  callback,
float  priority = 0.0f 
)
protectedvirtual

◆ deletionObserved()

bool ctkVTKConnection::deletionObserved ( ) const

◆ disconnect()

void ctkVTKConnection::disconnect ( )
protected

◆ emitExecute [1/2]

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)));

◆ emitExecute [2/2]

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

◆ id()

QString ctkVTKConnection::id ( ) const

Return a string uniquely identifying the connection within the current process

◆ isBlocked()

bool ctkVTKConnection::isBlocked ( ) const

◆ isEqual()

bool ctkVTKConnection::isEqual ( vtkObject *  vtk_obj,
unsigned long  vtk_event,
const QObject *  qt_obj,
const char *  qt_slot 
) const

◆ isValid()

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

◆ object()

QObject* ctkVTKConnection::object ( ) const

Return the QObject set using setup() method.

◆ observeDeletion()

void ctkVTKConnection::observeDeletion ( bool  enable)

false by default, it is slower to observe vtk object deletion

◆ qobjectDeleted

void ctkVTKConnection::qobjectDeleted ( )
protectedslot

◆ removeObserver()

virtual void ctkVTKConnection::removeObserver ( vtkObject *  caller,
unsigned long  vtk_event,
vtkCallbackCommand *  callback 
)
protectedvirtual

◆ setBlocked()

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.

◆ setup()

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()

◆ shortDescription() [1/2]

QString ctkVTKConnection::shortDescription ( )

◆ shortDescription() [2/2]

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

◆ vtkobject()

vtkObject* ctkVTKConnection::vtkobject ( ) const

Return the vtkObject set using setup() method.

◆ vtkObjectDeleted

void ctkVTKConnection::vtkObjectDeleted ( )
protectedslot

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ d_ptr

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: