ornamentedobj.h
author insilmaril
Wed, 29 Apr 2009 18:46:31 +0000
changeset 760 59614eaf5fbb
parent 753 25a77484ec72
child 766 7a71a914afdb
permissions -rw-r--r--
started to save data like positions outside of MapObj & Co
     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 		- URL
    15 		-vymLink
    16 	- flags
    17 		- standard flags
    18 		- system flags
    19 	- attributes (key/value pairs)	
    20  */
    21 
    22 class OrnamentedObj:public LinkableMapObj {
    23 public:	
    24     OrnamentedObj ();
    25     OrnamentedObj (QGraphicsScene*);
    26     OrnamentedObj (OrnamentedObj*);
    27     ~OrnamentedObj ();
    28     virtual void init ();
    29     virtual void copy (OrnamentedObj*);
    30 
    31 	virtual void setLinkColor();			// sets color according to colorhint, overloaded
    32 	virtual void setColor(QColor);			// set the color of text and link
    33 	QColor getColor ();						// get color of heading
    34 
    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 setURL (QString);
    57     virtual QString getURL ();
    58 
    59     virtual void setVymLink (QString);
    60     virtual QString getVymLink ();
    61 
    62 	virtual void setAttributes (const QList <Attribute> &al);
    63 	virtual QList <Attribute> getAttributes ();
    64 
    65 	virtual void clearStandardFlags();
    66 	virtual void toggleStandardFlag(QString, bool exclusive=false);
    67 	virtual void activateStandardFlag(QString);
    68 	virtual void deactivateStandardFlag(QString);
    69 	virtual bool isSetStandardFlag(QString);
    70 	virtual QString getSystemFlagName (const QPointF &p);
    71 	virtual bool isActiveFlag(const QString&);	// check if flag is set
    72 	virtual void updateSystemFlags();
    73 	virtual void updateFlagsToolbar();
    74 
    75 	//virtual void getNoteFromTextEditor ();// FIXME-3 should move to vymview?!
    76 	virtual QString getOrnXMLAttr();		// get attributes for saveToDir
    77 
    78 protected:
    79     HeadingObj *heading;			// Heading
    80 	FlagRowObj *systemFlags;		// System Flags
    81 	FlagRowObj *standardFlags;		// Standard Flags
    82 	FrameObj *frame;				// frame around object
    83 	QRectF ornamentsBBox;			// bbox of flags and heading
    84 	QString url;					// url to external doc
    85 	QString vymLink;				// path to another map  // FIXME-3 remove this
    86 	QList <Attribute> attributes;	// List with attributes
    87 };
    88 
    89 #endif