initial import
[vym] / headingobj.h
1 #ifndef HEADINGOBJ_H
2 #define HEADINGOBJ_H
3
4 #include "mapobj.h"
5
6 /*! \brief The heading of an OrnamentedObj */
7
8 class HeadingObj:public MapObj {
9 public:
10     HeadingObj();
11     HeadingObj(QGraphicsScene*);
12     virtual ~HeadingObj();
13     virtual void init();
14     virtual void copy(HeadingObj*);
15     virtual void move (double x,double y);      // move to absolute Position
16     virtual void moveBy (double x,double y);    // move to relative Position
17     virtual void positionBBox();
18         virtual void calcBBoxSize();
19 private:
20 //    QGraphicsSimpleTextItem* newLine(QString);                // generate new textline
21     QGraphicsTextItem* newLine(QString);                // generate new textline
22 public:    
23     virtual void setText(QString);
24     virtual QString text();
25     virtual void setFont(QFont);
26     virtual QFont getFont();
27     virtual void setColor(QColor);
28     virtual QColor getColor();
29     virtual void setVisibility(bool);
30         virtual qreal getHeight();
31         virtual qreal getWidth();
32
33 protected:
34     QString heading;
35     int textwidth;                                                              // width for formatting text
36 //    QList <QGraphicsSimpleTextItem*> textline;        // a part of e.g. the parabel
37     QList <QGraphicsTextItem*> textline;        // a part of e.g. the parabel
38     QColor color;
39     QFont font;
40 };
41 #endif