Removed some FIXMEs. Added translations
4 #include "floatimageobj.h"
5 #include "linkablemapobj.h"
6 #include "ornamentedobj.h"
10 enum BranchModification {NewBranch, MovedBranch};
11 enum HideTmpMode {HideNone, HideExport};
13 bool isAbove(BranchObj*,BranchObj*);
15 /////////////////////////////////////////////////////////////////////////////
16 class BranchObj:public OrnamentedObj {
19 BranchObj (QGraphicsScene*);
20 BranchObj (QGraphicsScene*, LinkableMapObj* parent);
22 bool operator< ( const BranchObj & );
23 bool operator== ( const BranchObj & );
25 virtual void copy (BranchObj*);
27 virtual int getNum(); // return number of this in parent
28 virtual int getNum(BranchObj*); // return number of this in parent
29 virtual int getFloatImageNum(FloatImageObj*);
30 virtual int countBranches();
31 virtual int countFloatImages();
32 virtual int countXLinks();
33 virtual void setParObjTmp (LinkableMapObj*,QPointF,int);// Only for moving Obj around
34 virtual void unsetParObjTmp(); // reuse original ParObj
36 virtual void unScroll();
37 virtual void toggleScroll(); // scroll or unscroll
38 virtual bool isScrolled(); // returns scroll state
39 virtual bool hasScrolledParent(BranchObj*); // true, if any of the parents is scrolled
40 virtual void tmpUnscroll(); // unscroll scrolled parents temporary e.g. during "find" process
41 virtual void resetTmpUnscroll(); // scroll all tmp scrolled parents again e.g. when unselecting
43 virtual void setVisibility(bool,int); // set visibility
44 virtual void setVisibility(bool); // set vis. for w
45 virtual void setLinkColor(); // set the color of link
46 virtual void setColorChilds(QColor); // set the color of heading
48 BranchObj* first (); // set Iterator to first LMO
49 BranchObj* next (); // find next LMO after given one
50 BranchObj* getLastIterator(); // to interrupt and resume next iteration
51 void setLastIterator (BranchObj*); // needed by next()
53 virtual void positionContents();
54 virtual void move (double x,double y);
55 virtual void move (QPointF);
56 virtual void moveBy (double x,double y);
57 virtual void moveBy (QPointF);
58 virtual void positionBBox();
59 virtual void calcBBoxSize();
60 virtual void setDockPos();
61 virtual LinkableMapObj* findMapObj(QPointF,LinkableMapObj*); // find MapObj
62 virtual void setHeading (QString);
64 virtual void setHideTmp (HideTmpMode);
65 virtual bool hasHiddenExportParent (BranchObj*);
67 virtual QString saveToDir (const QString&,const QString&, const QPointF&);// Save data recursivly to tempdir
68 virtual void addXLink (XLinkObj*);
69 virtual void removeXLinkRef (XLinkObj*);// Remove ref in list
70 virtual void deleteXLink (XLinkObj*); // remove references and delete XLinkObj
71 virtual void deleteXLinkAt (int); // remove references and delete XLinkObj
72 virtual XLinkObj* XLinkAt (int); // return reference of XLinkObj
73 virtual int countXLink ();
74 virtual BranchObj* XLinkTargetAt (int);
75 void setIncludeImagesVer(bool);
76 bool getIncludeImagesVer();
77 void setIncludeImagesHor(bool);
78 bool getIncludeImagesHor();
79 QString getIncludeImageAttr();
80 virtual FloatImageObj* addFloatImage();
81 virtual FloatImageObj* addFloatImage(FloatImageObj*);
82 virtual void removeFloatImage(FloatImageObj*);
83 virtual FloatImageObj* getFirstFloatImage();
84 virtual FloatImageObj* getLastFloatImage();
85 virtual FloatImageObj* getFloatImageNum(const uint &);
87 virtual void savePosInAngle(); // write pos in angle for resorting
88 virtual void setDefAttr (BranchModification); // set default attributes (font, size, ...)
90 virtual BranchObj* addBranch();
91 virtual BranchObj* addBranch(BranchObj*); // makes deep copy of BranchObj
92 virtual BranchObj* addBranchPtr(BranchObj*); // just adds pointer
93 virtual BranchObj* insertBranch(int);
94 virtual BranchObj* insertBranch(BranchObj*,int);
95 virtual BranchObj* insertBranchPtr (BranchObj*,int);
96 virtual void removeBranchHere(BranchObj*);
97 virtual void removeChilds();
98 virtual void removeBranch(BranchObj*);
99 virtual void removeBranchPtr (BranchObj*);
100 virtual void setLastSelectedBranch(BranchObj*);
101 virtual BranchObj* getLastSelectedBranch();
102 virtual BranchObj* getFirstBranch();
103 virtual BranchObj* getLastBranch();
104 virtual BranchObj* getBranchNum(int);
105 virtual bool canMoveBranchUp();
106 virtual BranchObj* moveBranchUp(BranchObj*);
107 virtual bool canMoveBranchDown();
108 virtual BranchObj* moveBranchDown(BranchObj*);
109 virtual BranchObj* moveBranchTo (BranchObj*, int);
110 virtual void alignRelativeTo(const QPointF );
111 virtual void reposition();
112 virtual void unsetAllRepositionRequests();
114 virtual QRectF getTotalBBox(); // return BBox including childs
115 virtual QRectF getBBoxSizeWithChilds(); // return size of BBox including childs
116 virtual void calcBBoxSizeWithChilds(); // calc size of BBox including childs recursivly
118 virtual void select();
119 virtual void unselect();
120 virtual QString getSelectString();
123 static BranchObj* itLast; // iterator for first(), next()
124 static BranchObj* itFirst; // first iterator for first(), next()
125 QList<BranchObj*> branch; // all child branches
126 QList<FloatImageObj*> floatimage;// child images
127 QList<XLinkObj*> xlink; // xlinks to other branches
129 float angle; // used in mainbranch to reorder mainbranches
131 int lastSelectedBranch; // for going deeper into tree
132 bool scrolled; // true if all childs are scrolled and thus invisible
133 bool tmpUnscrolled; // can only be true (temporary) for a scrolled subtree
134 bool includeImagesVer; // include floatimages in bbox vertically
135 bool includeImagesHor; // include floatimages in bbox horizontally