15 class BranchItem:public MapItem
18 BranchItem(const QList<QVariant> &data, TreeItem *parent = 0);
19 virtual ~BranchItem();
20 virtual void copy (BranchItem *item);
21 virtual BranchItem* parentBranch();
23 virtual void insertBranch (int pos,BranchItem *branch);
25 virtual QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset,QList <Link*> &tmpLinks);
27 virtual void updateVisibility();
29 virtual void setHeadingColor (QColor color); //!Overloaded from TreeItem to update QGraphicsView
32 bool scrolled; // true if all children are scrolled and thus invisible
33 bool tmpUnscrolled; // can only be true (temporary) for a scrolled subtree
35 virtual void unScroll();
36 virtual bool toggleScroll(); // scroll or unscroll
37 virtual bool isScrolled(); // returns scroll state
38 virtual bool hasScrolledParent(BranchItem*); // true, if any of the parents is scrolled
39 virtual bool tmpUnscroll(); // unscroll scrolled parents temporary e.g. during "find" process
40 virtual bool resetTmpUnscroll(); // scroll all tmp scrolled parents again e.g. when unselecting
41 virtual void sortChildren(bool inverse=false); //! Sort children
44 bool includeImagesVer; //! include floatimages in bbox vertically
45 bool includeImagesHor; //! include floatimages in bbox horizontally
47 void setIncludeImagesVer(bool);
48 bool getIncludeImagesVer();
49 void setIncludeImagesHor(bool);
50 bool getIncludeImagesHor();
51 QString getIncludeImageAttr();
54 int lastSelectedBranchNum;
55 int lastSelectedBranchNumAlt;
57 virtual void setLastSelectedBranch(); //! Set myself as last selected in parent
58 virtual void setLastSelectedBranch(int i); //! Set last selected branch directly
59 virtual BranchItem* getLastSelectedBranch(); //! Returns last selected branch usually
60 virtual BranchItem* getLastSelectedBranchAlt(); //! Used to return last selected branch left of a mapcenter
63 TreeItem* findMapItem (QPointF p,TreeItem* excludeTI); //! search map for branches or images. Ignore excludeTI, where search is started
65 virtual void updateStyles (const bool &keepFrame=false); //! update related fonts, parObjects, links, ...
66 virtual BranchObj* getBranchObj();
67 virtual BranchObj* createMapObj(QGraphicsScene *scene); //! Create classic object in GraphicsView