10 /*! \brief xlinks are used to draw arbitrary connections between branches (BranchObj) in the map. */
12 /////////////////////////////////////////////////////////////////////////////
13 class XLinkItem:public MapItem {
15 enum XLinkState {undefinedXLink,initXLink,activeXLink,deleteXLink};
17 XLinkItem (const QList<QVariant> &data, TreeItem *parent=NULL);
18 virtual ~XLinkItem ();
20 void setBegin (BranchItem*);
21 BranchItem* getBegin();
22 void setEnd (BranchItem*);
23 void setEnd (QPointF);
25 void setColor(QColor);
29 bool activate (); //! Creates a 2nd XLink (without a XLinkObj attached)
30 bool isBegin(); //! true, if this is master xLink, which may have an XLinkObj attached
32 virtual void updateVisibility(); // FIXME-3 not really needed atm...
33 BranchItem* getPartnerBranch ();
34 BranchItem* getOtherBranch (TreeItem *ti);
35 XLinkItem *getPartnerXLink(); //! Partner XLink
37 virtual XLinkObj* createMapObj(QGraphicsScene *scene);
40 XLinkState xLinkState; // init during drawing or active
43 BranchItem *beginBranch;
44 BranchItem *endBranch;
45 XLinkItem *partnerXLink;