NorMIT-nav  22.09
An IGT application
cx::DisplayTextRep Class Reference

Display a number of text strings. More...

#include <cxDisplayTextRep.h>

Inheritance diagram for cx::DisplayTextRep:
cx::RepImpl cx::Rep

Public Member Functions

virtual QString getType () const
 
TextDisplayPtr addText (const QColor &color, const QString &text, const Vector3D &pos, int maxWidth=0, vtkViewport *vp=NULL)
 
void setText (unsigned i, const QString &text)
 
void setColor (const QColor &color)
 
void setFontSize (int size)
 
virtual ~DisplayTextRep ()
 
- Public Member Functions inherited from cx::RepImpl
 RepImpl (const QString &uid="", const QString &name="")
 
virtual ~RepImpl ()
 
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

static DisplayTextRepPtr New (const QString &uid="")
 
- Static Public Member Functions inherited from cx::RepImpl
template<class REP >
static boost::shared_ptr< REP > wrap_new (REP *object, QString uid)
 

Protected Member Functions

 DisplayTextRep ()
 
virtual void addRepActorsToViewRenderer (ViewPtr view)
 
virtual void removeRepActorsFromViewRenderer (ViewPtr view)
 
- Protected Member Functions inherited from cx::RepImpl
ViewPtr getView () const
 
vtkRendererPtr getRenderer ()
 
RepPtr getSelf ()
 
virtual void onModifiedStartRender ()
 
virtual void onEveryRender ()
 

Protected Attributes

std::vector< TextDisplayPtrmDisplayText
 

Additional Inherited Members

- Protected Slots inherited from cx::RepImpl
void setModified ()
 

Detailed Description

Display a number of text strings.

Display a number of text strings at fixed positions in the view. The positioning is done in normalized view space, i.e. the text is placed relative to the view and not the world.

Definition at line 42 of file cxDisplayTextRep.h.

Constructor & Destructor Documentation

◆ ~DisplayTextRep()

cx::DisplayTextRep::~DisplayTextRep ( )
virtual

Definition at line 32 of file cxDisplayTextRep.cpp.

◆ DisplayTextRep()

cx::DisplayTextRep::DisplayTextRep ( )
protected

Definition at line 27 of file cxDisplayTextRep.cpp.

Member Function Documentation

◆ addRepActorsToViewRenderer()

void cx::DisplayTextRep::addRepActorsToViewRenderer ( ViewPtr  view)
protectedvirtual

Implements cx::RepImpl.

Definition at line 40 of file cxDisplayTextRep.cpp.

◆ addText()

TextDisplayPtr cx::DisplayTextRep::addText ( const QColor &  color,
const QString &  text,
const Vector3D pos,
int  maxWidth = 0,
vtkViewport *  vp = NULL 
)

Add a text with give RGB color at pos. pos is in normalized view space.

Definition at line 55 of file cxDisplayTextRep.cpp.

◆ getType()

virtual QString cx::DisplayTextRep::getType ( ) const
inlinevirtual
Returns
a string identifying the Rep type. Each suclass implement this with its own class name. Subclasses from other namespaces (such as cx and snw) should add that namespace as a prefix.

Implements cx::RepImpl.

Definition at line 46 of file cxDisplayTextRep.h.

◆ New()

DisplayTextRepPtr cx::DisplayTextRep::New ( const QString &  uid = "")
static

Definition at line 36 of file cxDisplayTextRep.cpp.

◆ removeRepActorsFromViewRenderer()

void cx::DisplayTextRep::removeRepActorsFromViewRenderer ( ViewPtr  view)
protectedvirtual

Implements cx::RepImpl.

Definition at line 46 of file cxDisplayTextRep.cpp.

◆ setColor()

void cx::DisplayTextRep::setColor ( const QColor &  color)

set the color in all existing texts

Definition at line 97 of file cxDisplayTextRep.cpp.

◆ setFontSize()

void cx::DisplayTextRep::setFontSize ( int  size)

Definition at line 106 of file cxDisplayTextRep.cpp.

◆ setText()

void cx::DisplayTextRep::setText ( unsigned  i,
const QString &  text 
)

Set a text previously set with addText.

Definition at line 88 of file cxDisplayTextRep.cpp.

Member Data Documentation

◆ mDisplayText

std::vector<TextDisplayPtr> cx::DisplayTextRep::mDisplayText
protected

Definition at line 58 of file cxDisplayTextRep.h.


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