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