ornamentedobj.h
author insilmaril
Thu Nov 08 15:28:03 2007 +0000 (2007-11-08)
changeset 619 b48f072a347a
parent 613 8fb5b3956b3e
child 628 d7d0708b1c60
permissions -rw-r--r--
1.11.2 split up of xml helper functions. started to work on attributes
     1 #ifndef ORNAMENTEDOBJ_H
     2 #define ORNAMENTEDOBJ_H
     3 
     4 #include "frameobj.h"
     5 #include "linkablemapobj.h"
     6 
     7 /*! \brief Adds various ornaments and data to the class LinkableMapObj
     8 
     9 The ornaments are:
    10 	- frame
    11 	- note
    12 	- references
    13 		- URL
    14 		-vymLink
    15 	- flags
    16 		- standard flags
    17 		- system flags
    18 	- attributes (key/value pairs)	
    19  */
    20 
    21 class OrnamentedObj:public LinkableMapObj {
    22 public:	
    23     OrnamentedObj ();
    24     OrnamentedObj (QGraphicsScene*);
    25     OrnamentedObj (OrnamentedObj*);
    26     ~OrnamentedObj ();
    27     virtual void init ();
    28     virtual void copy (OrnamentedObj*);
    29 
    30     virtual QString getHeading();			//!< returns the heading	
    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     virtual void setNote(QString);			// set note
    56     virtual void setNote(NoteObj);			// set note
    57     virtual QString getNote();				// returns note	(HTML)
    58     virtual QString getNoteASCII(const QString &indent, const int &width); // returns note	(ASCII)
    59     virtual QString getNoteASCII();			// returns note	(ASCII)
    60     virtual QString getNoteOpenDoc();		// returns note	(OpenDoc)
    61     virtual void setURL (QString);
    62     virtual QString getURL ();
    63     virtual void setVymLink (QString);
    64     virtual QString getVymLink ();
    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 updateNoteFlag();
    74 	virtual void getNoteFromTextEditor ();
    75 	virtual void updateFlagsToolbar();
    76 	virtual void setHideInExport(bool);		// set export of object (and childs)
    77 	virtual bool hideInExport();
    78 	virtual bool isHidden ();
    79 	virtual QString getOrnAttr();			// get attributes for saveToDir
    80 
    81 protected:
    82     HeadingObj *heading;			// Heading
    83 	NoteObj note;					// Notes
    84 	bool isNoteInEditor;			// true if TextEditor has this note
    85 	FlagRowObj *systemFlags;		// System Flags
    86 	FlagRowObj *standardFlags;		// Standard Flags
    87 	FrameObj *frame;				// frame around object
    88 	QRectF ornamentsBBox;			// bbox of flags and heading
    89 	QString url;					// url to external doc
    90 	QString vymLink;				// path to another map
    91 	bool hideExport;				// hide in exports if set
    92 	bool hidden;					// true if temporary hidden
    93 };
    94 
    95 #endif