branchitem.h
author insilmaril
Thu, 23 Apr 2009 12:15:31 +0000
changeset 755 ed5b407975b3
parent 754 db0ec4bcf416
child 756 a8a5c7288f57
permissions -rw-r--r--
more data in Tree, less in Map
     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     ~BranchItem();
    16 	void copy (BranchItem *item);
    17 
    18 	QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset);
    19 
    20 	virtual void updateVisibility();
    21 
    22 protected:
    23 	QString vymLink;
    24 public:	
    25 	virtual void setVymLink (QString);
    26     virtual QString getVymLink ();
    27 
    28 protected:	
    29 	bool scrolled;			// true if all children are scrolled and thus invisible
    30 	bool tmpUnscrolled;		// can only be true (temporary) for a scrolled subtree
    31 public:
    32 	virtual void unScroll();				
    33 	virtual void toggleScroll();			// scroll or unscroll
    34 	virtual bool isScrolled();				// returns scroll state
    35 	virtual bool hasScrolledParent(BranchItem*);	// true, if any of the parents is scrolled
    36 	virtual void tmpUnscroll();				// unscroll scrolled parents temporary e.g. during "find" process
    37 	virtual void resetTmpUnscroll();		// scroll all tmp scrolled parents again e.g. when unselecting
    38 
    39 	TreeItem* findMapItem (QPointF,TreeItem*);	//! search map for branches or images
    40 	virtual TreeItem* findID (QString sid);		//! search map for object with ID string
    41 
    42 	BranchObj* getBranchObj();	
    43 	BranchObj* createMapObj(QGraphicsScene *scene);		//! Create classic object in GraphicsView
    44 };
    45 
    46 #endif