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