ornamentedobj.h
author insilmaril
Mon Jul 27 12:53:17 2009 +0000 (2009-07-27)
changeset 782 ffb02a9bb508
parent 776 25e634a7e1dc
child 790 133e2ed6b9c5
permissions -rw-r--r--
Playing with dbus, fixed name of TW translation file
     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* getFrame();
    34 	virtual FrameObj::FrameType getFrameType ();
    35 	virtual QString getFrameTypeName ();
    36 	virtual void setFrameType (const FrameObj::FrameType &);
    37 	virtual void setFrameType (const QString &);
    38 	virtual void setFramePadding (const int &);
    39 	virtual int  getFramePadding ();
    40 	virtual void setFrameBorderWidth(const int &);
    41 	virtual int  getFrameBorderWidth ();
    42 	virtual void setFramePenColor (QColor);
    43 	virtual QColor getFramePenColor ();
    44 	virtual void setFrameBrushColor (QColor);
    45 	virtual QColor getFrameBrushColor ();
    46 
    47     virtual void positionContents();
    48     virtual void move   (double,double);
    49     virtual void move   (QPointF);
    50     virtual void moveBy (double,double);
    51     virtual void moveBy (QPointF);
    52     virtual void move2RelPos (QPointF);		// move relativly to parent^
    53     virtual void move2RelPos (double,double);
    54 
    55 	virtual void activateStandardFlag(Flag *flag);
    56 	virtual void deactivateStandardFlag(const QString &name);
    57 	virtual QString getSystemFlagName (const QPointF &p);
    58 
    59 protected:
    60     HeadingObj *heading;			// Heading
    61 	FlagRowObj *systemFlags;		// System Flags
    62 	FlagRowObj *standardFlags;		// Standard Flags
    63 	FrameObj *frame;				// frame around object
    64 	QRectF ornamentsBBox;			// bbox of flags and heading
    65 };
    66 
    67 #endif