4 #include "linkablemapobj.h"
6 enum XLinkState {undefinedXLink,initXLink,activeXLink,deleteXLink};
8 /*! \brief xlinks are used to draw arbitrary connections between branches (BranchObj) in the map. */
10 /////////////////////////////////////////////////////////////////////////////
11 class XLinkObj:public MapObj {
14 XLinkObj (QGraphicsScene*);
17 virtual void copy (XLinkObj*);
18 void setBegin (BranchObj*);
19 BranchObj* getBegin();
20 void setEnd (BranchObj*);
21 void setEnd (QPointF);
23 void setColor(QColor);
27 bool activate (); // Sets pointers in branchObjects
28 void deactivate(); // removes those pointers
29 bool isUsed(); // true, if at least on branch uses it
31 BranchObj* otherBranch (BranchObj*);
34 void setVisibility (bool);
35 void setVisibility ();
43 QGraphicsLineItem *line;
44 QGraphicsPolygonItem *poly;
45 BranchObj *beginBranch;
47 BranchObj *visBranch; // the "visible" part of a partially scrolled link
48 XLinkState xLinkState; // init during drawing or active