ornamentedobj.h
author insilmaril
Mon, 18 Jun 2007 15:10:19 +0000
changeset 507 2f57a7d2315e
parent 476 a551ed6005cc
child 613 8fb5b3956b3e
permissions -rw-r--r--
1.8.73 - beta testing
     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();			// returns note	(ASCII)
    58     virtual QString getNoteOpenDoc();		// returns note	(OpenDoc)
    59     virtual void setURL (QString);
    60     virtual QString getURL ();
    61     virtual void setVymLink (QString);
    62     virtual QString getVymLink ();
    63 
    64 	virtual void clearStandardFlags();
    65 	virtual void toggleStandardFlag(QString, bool exclusive=false);
    66 	virtual void activateStandardFlag(QString);
    67 	virtual void deactivateStandardFlag(QString);
    68 	virtual bool isSetStandardFlag(QString);
    69 	virtual QString getSystemFlagName (const QPointF &p);
    70 	virtual bool isActiveFlag(const QString&);	// check if flag is set
    71 	virtual void updateNoteFlag();
    72 	virtual void getNoteFromTextEditor ();
    73 	virtual void updateFlagsToolbar();
    74 	virtual void setHideInExport(bool);		// set export of object (and childs)
    75 	virtual bool hideInExport();
    76 	virtual bool isHidden ();
    77 	virtual QString getOrnAttr();			// get attributes for saveToDir
    78 
    79 protected:
    80     HeadingObj *heading;			// Heading
    81 	NoteObj note;					// Notes
    82 	bool isNoteInEditor;			// true if TextEditor has this note
    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 	bool hideExport;				// hide in exports if set
    90 	bool hidden;					// true if temporary hidden
    91 };
    92 
    93 #endif