]> git.sven.stormbind.net Git - sven/vym.git/blob - src/ornamentedobj.h
New upstream version 2.9.22
[sven/vym.git] / src / ornamentedobj.h
1 #ifndef ORNAMENTEDOBJ_H
2 #define ORNAMENTEDOBJ_H
3
4 #include "frameobj.h"
5 #include "linkablemapobj.h"
6
7 class TreeItem;
8
9 /*! \brief Adds various ornaments and data to the class LinkableMapObj
10
11 The ornaments are:
12     - frame
13     - note
14     - references
15     - flags
16     - standard flags
17     - system flags
18  */
19 //    - attributes (key/value pairs)
20
21 class OrnamentedObj : public LinkableMapObj {
22   public:
23     OrnamentedObj(QGraphicsItem *parent, TreeItem *ti = NULL);
24     virtual ~OrnamentedObj();
25     virtual void init();
26     virtual void copy(OrnamentedObj *);
27
28     //virtual void
29     virtual void setColor(QColor); // set the color of text and link
30     QColor getColor();             // get color of heading
31     QRectF getBBoxHeading();
32
33     virtual void setRotation(const qreal &a);
34     virtual FrameObj *getFrame();
35     virtual FrameObj::FrameType getFrameType();
36     virtual QString getFrameTypeName();
37     virtual void setFrameType(const FrameObj::FrameType &);
38     virtual void setFrameType(const QString &);
39     virtual void setFramePadding(const int &);
40     virtual int getFramePadding();
41     virtual void setFrameBorderWidth(const int &);
42     virtual int getFrameBorderWidth();
43     virtual void setFramePenColor(QColor);
44     virtual QColor getFramePenColor();
45     virtual void setFrameBrushColor(QColor);
46     virtual QColor getFrameBrushColor();
47     virtual void setFrameIncludeChildren(bool);
48     virtual bool getFrameIncludeChildren();
49     virtual QRectF getOrnamentsBBox();
50
51     virtual void positionContents();
52     virtual void move(double, double);
53     virtual void move(QPointF);
54     virtual void moveBy(double, double);
55     virtual void moveBy(QPointF);
56     virtual void move2RelPos(QPointF); // move relativly to parent^
57     virtual void move2RelPos(double, double);
58
59     virtual QUuid findSystemFlagUidByPos(const QPointF &p);
60     virtual QRectF getBBoxSystemFlagByUid(const QUuid &u);
61
62   protected:
63     HeadingObj *heading;            // Heading
64     FlagRowObj *systemFlagRowObj;   // System Flags
65     FlagRowObj *standardFlagRowObj; // Standard Flags
66     FrameObj *frame;                // frame around object
67     QRectF ornamentsBBox;           // bbox of flags and heading
68 };
69
70 #endif