BALL 1.5.0
label.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_VIEW_PRIMITIV_LABEL_H
6#define BALL_VIEW_PRIMITIV_LABEL_H
7
8#ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
10#endif
11
12#ifndef BALL_VIEW_DATATYPE_VERTEX1_H
14#endif
15
16#include <QtGui/QFont>
17
18namespace BALL
19{
20 namespace VIEW
21 {
22
46 : public GeometricObject,
47 public Vertex
48 {
49 public:
50
52
53
56
57
69
75 Label(const Label& label);
76
78
80
83 virtual ~Label();
84
91 virtual void clear();
92
94
96
101 void set(const Label& label);
102
106 const Label& operator = (const Label& label);
107
110 void swap(Label& label);
111
113
115
118 void setText(const String& text)
119 {text_ = text;}
120
124 { return text_;}
125
129
131 const QFont& getFont() const { return font_;}
132
134 void setFont(const QFont& font) { font_ = font;}
135
137 void setFontSize(Size size) { font_.setPixelSize(size);}
138
140
142
155 virtual bool isValid() const;
156
167 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
168
169 // Method to get all vertices from a geometric object
170 virtual void getVertices(vector<Vector3>& vertices) const;
171
172 protected:
174 QFont font_;
175
177 };
178
179 } // namespace VIEW
180} // namespace BALL
181
182#endif // BALL_VIEW_PRIMITIV_LABEL_H
#define BALL_CREATE(name)
Definition: create.h:62
Definition: constants.h:13
const QFont & getFont() const
Definition: label.h:131
String getText() const
Definition: label.h:123
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
String text_
Definition: label.h:173
void setFontSize(Size size)
Definition: label.h:137
void setFont(const QFont &font)
Definition: label.h:134
virtual void getVertices(vector< Vector3 > &vertices) const
virtual bool isValid() const
String getExpandedText() const
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52