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