]> git.sven.stormbind.net Git - sven/vym.git/blob - ornamentedobj.h
0a2717b05a19543a548575c042a3c0c8c4f53013
[sven/vym.git] / 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 setLinkColor();        // sets color according to colorhint, overloaded
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 void activateStandardFlag(Flag *flag);
60     virtual void deactivateStandardFlag(const QString &name);
61     virtual QString getSystemFlagName (const QPointF &p);
62     virtual QRectF getBBoxFlag (const QString &name);
63
64 protected:
65     HeadingObj *heading;        // Heading
66     FlagRowObj *systemFlags;        // System Flags
67     FlagRowObj *standardFlags;      // Standard Flags
68     FrameObj *frame;            // frame around object
69     QRectF ornamentsBBox;       // bbox of flags and heading
70 };
71
72 #endif