ornamentedobj.h
author insilmaril
Thu, 18 Mar 2010 11:46:52 +0000
changeset 839 fbb927bbdda3
parent 819 8f987e376035
permissions -rw-r--r--
Version bump to 1.13.1 due to first release of 1.13.0 to openSUSE buildservice
     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 	QRectF getBBoxHeading();
    34 
    35 	virtual FrameObj* getFrame();
    36 	virtual FrameObj::FrameType getFrameType ();
    37 	virtual QString getFrameTypeName ();
    38 	virtual void setFrameType (const FrameObj::FrameType &);
    39 	virtual void setFrameType (const QString &);
    40 	virtual void setFramePadding (const int &);
    41 	virtual int  getFramePadding ();
    42 	virtual void setFrameBorderWidth(const int &);
    43 	virtual int  getFrameBorderWidth ();
    44 	virtual void setFramePenColor (QColor);
    45 	virtual QColor getFramePenColor ();
    46 	virtual void setFrameBrushColor (QColor);
    47 	virtual QColor getFrameBrushColor ();
    48 
    49     virtual void positionContents();
    50     virtual void move   (double,double);
    51     virtual void move   (QPointF);
    52     virtual void moveBy (double,double);
    53     virtual void moveBy (QPointF);
    54     virtual void move2RelPos (QPointF);		// move relativly to parent^
    55     virtual void move2RelPos (double,double);
    56 
    57 	virtual void activateStandardFlag(Flag *flag);
    58 	virtual void deactivateStandardFlag(const QString &name);
    59 	virtual QString getSystemFlagName (const QPointF &p);
    60 	virtual QRectF getBBoxFlag (const QString &name);
    61 
    62 protected:
    63     HeadingObj *heading;			// Heading
    64 	FlagRowObj *systemFlags;		// System Flags
    65 	FlagRowObj *standardFlags;		// Standard Flags
    66 	FrameObj *frame;				// frame around object
    67 	QRectF ornamentsBBox;			// bbox of flags and heading
    68 };
    69 
    70 #endif