ornamentedobj.h
author insilmaril
Tue Apr 08 08:28:37 2008 +0000 (2008-04-08)
changeset 682 16af22e2c155
parent 628 d7d0708b1c60
child 721 12958f987bcf
permissions -rw-r--r--
1.11.7: Fixed hanging find function
insilmaril@0
     1
#ifndef ORNAMENTEDOBJ_H
insilmaril@0
     2
#define ORNAMENTEDOBJ_H
insilmaril@0
     3
insilmaril@628
     4
#include "attribute.h"
insilmaril@442
     5
#include "frameobj.h"
insilmaril@0
     6
#include "linkablemapobj.h"
insilmaril@0
     7
insilmaril@618
     8
/*! \brief Adds various ornaments and data to the class LinkableMapObj
insilmaril@476
     9
insilmaril@476
    10
The ornaments are:
insilmaril@476
    11
	- frame
insilmaril@476
    12
	- note
insilmaril@476
    13
	- references
insilmaril@476
    14
		- URL
insilmaril@476
    15
		-vymLink
insilmaril@476
    16
	- flags
insilmaril@476
    17
		- standard flags
insilmaril@476
    18
		- system flags
insilmaril@618
    19
	- attributes (key/value pairs)	
insilmaril@476
    20
 */
insilmaril@476
    21
insilmaril@0
    22
class OrnamentedObj:public LinkableMapObj {
insilmaril@0
    23
public:	
insilmaril@0
    24
    OrnamentedObj ();
insilmaril@408
    25
    OrnamentedObj (QGraphicsScene*);
insilmaril@0
    26
    OrnamentedObj (OrnamentedObj*);
insilmaril@0
    27
    ~OrnamentedObj ();
insilmaril@0
    28
    virtual void init ();
insilmaril@0
    29
    virtual void copy (OrnamentedObj*);
insilmaril@0
    30
insilmaril@476
    31
    virtual QString getHeading();			//!< returns the heading	
insilmaril@0
    32
	virtual void setLinkColor();			// sets color according to colorhint, overloaded
insilmaril@243
    33
	virtual void setColor(QColor);			// set the color of text and link
insilmaril@0
    34
	QColor getColor ();						// get color of heading
insilmaril@442
    35
insilmaril@476
    36
	virtual FrameObj::FrameType getFrameType ();
insilmaril@476
    37
	virtual QString getFrameTypeName ();
insilmaril@476
    38
	virtual void setFrameType (const FrameObj::FrameType &);
insilmaril@442
    39
	virtual void setFrameType (const QString &);
insilmaril@476
    40
	virtual void setFramePadding (const int &);
insilmaril@476
    41
	virtual int  getFramePadding ();
insilmaril@476
    42
	virtual void setFrameBorderWidth(const int &);
insilmaril@476
    43
	virtual int  getFrameBorderWidth ();
insilmaril@442
    44
	virtual void setFramePenColor (QColor);
insilmaril@442
    45
	virtual QColor getFramePenColor ();
insilmaril@442
    46
	virtual void setFrameBrushColor (QColor);
insilmaril@442
    47
	virtual QColor getFrameBrushColor ();
insilmaril@442
    48
insilmaril@177
    49
    virtual void positionContents();
insilmaril@0
    50
    virtual void move   (double,double);
insilmaril@408
    51
    virtual void move   (QPointF);
insilmaril@0
    52
    virtual void moveBy (double,double);
insilmaril@408
    53
    virtual void moveBy (QPointF);
insilmaril@408
    54
    virtual void move2RelPos (QPointF);		// move relativly to parent^
insilmaril@0
    55
    virtual void move2RelPos (double,double);
insilmaril@0
    56
    virtual void setNote(QString);			// set note
insilmaril@0
    57
    virtual void setNote(NoteObj);			// set note
insilmaril@187
    58
    virtual QString getNote();				// returns note	(HTML)
insilmaril@613
    59
    virtual QString getNoteASCII(const QString &indent, const int &width); // returns note	(ASCII)
insilmaril@187
    60
    virtual QString getNoteASCII();			// returns note	(ASCII)
insilmaril@187
    61
    virtual QString getNoteOpenDoc();		// returns note	(OpenDoc)
insilmaril@628
    62
insilmaril@243
    63
    virtual void setURL (QString);
insilmaril@243
    64
    virtual QString getURL ();
insilmaril@628
    65
insilmaril@243
    66
    virtual void setVymLink (QString);
insilmaril@243
    67
    virtual QString getVymLink ();
insilmaril@243
    68
insilmaril@639
    69
	virtual void setAttributes (const QList <Attribute> &al);
insilmaril@628
    70
	virtual QList <Attribute> getAttributes ();
insilmaril@628
    71
insilmaril@447
    72
	virtual void clearStandardFlags();
insilmaril@447
    73
	virtual void toggleStandardFlag(QString, bool exclusive=false);
insilmaril@0
    74
	virtual void activateStandardFlag(QString);
insilmaril@366
    75
	virtual void deactivateStandardFlag(QString);
insilmaril@297
    76
	virtual bool isSetStandardFlag(QString);
insilmaril@408
    77
	virtual QString getSystemFlagName (const QPointF &p);
insilmaril@236
    78
	virtual bool isActiveFlag(const QString&);	// check if flag is set
insilmaril@160
    79
	virtual void updateNoteFlag();
insilmaril@417
    80
	virtual void getNoteFromTextEditor ();
insilmaril@366
    81
	virtual void updateFlagsToolbar();
insilmaril@243
    82
	virtual void setHideInExport(bool);		// set export of object (and childs)
insilmaril@243
    83
	virtual bool hideInExport();
insilmaril@260
    84
	virtual bool isHidden ();
insilmaril@628
    85
	virtual QString getOrnXMLAttr();		// get attributes for saveToDir
insilmaril@0
    86
insilmaril@0
    87
protected:
insilmaril@0
    88
    HeadingObj *heading;			// Heading
insilmaril@0
    89
	NoteObj note;					// Notes
insilmaril@417
    90
	bool isNoteInEditor;			// true if TextEditor has this note
insilmaril@0
    91
	FlagRowObj *systemFlags;		// System Flags
insilmaril@0
    92
	FlagRowObj *standardFlags;		// Standard Flags
insilmaril@442
    93
	FrameObj *frame;				// frame around object
insilmaril@408
    94
	QRectF ornamentsBBox;			// bbox of flags and heading
insilmaril@243
    95
	QString url;					// url to external doc
insilmaril@243
    96
	QString vymLink;				// path to another map
insilmaril@628
    97
	QList <Attribute> attributes;	// List with attributes
insilmaril@628
    98
insilmaril@243
    99
	bool hideExport;				// hide in exports if set
insilmaril@260
   100
	bool hidden;					// true if temporary hidden
insilmaril@0
   101
};
insilmaril@0
   102
insilmaril@0
   103
#endif