ornamentedobj.h
author insilmaril
Wed, 24 Oct 2007 12:21:24 +0000
changeset 613 8fb5b3956b3e
parent 476 a551ed6005cc
child 618 9d9da416206e
permissions -rw-r--r--
Improved ascii export
     1 #ifndef ORNAMENTEDOBJ_H
     2 #define ORNAMENTEDOBJ_H
     3 
     4 #include "frameobj.h"
     5 #include "linkablemapobj.h"
     6 
     7 /*! \brief Adds various ornaments 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  */
    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 QString getHeading();			//!< returns the heading	
    30 	virtual void setLinkColor();			// sets color according to colorhint, overloaded
    31 	virtual void setColor(QColor);			// set the color of text and link
    32 	QColor getColor ();						// get color of heading
    33 
    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     virtual void setNote(QString);			// set note
    55     virtual void setNote(NoteObj);			// set note
    56     virtual QString getNote();				// returns note	(HTML)
    57     virtual QString getNoteASCII(const QString &indent, const int &width); // returns note	(ASCII)
    58     virtual QString getNoteASCII();			// returns note	(ASCII)
    59     virtual QString getNoteOpenDoc();		// returns note	(OpenDoc)
    60     virtual void setURL (QString);
    61     virtual QString getURL ();
    62     virtual void setVymLink (QString);
    63     virtual QString getVymLink ();
    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 updateNoteFlag();
    73 	virtual void getNoteFromTextEditor ();
    74 	virtual void updateFlagsToolbar();
    75 	virtual void setHideInExport(bool);		// set export of object (and childs)
    76 	virtual bool hideInExport();
    77 	virtual bool isHidden ();
    78 	virtual QString getOrnAttr();			// get attributes for saveToDir
    79 
    80 protected:
    81     HeadingObj *heading;			// Heading
    82 	NoteObj note;					// Notes
    83 	bool isNoteInEditor;			// true if TextEditor has this note
    84 	FlagRowObj *systemFlags;		// System Flags
    85 	FlagRowObj *standardFlags;		// Standard Flags
    86 	FrameObj *frame;				// frame around object
    87 	QRectF ornamentsBBox;			// bbox of flags and heading
    88 	QString url;					// url to external doc
    89 	QString vymLink;				// path to another map
    90 	bool hideExport;				// hide in exports if set
    91 	bool hidden;					// true if temporary hidden
    92 };
    93 
    94 #endif