Loading...
Searching...
No Matches
label.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_PRIMITIV_LABEL_H
#define BALL_VIEW_PRIMITIV_LABEL_H
#ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
# include <BALL/VIEW/KERNEL/geometricObject.h>
#endif
#ifndef BALL_VIEW_DATATYPE_VERTEX1_H
# include <BALL/VIEW/DATATYPE/vertex1.h>
#endif
#include <QtGui/QFont>
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT Label
: public GeometricObject,
public Vertex
{
public:
BALL_CREATE(Label)
//@{
Label();
Label(const Label& label);
virtual ~Label();
virtual void clear();
void set(const Label& label);
const Label& operator = (const Label& label);
void swap(Label& label);
void setText(const String& text)
{text_ = text;}
String getText() const
{ return text_;}
String getExpandedText() const;
const QFont& getFont() const { return font_;}
void setFont(const QFont& font) { font_ = font;}
void setFontSize(Size size) { font_.setPixelSize(size);}
virtual bool isValid() const;
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
// Method to get all vertices from a geometric object
virtual void getVertices(vector<Vector3>& vertices) const;
protected:
String text_;
QFont font_;
};
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_PRIMITIV_LABEL_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::String
Definition string.h:57
BALL::VIEW::GeometricObject::GeometricObject
GeometricObject()
BALL::VIEW::Label::getFont
const QFont & getFont() const
Definition label.h:131
BALL::VIEW::Label::Label
Label()
BALL::VIEW::Label::getText
String getText() const
Definition label.h:123
BALL::VIEW::Label::font_
QFont font_
Definition label.h:174
BALL::VIEW::Label::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::Label::set
void set(const Label &label)
BALL::VIEW::Label::text_
String text_
Definition label.h:173
BALL::VIEW::Label::setFontSize
void setFontSize(Size size)
Definition label.h:137
BALL::VIEW::Label::setFont
void setFont(const QFont &font)
Definition label.h:134
BALL::VIEW::Label::swap
void swap(Label &label)
BALL::VIEW::Label::getVertices
virtual void getVertices(vector< Vector3 > &vertices) const
BALL::VIEW::Label::setText
void setText(const String &text)
Definition label.h:118
BALL::VIEW::Label::isValid
virtual bool isValid() const
BALL::VIEW::Label::getExpandedText
String getExpandedText() const
BALL::VIEW::Label::clear
virtual void clear()
BALL::VIEW::Vertex::Vertex
Vertex()
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
geometricObject.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
vertex1.h