CustusX
2023.01.05-dev+develop.0da12
An IGT application
|
Display a number of text strings. More...
#include <cxDisplayTextRep.h>
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< TextDisplayPtr > | mDisplayText |
Additional Inherited Members | |
Protected Slots inherited from cx::RepImpl | |
void | setModified () |
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.
|
virtual |
Definition at line 32 of file cxDisplayTextRep.cpp.
|
protected |
Definition at line 27 of file cxDisplayTextRep.cpp.
|
protectedvirtual |
Implements cx::RepImpl.
Definition at line 40 of file cxDisplayTextRep.cpp.
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.
|
inlinevirtual |
Implements cx::RepImpl.
Definition at line 46 of file cxDisplayTextRep.h.
|
static |
Definition at line 36 of file cxDisplayTextRep.cpp.
|
protectedvirtual |
Implements cx::RepImpl.
Definition at line 46 of file cxDisplayTextRep.cpp.
void cx::DisplayTextRep::setColor | ( | const QColor & | color | ) |
set the color in all existing texts
Definition at line 97 of file cxDisplayTextRep.cpp.
void cx::DisplayTextRep::setFontSize | ( | int | size | ) |
Definition at line 106 of file cxDisplayTextRep.cpp.
void cx::DisplayTextRep::setText | ( | unsigned | i, |
const QString & | text | ||
) |
Set a text previously set with addText.
Definition at line 88 of file cxDisplayTextRep.cpp.
|
protected |
Definition at line 58 of file cxDisplayTextRep.h.