BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members
BALL::VIEW::Label Class Reference

#include <BALL/VIEW/PRIMITIVES/label.h>

Inheritance diagram for BALL::VIEW::Label:
BALL::VIEW::GeometricObject BALL::VIEW::Vertex

Public Member Functions

Constructors
 Label ()
 
 Label (const Label &label)
 
Destructors
virtual ~Label ()
 
virtual void clear ()
 
Assignment methods
void set (const Label &label)
 
const Labeloperator= (const Label &label)
 
void swap (Label &label)
 
Inspectors, Mutators, Accessors
void setText (const String &text)
 
String getText () const
 
String getExpandedText () const
 
const QFont & getFont () const
 
void setFont (const QFont &font)
 
void setFontSize (Size size)
 
- Public Member Functions inherited from BALL::VIEW::GeometricObject
 GeometricObject ()
 
 GeometricObject (const GeometricObject &object)
 
virtual ~GeometricObject ()
 
void set (const GeometricObject &object)
 
GeometricObjectoperator= (const GeometricObject &object)
 
void swap (GeometricObject &object)
 
void setComposite (const Composite *composite)
 
const CompositegetComposite () const
 
void setColor (const ColorRGBA &color)
 
void setColor (const ColorUnit &red, const ColorUnit &green, const ColorUnit &blue, const ColorUnit &alpha=(float) 1)
 
const ColorRGBAgetColor () const
 
ColorRGBAgetColor ()
 
void getColor (ColorUnit &red, ColorUnit &green, ColorUnit &blue, ColorUnit &alpha) const
 
void getColors (HashSet< String > &colors)
 Insert the colors of this object into the hashset. More...
 
bool operator== (const GeometricObject &object) const
 Needed for MSVC. More...
 
bool operator< (const GeometricObject &object) const
 Needed for MSVC. More...
 
- Public Member Functions inherited from BALL::VIEW::Vertex
 Vertex ()
 
 Vertex (const Vertex &vertex)
 
virtual ~Vertex ()
 
void set (const Vertex &v)
 
const Vertexoperator= (const Vertex &v)
 
void swap (Vertex &v)
 
void setVertex (const Vector3 &v)
 
void setVertex (const float x, const float y, const float z)
 
Vector3getVertex ()
 
const Vector3getVertex () const
 
void getVertex (Vector3 &v) const
 
void getVertex (float &x, float &y, float &z) const
 
void setVertexAddress (const Vector3 &v)
 
void setDefaultVertexAddress ()
 
Vector3getVertexAddress () const
 
bool isDefaultVertexAddress () const
 

debuggers and diagnostics

String text_
 
QFont font_
 
virtual bool isValid () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
virtual void getVertices (vector< Vector3 > &vertices) const
 

Detailed Description

Label class. An instance of Label represents an instance of the geometric representation "label". A label is an information text that can be pinned to another Composite or GeometricObject. A label is both visible in the dynamic and static render mode of the Scene. A label has the following properties.

Definition at line 45 of file label.h.

Constructor & Destructor Documentation

BALL::VIEW::Label::Label ( )

Default Constructor. Construct new label. The properties of this label are set to:

  • color - to the color black
  • text - to the text "unkown"
  • vertex - to the vector (0,0,0)
    Returns
    Label new constructed label
    See Also
    GeometricObject
    Vertex
BALL::VIEW::Label::Label ( const Label label)

Copy constructor with cloning facility.

Parameters
labelthe label to be copied (cloned)
See Also
GeometricObject
Vertex
virtual BALL::VIEW::Label::~Label ( )
virtual

Destructor.

Member Function Documentation

virtual void BALL::VIEW::Label::clear ( )
virtual

Explicit default initialization. Calls GeometricObject::clear Calls Vertex::clear

See Also
GeometricObject::clear
Vertex::clear

Reimplemented from BALL::VIEW::Vertex.

virtual void BALL::VIEW::Label::dump ( std::ostream &  s = std::cout,
Size  depth = 0 
) const
virtual

Internal value dump. Dump the current value of this label to the output ostream s with dumping depth depth. Calls GeometricObject::dump. Calls Vertex::dump.

Parameters
soutput stream where to output the value of this label
depththe dumping depth
See Also
GeometricObject::dump
Vertex::dump

Reimplemented from BALL::VIEW::Vertex.

String BALL::VIEW::Label::getExpandedText ( ) const

Inspection of the expanded text of the label.

const QFont& BALL::VIEW::Label::getFont ( ) const
inline

Definition at line 131 of file label.h.

String BALL::VIEW::Label::getText ( ) const
inline

Inspection of the text of the label.

Definition at line 123 of file label.h.

virtual void BALL::VIEW::Label::getVertices ( vector< Vector3 > &  vertices) const
virtual

Reimplemented from BALL::VIEW::GeometricObject.

virtual bool BALL::VIEW::Label::isValid ( ) const
virtual

Internal state and consistency self-validation. Initiate self-validation of the internal state and data structure consistencies of this label. If the internal state of this label is correct (self-validated) and consistent true is returned, false otherwise. Calls GeometricObject::isValid. Calls Vertex::isValid.

Returns
bool true if the internal state of this label is correct (self-validated) and consistent, false otherwise
See Also
GeometricObject::isValid
Vertex::isValid

Reimplemented from BALL::VIEW::Vertex.

const Label& BALL::VIEW::Label::operator= ( const Label label)

Assignment operator. Calls set.

void BALL::VIEW::Label::set ( const Label label)

Assignment. Assign the label label to this label.

Parameters
labelthe label to be copied
void BALL::VIEW::Label::setFont ( const QFont &  font)
inline

Definition at line 134 of file label.h.

void BALL::VIEW::Label::setFontSize ( Size  size)
inline

Definition at line 137 of file label.h.

void BALL::VIEW::Label::setText ( const String text)
inline

Change the text of the label.

Definition at line 118 of file label.h.

void BALL::VIEW::Label::swap ( Label label)

Swapping of label's.

Member Data Documentation

QFont BALL::VIEW::Label::font_
protected

Definition at line 174 of file label.h.

String BALL::VIEW::Label::text_
protected

Definition at line 173 of file label.h.