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