15 class BranchItem:public MapItem
18 enum LayoutHint {AutoPositioning, FreePositioning};
20 BranchItem(const QList<QVariant> &data, TreeItem *parent = 0);
21 virtual ~BranchItem();
23 virtual void copy (BranchItem *item);
24 virtual BranchItem* parentBranch();
26 virtual void insertBranch (int pos,BranchItem *branch);
28 virtual QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset,QList <Link*> &tmpLinks);
30 virtual void updateVisibility();
32 virtual void setHeadingColor (QColor color); //!Overloaded from TreeItem to update QGraphicsView
35 bool scrolled; // true if all children are scrolled and thus invisible
36 bool tmpUnscrolled; // can only be true (temporary) for a scrolled subtree
39 void updateTaskFlag();
40 void setTask (Task* t);
46 virtual void unScroll();
47 virtual bool toggleScroll(); // scroll or unscroll
48 virtual bool isScrolled(); // returns scroll state
49 virtual bool hasScrolledParent(BranchItem* start=NULL); // true, if any of the parents is scrolled
50 virtual bool tmpUnscroll(BranchItem* start=NULL); // unscroll scrolled parents temporary e.g. during "find" process
51 virtual bool resetTmpUnscroll(); // scroll all tmp scrolled parents again e.g. when unselecting
52 virtual void sortChildren(bool inverse=false); //! Sort children
53 virtual void setChildrenLayout(BranchItem::LayoutHint layoutHint);
54 virtual BranchItem::LayoutHint getChildrenLayout();
57 bool includeImagesVer; //! include floatimages in bbox vertically
58 bool includeImagesHor; //! include floatimages in bbox horizontally
59 bool includeChildren; //! include children in frame
60 LayoutHint childrenLayout; //! should children be positioned freely?
63 void setIncludeImagesVer(bool);
64 bool getIncludeImagesVer();
65 void setIncludeImagesHor(bool);
66 bool getIncludeImagesHor();
67 QString getIncludeImageAttr();
68 BranchItem* getFramedParentBranch(BranchItem *start);
69 void setFrameIncludeChildren(bool);
70 bool getFrameIncludeChildren();
73 int lastSelectedBranchNum;
74 int lastSelectedBranchNumAlt;
76 virtual void setLastSelectedBranch(); //! Set myself as last selected in parent
77 virtual void setLastSelectedBranch(int i); //! Set last selected branch directly
78 virtual BranchItem* getLastSelectedBranch(); //! Returns last selected branch usually
79 virtual BranchItem* getLastSelectedBranchAlt(); //! Used to return last selected branch left of a mapcenter
82 TreeItem* findMapItem (QPointF p,TreeItem* excludeTI); //! search map for branches or images. Ignore excludeTI, where search is started
84 virtual void updateStyles (const bool &keepFrame=false); //! update related fonts, parObjects, links, ...
85 virtual BranchObj* getBranchObj();
86 virtual BranchObj* createMapObj(QGraphicsScene *scene); //! Create classic object in GraphicsView