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