Fraxinus  18.10
An IGT application
cx::RepImpl Class Referenceabstract

Default implementation of Rep. More...

#include <cxRepImpl.h>

Inheritance diagram for cx::RepImpl:
cx::Rep cx::AxesRep cx::CrossHairRep2D cx::DataMetricRep cx::DisplayTextRep cx::FiberBundleRep cx::GeometricRep cx::GeometricRep2D cx::Image2DRep3D cx::LandmarkRep cx::MehdiGPURayCastMultiVolumeRepBase cx::MetricNamesRep cx::OrientationAnnotation3DRep cx::OrientationAnnotationRep cx::OrientationAnnotationSmartRep cx::PickerRep cx::SlicePlanes3DMarkerIn2DRep cx::SlicePlanes3DRep cx::SliceRepSW cx::Slices3DRep cx::Stream2DRep3D cx::Texture3DSlicerRep cx::ToolRep2D cx::ToolRep3D cx::VideoFixedPlaneRep cx::VolumetricBaseRep

Public Member Functions

 RepImpl (const QString &uid="", const QString &name="")
 
virtual ~RepImpl ()
 
virtual QString getType () const =0
 
virtual void connectToView (ViewPtr theView)
 
virtual void disconnectFromView (ViewPtr theView)
 
virtual bool isConnectedToView (ViewPtr theView) const
 
void setName (QString name)
 
QString getName () const
 
QString getUid () const
 
virtual void printSelf (std::ostream &os, Indent indent)
 
- Public Member Functions inherited from cx::Rep
virtual ~Rep ()
 

Static Public Member Functions

template<class REP >
static boost::shared_ptr< REP > wrap_new (REP *object, QString uid)
 

Protected Slots

void setModified ()
 

Protected Member Functions

ViewPtr getView () const
 
vtkRendererPtr getRenderer ()
 
RepPtr getSelf ()
 
virtual void onModifiedStartRender ()
 
virtual void addRepActorsToViewRenderer (ViewPtr view)=0
 
virtual void removeRepActorsFromViewRenderer (ViewPtr view)=0
 
virtual void onEveryRender ()
 

Detailed Description

Default implementation of Rep.

Subclass from here to get a concrete class.

The connection to View is handled here, but subclasses must implement at least:

Definition at line 42 of file cxRepImpl.h.

Constructor & Destructor Documentation

cx::RepImpl::RepImpl ( const QString &  uid = "",
const QString &  name = "" 
)
explicit

Definition at line 22 of file cxRepImpl.cpp.

cx::RepImpl::~RepImpl ( )
virtual

Definition at line 31 of file cxRepImpl.cpp.

Member Function Documentation

void cx::RepImpl::connectToView ( ViewPtr  theView)
virtual

Do not use this method! It is only used by View to set up an internal connection between the two.

Parameters
theViewThe view to add this representation to.
Returns

Implements cx::Rep.

Definition at line 55 of file cxRepImpl.cpp.

void cx::RepImpl::disconnectFromView ( ViewPtr  theView)
virtual

Do not use this method! It is only used by View to tear down an internal connection between the two.

Parameters
theViewThe view to disconnect from.
Returns

Implements cx::Rep.

Definition at line 65 of file cxRepImpl.cpp.

QString cx::RepImpl::getName ( ) const
virtual
Returns
a reps name

Implements cx::Rep.

Definition at line 40 of file cxRepImpl.cpp.

vtkRendererPtr cx::RepImpl::getRenderer ( )
protected

Definition at line 88 of file cxRepImpl.cpp.

RepPtr cx::RepImpl::getSelf ( )
inlineprotected

Definition at line 79 of file cxRepImpl.h.

QString cx::RepImpl::getUid ( ) const
virtual
Returns
a reps unique id

Implements cx::Rep.

Definition at line 45 of file cxRepImpl.cpp.

ViewPtr cx::RepImpl::getView ( ) const
protected

Definition at line 83 of file cxRepImpl.cpp.

bool cx::RepImpl::isConnectedToView ( ViewPtr  theView) const
virtual

Traverse the vector of views to see if this Representation is connected to one of them.

Parameters
theViewA view pointer.
Returns
True if theView was found in the internal vector of View pointers. false otherwise.

Implements cx::Rep.

Definition at line 50 of file cxRepImpl.cpp.

virtual void cx::RepImpl::onEveryRender ( )
inlineprotectedvirtual

Reimplemented in cx::CustomMetricRep.

Definition at line 85 of file cxRepImpl.h.

void cx::RepImpl::printSelf ( std::ostream &  os,
Indent  indent 
)
virtual

Implements cx::Rep.

Reimplemented in cx::Texture3DSlicerRep, and cx::SliceRepSW.

Definition at line 76 of file cxRepImpl.cpp.

void cx::RepImpl::setModified ( )
protectedslot

Definition at line 112 of file cxRepImpl.cpp.

void cx::RepImpl::setName ( QString  name)
virtual

Set the name of this Rep. This is useful for context-menus in Views and other user interaction constructs.

Parameters
nameThe user-friendly name for this instance.

Implements cx::Rep.

Definition at line 35 of file cxRepImpl.cpp.

template<class REP >
static boost::shared_ptr<REP> cx::RepImpl::wrap_new ( REP *  object,
QString  uid 
)
inlinestatic

Usage: Define functions in each subclass with the signature: static REPPtr New(QString uid="") { return wrap_new(new REP(), uid); }

Definition at line 62 of file cxRepImpl.h.


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