branchitem.h
author insilmaril
Thu, 07 May 2009 08:48:53 +0000
changeset 766 7a71a914afdb
parent 760 59614eaf5fbb
child 767 6d2b32f305f9
permissions -rw-r--r--
Started to reanimate flags
     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 	virtual void updateVisibility();
    23 
    24 protected:
    25 	QString vymLink;
    26 public:	
    27 	virtual void setVymLink (QString);
    28     virtual QString getVymLink ();
    29 
    30 	virtual void setHeadingColor (QColor color); //!Overloaded from TreeItem to update QGraphicsView
    31 
    32 protected:	
    33 	bool scrolled;			// true if all children are scrolled and thus invisible
    34 	bool tmpUnscrolled;		// can only be true (temporary) for a scrolled subtree
    35 public:
    36 	virtual void unScroll();				
    37 	virtual void toggleScroll();			// scroll or unscroll
    38 	virtual bool isScrolled();				// returns scroll state
    39 	virtual bool hasScrolledParent(BranchItem*);	// true, if any of the parents is scrolled
    40 	virtual void tmpUnscroll();				// unscroll scrolled parents temporary e.g. during "find" process
    41 	virtual void resetTmpUnscroll();		// scroll all tmp scrolled parents again e.g. when unselecting
    42 
    43 	TreeItem* findMapItem (QPointF p,TreeItem* excludeTI);	//! search map for branches or images. Ignore excludeTI, where search is started 
    44 	virtual TreeItem* findID (QString sid);		//! search map for object with ID string
    45 
    46 	virtual BranchObj* getBranchObj();	
    47 	virtual BranchObj* createMapObj(QGraphicsScene *scene);		//! Create classic object in GraphicsView
    48 };
    49 
    50 #endif