ornamentedobj.h
author insilmaril
Mon May 18 11:22:41 2009 +0000 (2009-05-18)
changeset 771 01f2f6d6789d
parent 766 7a71a914afdb
child 776 25e634a7e1dc
permissions -rw-r--r--
Fixed addBranchBefore
     1 #ifndef ORNAMENTEDOBJ_H
     2 #define ORNAMENTEDOBJ_H
     3 
     4 #include "attribute.h"
     5 #include "frameobj.h"
     6 #include "linkablemapobj.h"
     7 
     8 /*! \brief Adds various ornaments and data to the class LinkableMapObj
     9 
    10 The ornaments are:
    11 	- frame
    12 	- note
    13 	- references
    14 	- flags
    15 		- standard flags
    16 		- system flags
    17 	- attributes (key/value pairs)	
    18  */
    19 
    20 class OrnamentedObj:public LinkableMapObj {
    21 public:	
    22     OrnamentedObj ();
    23     OrnamentedObj (QGraphicsScene*);
    24     OrnamentedObj (OrnamentedObj*);
    25     ~OrnamentedObj ();
    26     virtual void init ();
    27     virtual void copy (OrnamentedObj*);
    28 
    29 	virtual void setLinkColor();			// sets color according to colorhint, overloaded
    30 	virtual void setColor(QColor);			// set the color of text and link
    31 	QColor getColor ();						// get color of heading
    32 
    33 	virtual FrameObj::FrameType getFrameType ();
    34 	virtual QString getFrameTypeName ();
    35 	virtual void setFrameType (const FrameObj::FrameType &);
    36 	virtual void setFrameType (const QString &);
    37 	virtual void setFramePadding (const int &);
    38 	virtual int  getFramePadding ();
    39 	virtual void setFrameBorderWidth(const int &);
    40 	virtual int  getFrameBorderWidth ();
    41 	virtual void setFramePenColor (QColor);
    42 	virtual QColor getFramePenColor ();
    43 	virtual void setFrameBrushColor (QColor);
    44 	virtual QColor getFrameBrushColor ();
    45 
    46     virtual void positionContents();
    47     virtual void move   (double,double);
    48     virtual void move   (QPointF);
    49     virtual void moveBy (double,double);
    50     virtual void moveBy (QPointF);
    51     virtual void move2RelPos (QPointF);		// move relativly to parent^
    52     virtual void move2RelPos (double,double);
    53 
    54 	virtual void activateStandardFlag(Flag *flag);
    55 	virtual void deactivateStandardFlag(const QString &name);
    56 	virtual QString getSystemFlagName (const QPointF &p);
    57 
    58 	//virtual void getNoteFromTextEditor ();// FIXME-3 should move to vymview?!
    59 	virtual QString getOrnXMLAttr();		// get attributes for saveToDir
    60 
    61 protected:
    62     HeadingObj *heading;			// Heading
    63 	FlagRowObj *systemFlags;		// System Flags
    64 	FlagRowObj *standardFlags;		// Standard Flags
    65 	FrameObj *frame;				// frame around object
    66 	QRectF ornamentsBBox;			// bbox of flags and heading
    67 };
    68 
    69 #endif