ornamentedobj.h
author insilmaril
Wed Jan 16 15:45:19 2008 +0000 (2008-01-16)
changeset 655 d4b49c6c6069
parent 628 d7d0708b1c60
child 721 12958f987bcf
permissions -rw-r--r--
Fixed missing MapCenter
     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     virtual void setNote(QString);			// set note
    57     virtual void setNote(NoteObj);			// set note
    58     virtual QString getNote();				// returns note	(HTML)
    59     virtual QString getNoteASCII(const QString &indent, const int &width); // returns note	(ASCII)
    60     virtual QString getNoteASCII();			// returns note	(ASCII)
    61     virtual QString getNoteOpenDoc();		// returns note	(OpenDoc)
    62 
    63     virtual void setURL (QString);
    64     virtual QString getURL ();
    65 
    66     virtual void setVymLink (QString);
    67     virtual QString getVymLink ();
    68 
    69 	virtual void setAttributes (const QList <Attribute> &al);
    70 	virtual QList <Attribute> getAttributes ();
    71 
    72 	virtual void clearStandardFlags();
    73 	virtual void toggleStandardFlag(QString, bool exclusive=false);
    74 	virtual void activateStandardFlag(QString);
    75 	virtual void deactivateStandardFlag(QString);
    76 	virtual bool isSetStandardFlag(QString);
    77 	virtual QString getSystemFlagName (const QPointF &p);
    78 	virtual bool isActiveFlag(const QString&);	// check if flag is set
    79 	virtual void updateNoteFlag();
    80 	virtual void getNoteFromTextEditor ();
    81 	virtual void updateFlagsToolbar();
    82 	virtual void setHideInExport(bool);		// set export of object (and childs)
    83 	virtual bool hideInExport();
    84 	virtual bool isHidden ();
    85 	virtual QString getOrnXMLAttr();		// get attributes for saveToDir
    86 
    87 protected:
    88     HeadingObj *heading;			// Heading
    89 	NoteObj note;					// Notes
    90 	bool isNoteInEditor;			// true if TextEditor has this note
    91 	FlagRowObj *systemFlags;		// System Flags
    92 	FlagRowObj *standardFlags;		// Standard Flags
    93 	FrameObj *frame;				// frame around object
    94 	QRectF ornamentsBBox;			// bbox of flags and heading
    95 	QString url;					// url to external doc
    96 	QString vymLink;				// path to another map
    97 	QList <Attribute> attributes;	// List with attributes
    98 
    99 	bool hideExport;				// hide in exports if set
   100 	bool hidden;					// true if temporary hidden
   101 };
   102 
   103 #endif