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