NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxDisplayTextRep.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #ifndef CXDISPLAYTEXTREP_H_
14 #define CXDISPLAYTEXTREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include <vector>
19 #include "cxRepImpl.h"
20 #include "cxVector3D.h"
21 #include "vtkForwardDeclarations.h"
22 #include "cxBoundingBox3D.h"
23 class QColor;
24 
25 namespace cx
26 {
27 typedef boost::shared_ptr<class TextDisplay> TextDisplayPtr;
28 
29 typedef boost::shared_ptr<class DisplayTextRep> DisplayTextRepPtr;
30 
42 class cxResourceVisualization_EXPORT DisplayTextRep : public RepImpl
43 {
44 public:
45  static DisplayTextRepPtr New(const QString& uid="");
46  virtual QString getType() const{ return "vm::DisplayTextRep";}
47  TextDisplayPtr addText(const QColor& color, const QString& text, const Vector3D& pos, int maxWidth=0, vtkViewport *vp=NULL);
48  void setText(unsigned i, const QString& text);
49  void setColor(const QColor& color );
50  void setFontSize(int size);
51  virtual ~DisplayTextRep();
52 
53 protected:
55  virtual void addRepActorsToViewRenderer(ViewPtr view);
56  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
57 
58  std::vector<TextDisplayPtr> mDisplayText;
59 };
60 
61 }//end namespace
62 
63 #endif /*CXDISPLAYTEXTREP_H_*/
cxRepImpl.h
cx::DisplayTextRep::getType
virtual QString getType() const
Definition: cxDisplayTextRep.h:46
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxBoundingBox3D.h
cxVector3D.h
cx::DisplayTextRep
Display a number of text strings.
Definition: cxDisplayTextRep.h:42
cx::TextDisplayPtr
boost::shared_ptr< class TextDisplay > TextDisplayPtr
Definition: cxForwardDeclarations.h:102
cx::DisplayTextRepPtr
boost::shared_ptr< class DisplayTextRep > DisplayTextRepPtr
Definition: cxForwardDeclarations.h:66
cx::DisplayTextRep::mDisplayText
std::vector< TextDisplayPtr > mDisplayText
Definition: cxDisplayTextRep.h:58
vtkForwardDeclarations.h
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42