branchitem.h
author insilmaril
Tue, 07 Jul 2009 09:34:24 +0000
changeset 779 1fb50e79661c
parent 777 8acac4fade1b
child 780 fe839bdfd10c
permissions -rw-r--r--
Hiding of links works again
     1 #ifndef BRANCHITEM_H
     2 #define BRANCHITEM_H
     3 
     4 //#include "treeitem.h"
     5 #include "mapitem.h"
     6 
     7 
     8 class QString;
     9 class BranchObj;
    10 class QGraphicsScene;
    11 
    12 class BranchItem:public MapItem
    13 {
    14 public:
    15     BranchItem(const QList<QVariant> &data, TreeItem *parent = 0);
    16     virtual ~BranchItem();
    17 	virtual void copy (BranchItem *item);
    18 
    19 	virtual void insertBranch (int pos,BranchItem *branch);
    20 
    21 	virtual QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset);
    22 
    23 	virtual void updateVisibility();
    24 
    25 protected:
    26 	QString vymLink;
    27 public:	
    28 	virtual void setVymLink (QString);
    29     virtual QString getVymLink ();
    30 
    31 	virtual void setHeadingColor (QColor color); //!Overloaded from TreeItem to update QGraphicsView
    32 
    33 protected:	
    34 	bool scrolled;			// true if all children are scrolled and thus invisible
    35 	bool tmpUnscrolled;		// can only be true (temporary) for a scrolled subtree
    36 public:
    37 	virtual void unScroll();				
    38 	virtual bool toggleScroll();			// scroll or unscroll
    39 	virtual bool isScrolled();				// returns scroll state
    40 	virtual bool hasScrolledParent(BranchItem*);	// true, if any of the parents is scrolled
    41 	virtual void tmpUnscroll();				// unscroll scrolled parents temporary e.g. during "find" process
    42 	virtual void resetTmpUnscroll();		// scroll all tmp scrolled parents again e.g. when unselecting
    43 
    44 	TreeItem* findMapItem (QPointF p,TreeItem* excludeTI);	//! search map for branches or images. Ignore excludeTI, where search is started 
    45 	virtual TreeItem* findID (QString sid);	//! search map for object with ID string
    46 
    47 	virtual void updateStyles ();			//! update related fonts, parObjects, links, ...
    48 	virtual BranchObj* getBranchObj();	
    49 	virtual BranchObj* createMapObj(QGraphicsScene *scene);		//! Create classic object in GraphicsView
    50 };
    51 
    52 #endif