BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_VIEW_PRIMITIV_LABEL_H 00006 #define BALL_VIEW_PRIMITIV_LABEL_H 00007 00008 #ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H 00009 # include <BALL/VIEW/KERNEL/geometricObject.h> 00010 #endif 00011 00012 #ifndef BALL_VIEW_DATATYPE_VERTEX1_H 00013 # include <BALL/VIEW/DATATYPE/vertex1.h> 00014 #endif 00015 00016 #include <QtGui/QFont> 00017 00018 namespace BALL 00019 { 00020 namespace VIEW 00021 { 00022 00045 class BALL_VIEW_EXPORT Label 00046 : public GeometricObject, 00047 public Vertex 00048 { 00049 public: 00050 00051 BALL_CREATE(Label) 00052 00053 00056 00068 Label(); 00069 00075 Label(const Label& label); 00076 00078 00080 00083 virtual ~Label(); 00084 00091 virtual void clear(); 00092 00094 00096 00101 void set(const Label& label); 00102 00106 const Label& operator = (const Label& label); 00107 00110 void swap(Label& label); 00111 00113 00115 00118 void setText(const String& text) 00119 {text_ = text;} 00120 00123 String getText() const 00124 { return text_;} 00125 00128 String getExpandedText() const; 00129 00131 const QFont& getFont() const { return font_;} 00132 00134 void setFont(const QFont& font) { font_ = font;} 00135 00137 void setFontSize(Size size) { font_.setPixelSize(size);} 00138 00140 00142 00155 virtual bool isValid() const; 00156 00167 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const; 00168 00169 // Method to get all vertices from a geometric object 00170 virtual void getVertices(vector<Vector3>& vertices) const; 00171 00172 protected: 00173 String text_; 00174 QFont font_; 00175 00177 }; 00178 00179 } // namespace VIEW 00180 } // namespace BALL 00181 00182 #endif // BALL_VIEW_PRIMITIV_LABEL_H