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