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