BALL  1.4.1
labelModel.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_VIEW_MODELS_LABELMODEL_H
00006 #define BALL_VIEW_MODELS_LABELMODEL_H
00007 
00008 #ifndef BALL_VIEW_MODELS_MODELPROCESSOR_H
00009 # include <BALL/VIEW/MODELS/modelProcessor.h>
00010 #endif
00011 
00012 #ifndef BALL_VIEW_DATATYPE_COLORRGBA_H
00013 # include <BALL/VIEW/DATATYPE/colorRGBA.h>
00014 #endif
00015 
00016 #ifndef BALL_STRUCTURE_GEOMETRICPROPERTIES_H
00017 # include <BALL/STRUCTURE/geometricProperties.h>
00018 #endif
00019 
00020 
00021 #include <QtGui/QFont>
00022 
00023 namespace BALL
00024 {
00025   namespace VIEW
00026   {
00027 
00036     class BALL_VIEW_EXPORT LabelModel: public ModelProcessor
00037     {
00038       public:
00039 
00040       BALL_CREATE(LabelModel)
00041 
00042       
00043       enum Mode
00044       {
00046         ALL_ITEMS,
00048         ALL_ATOMS,
00050         ALL_RESIDUES,
00052         ONE_LABEL
00053       };
00054 
00055 
00059 
00062       LabelModel();
00063 
00066       LabelModel(const LabelModel& model);
00067 
00070       virtual ~LabelModel();
00071 
00073       void setFont(const QFont& font) { font_ = font;} 
00074 
00076       const QFont& getFont() const { return font_;}
00077       
00079       void setColor(const ColorRGBA& color) { color_ = color;}
00080 
00082       const ColorRGBA& getColor() const { return color_;}
00083 
00085       void setMode(Mode mode) { mode_ = mode;}
00086 
00088       Mode getType() const { return mode_;}
00089 
00091       void setText(const String& text) { text_ = text;}
00092       
00094       const String& getText() const { return text_;}
00095 
00096 
00098 
00101 
00104       virtual Processor::Result operator() (Composite& composite);
00105             
00107       virtual bool createGeometricObjects();
00109 
00110       protected:
00111 
00112       QFont                     font_;
00113       ColorRGBA                 color_;
00114       Mode                      mode_;
00115       String                    text_;
00116       Size                      nr_objects_;
00117       Vector3                   center_;
00118       GeometricCenterProcessor  center_processor_;
00119     };
00120 
00121   } // namespace VIEW
00122 } // namspace BALL
00123 
00124 #endif // BALL_VIEW_MODELS_LabelMODEL_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines