-
Notifications
You must be signed in to change notification settings - Fork 6
/
branchobj.h
63 lines (46 loc) · 1.94 KB
/
branchobj.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef BRANCHOBJ_H
#define BRANCHOBJ_H
#include "floatimageobj.h"
#include "linkablemapobj.h"
#include "ornamentedobj.h"
#include "xlinkobj.h"
/*! \brief A branch visible in the map */
/////////////////////////////////////////////////////////////////////////////
class BranchObj:public OrnamentedObj {
public:
/*! New branches will get use same color for heading as parent */
enum BranchModification {NewBranch, MovedBranch};
BranchObj (QGraphicsItem *parent=NULL,TreeItem *ti=NULL);
~BranchObj ();
virtual void init ();
virtual void copy (BranchObj*);
void clear();
virtual void setParObjTmp (LinkableMapObj*,QPointF,int);// Only for moving Obj around
virtual void unsetParObjTmp(); // reuse original ParObj
virtual void setVisibility(bool,int); // set visibility
virtual void setVisibility(bool); // set vis. for w
virtual void setLinkColor(); // set the color of link
virtual void positionContents();
virtual void move (double x,double y);
virtual void move (QPointF);
virtual void moveBy (double x,double y);
virtual void moveBy (QPointF);
virtual void positionBBox();
virtual void calcBBoxSize();
virtual void setDockPos();
virtual void updateData(); //! Update represantatio of heading, flags, etc.
public:
virtual void setDefAttr (BranchModification, bool keepFrame=false); // set default attributes (frame, font, size, ...)
virtual void alignRelativeTo(const QPointF, bool alignSelf=false );
virtual void reposition();
virtual void unsetAllRepositionRequests();
virtual QRectF getTotalBBox(); // return size of BBox including children
virtual ConvexPolygon getBoundingPolygon();
virtual void calcBBoxSizeWithChildren(); // calc size of BBox including children recursivly
virtual void setAnimation(const AnimPoint &ap);
virtual void stopAnimation();
virtual bool animate();
protected:
AnimPoint anim;
};
#endif