ornamentedobj.h
author insilmaril
Thu, 26 Mar 2009 07:49:17 +0000
changeset 746 ee6b0f3a4c2f
parent 721 12958f987bcf
child 753 25a77484ec72
permissions -rw-r--r--
Notes work again (to some degree)
     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 QString getHeading();			//!< returns the heading	
    32 	virtual void setLinkColor();			// sets color according to colorhint, overloaded
    33 	virtual void setColor(QColor);			// set the color of text and link
    34 	QColor getColor ();						// get color of heading
    35 
    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 setURL (QString);
    58     virtual QString getURL ();
    59 
    60     virtual void setVymLink (QString);
    61     virtual QString getVymLink ();
    62 
    63 	virtual void setAttributes (const QList <Attribute> &al);
    64 	virtual QList <Attribute> getAttributes ();
    65 
    66 	virtual void clearStandardFlags();
    67 	virtual void toggleStandardFlag(QString, bool exclusive=false);
    68 	virtual void activateStandardFlag(QString);
    69 	virtual void deactivateStandardFlag(QString);
    70 	virtual bool isSetStandardFlag(QString);
    71 	virtual QString getSystemFlagName (const QPointF &p);
    72 	virtual bool isActiveFlag(const QString&);	// check if flag is set
    73 	virtual void updateSystemFlags();
    74 	//virtual void getNoteFromTextEditor ();// FIXME should move to vymview?!
    75 	virtual void updateFlagsToolbar();
    76 	virtual void setHideInExport(bool);		// set export of object (and children)
    77 	virtual bool hideInExport();		// FIXME moved to treeitem
    78 	virtual bool isHidden ();		// FIXME moved to treeitem
    79 	virtual QString getOrnXMLAttr();		// get attributes for saveToDir
    80 
    81 protected:
    82     HeadingObj *heading;			// Heading
    83 	FlagRowObj *systemFlags;		// System Flags
    84 	FlagRowObj *standardFlags;		// Standard Flags
    85 	FrameObj *frame;				// frame around object
    86 	QRectF ornamentsBBox;			// bbox of flags and heading
    87 	QString url;					// url to external doc
    88 	QString vymLink;				// path to another map
    89 	QList <Attribute> attributes;	// List with attributes
    90 
    91 	bool hideExport;				// hide in exports if set
    92 	bool hidden;					// true if temporary hidden		// FIXME moved to treeitem needs to move
    93 };
    94 
    95 #endif