ornamentedobj.h
author insilmaril
Fri, 11 Sep 2009 12:56:15 +0000
changeset 794 d922fb6ea482
parent 791 f1006de05c54
child 819 8f987e376035
permissions -rw-r--r--
more fixes for collisions
     1 #ifndef ORNAMENTEDOBJ_H
     2 #define ORNAMENTEDOBJ_H
     3 
     4 #include "attribute.h"
     5 #include "frameobj.h"
     6 #include "linkablemapobj.h"
     7 
     8 class TreeItem;
     9 
    10 /*! \brief Adds various ornaments and data to the class LinkableMapObj
    11 
    12 The ornaments are:
    13 	- frame
    14 	- note
    15 	- references
    16 	- flags
    17 		- standard flags
    18 		- system flags
    19 	- attributes (key/value pairs)	
    20  */
    21 
    22 class OrnamentedObj:public LinkableMapObj {
    23 public:	
    24     OrnamentedObj (QGraphicsScene*, TreeItem *ti=NULL);
    25     OrnamentedObj (OrnamentedObj*);
    26     virtual ~OrnamentedObj ();
    27     virtual void init ();
    28     virtual void copy (OrnamentedObj*);
    29 
    30 	virtual void setLinkColor();			// sets color according to colorhint, overloaded
    31 	virtual void setColor(QColor);			// set the color of text and link
    32 	QColor getColor ();						// get color of heading
    33 
    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 
    48     virtual void positionContents();
    49     virtual void move   (double,double);
    50     virtual void move   (QPointF);
    51     virtual void moveBy (double,double);
    52     virtual void moveBy (QPointF);
    53     virtual void move2RelPos (QPointF);		// move relativly to parent^
    54     virtual void move2RelPos (double,double);
    55 
    56 	virtual void activateStandardFlag(Flag *flag);
    57 	virtual void deactivateStandardFlag(const QString &name);
    58 	virtual QString getSystemFlagName (const QPointF &p);
    59 
    60 protected:
    61     HeadingObj *heading;			// Heading
    62 	FlagRowObj *systemFlags;		// System Flags
    63 	FlagRowObj *standardFlags;		// Standard Flags
    64 	FrameObj *frame;				// frame around object
    65 	QRectF ornamentsBBox;			// bbox of flags and heading
    66 };
    67 
    68 #endif