BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Protected Attributes | List of all members
BALL::VIEW::LabelModel Class Reference

#include <BALL/VIEW/MODELS/labelModel.h>

Inheritance diagram for BALL::VIEW::LabelModel:
BALL::VIEW::ModelProcessor BALL::UnaryProcessor< Composite > BALL::PropertyManager BALL::UnaryFunctor< Composite, Processor::Result >

Public Types

enum  Mode { ALL_ITEMS, ALL_ATOMS, ALL_RESIDUES, ONE_LABEL }
 

Public Member Functions

Constructors and Destructors
 LabelModel ()
 
 LabelModel (const LabelModel &model)
 
virtual ~LabelModel ()
 
void setFont (const QFont &font)
 
const QFont & getFont () const
 
void setColor (const ColorRGBA &color)
 
const ColorRGBAgetColor () const
 
void setMode (Mode mode)
 
Mode getType () const
 
void setText (const String &text)
 
const StringgetText () const
 
Processor specific methods
virtual Processor::Result operator() (Composite &composite)
 
virtual bool createGeometricObjects ()
 
- Public Member Functions inherited from BALL::VIEW::ModelProcessor
 ModelProcessor ()
 
 ModelProcessor (const ModelProcessor &model_processor)
 
virtual ~ModelProcessor ()
 
virtual void clear ()
 Clear all datastructures, but dont destroy the geometric objects. More...
 
virtual bool isValid () const
 
virtual void clearComposites ()
 
virtual void dump (std::ostream &, Size) const
 
GeometricObjectListgetGeometricObjects ()
 Return the list with the created geometric objects. More...
 
const GeometricObjectListgetGeometricObjects () const
 Return the list with the created geometric objects. More...
 
void setDrawingPrecision (Index precision)
 
Index getDrawingPrecision () const
 
void setSurfaceDrawingPrecision (float precision)
 
float getSurfaceDrawingPrecision () const
 
- Public Member Functions inherited from BALL::UnaryProcessor< Composite >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 
virtual bool start ()
 
virtual bool finish ()
 
- Public Member Functions inherited from BALL::PropertyManager
BALL_INLINE PropertyManager ()
 Default constructor. More...
 
BALL_INLINE PropertyManager (const PropertyManager &property_manager)
 Copy constructor. More...
 
virtual ~PropertyManager ()
 Destructor. More...
 
virtual void destroy ()
 Clears all properties. More...
 
void set (const PropertyManager &property_manager)
 
const PropertyManageroperator= (const PropertyManager &property_manager)
 
void get (PropertyManager &property_manager) const
 
void swap (PropertyManager &property_manager)
 
BitVectorgetBitVector ()
 
const BitVectorgetBitVector () const
 
 operator BitVector & ()
 
void setProperty (Property property)
 
void clearProperty (Property property)
 
void toggleProperty (Property property)
 
Size countProperties () const
 
const NamedPropertygetNamedProperty (Position index) const
 
NamedPropertygetNamedProperty (Position index)
 
void setProperty (const NamedProperty &property)
 
void setProperty (const string &name)
 
void setProperty (const string &name, bool value)
 
void setProperty (const string &name, int value)
 
void setProperty (const string &name, unsigned int value)
 
void setProperty (const string &name, float value)
 
void setProperty (const string &name, double value)
 
void setProperty (const string &name, const string &value)
 
void setProperty (const string &name, const PersistentObject &value)
 
const NamedPropertygetProperty (const string &name) const
 
NamedPropertyIterator beginNamedProperty ()
 
NamedPropertyIterator endNamedProperty ()
 
void clearProperty (const string &name)
 
Size countNamedProperties () const
 
bool hasProperty (Property property) const
 Query for an unnamed property. More...
 
bool hasProperty (const string &name) const
 Query for a named property. More...
 
bool operator== (const PropertyManager &pm) const
 
bool operator!= (const PropertyManager &pm) const
 Inequality operator. More...
 
void write (PersistenceManager &pm) const
 Persistent stream writing. More...
 
bool read (PersistenceManager &pm)
 Persistent stream reading. More...
 
bool isValid () const
 
void dump (std::ostream &s=std::cout, Size depth=0) const
 

Protected Attributes

QFont font_
 
ColorRGBA color_
 
Mode mode_
 
String text_
 
Size nr_objects_
 
Vector3 center_
 
GeometricCenterProcessor center_processor_
 
- Protected Attributes inherited from BALL::VIEW::ModelProcessor
GeometricObjectList geometric_objects_
 
Index drawing_precision_
 
float surface_drawing_precision_
 

Detailed Description

LabelModel class. The LabelModel is a model processor that is responsible for creating and updateing Labels. It supports special text tags, that allows for automaticaly created labels, see the documentation for the Label class.

See Also
Label

Definition at line 36 of file labelModel.h.

Member Enumeration Documentation

Enumerator
ALL_ITEMS 
ALL_ATOMS 
ALL_RESIDUES 
ONE_LABEL 

Definition at line 43 of file labelModel.h.

Constructor & Destructor Documentation

BALL::VIEW::LabelModel::LabelModel ( )

Default Constructor.

BALL::VIEW::LabelModel::LabelModel ( const LabelModel model)

Copy constructor.

virtual BALL::VIEW::LabelModel::~LabelModel ( )
virtual

Destructor.

Member Function Documentation

virtual bool BALL::VIEW::LabelModel::createGeometricObjects ( )
virtual

Method to create geometric objects. This method is called in Representation::update() after all operator() was called for all Composites. To be overloaded in derived classes

Reimplemented from BALL::VIEW::ModelProcessor.

const ColorRGBA& BALL::VIEW::LabelModel::getColor ( ) const
inline

Definition at line 82 of file labelModel.h.

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

Definition at line 76 of file labelModel.h.

const String& BALL::VIEW::LabelModel::getText ( ) const
inline

Definition at line 94 of file labelModel.h.

Mode BALL::VIEW::LabelModel::getType ( ) const
inline

Definition at line 88 of file labelModel.h.

virtual Processor::Result BALL::VIEW::LabelModel::operator() ( Composite composite)
virtual

Operator method.

Reimplemented from BALL::UnaryProcessor< Composite >.

void BALL::VIEW::LabelModel::setColor ( const ColorRGBA color)
inline

Definition at line 79 of file labelModel.h.

void BALL::VIEW::LabelModel::setFont ( const QFont &  font)
inline

Definition at line 73 of file labelModel.h.

void BALL::VIEW::LabelModel::setMode ( Mode  mode)
inline

Definition at line 85 of file labelModel.h.

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

Definition at line 91 of file labelModel.h.

Member Data Documentation

Vector3 BALL::VIEW::LabelModel::center_
protected

Definition at line 117 of file labelModel.h.

GeometricCenterProcessor BALL::VIEW::LabelModel::center_processor_
protected

Definition at line 118 of file labelModel.h.

ColorRGBA BALL::VIEW::LabelModel::color_
protected

Definition at line 113 of file labelModel.h.

QFont BALL::VIEW::LabelModel::font_
protected

Definition at line 112 of file labelModel.h.

Mode BALL::VIEW::LabelModel::mode_
protected

Definition at line 114 of file labelModel.h.

Size BALL::VIEW::LabelModel::nr_objects_
protected

Definition at line 116 of file labelModel.h.

String BALL::VIEW::LabelModel::text_
protected

Definition at line 115 of file labelModel.h.