diff -r f0fe7c36ec5c -r 43268373032d xlinkitem.h --- a/xlinkitem.h Fri Apr 09 14:24:04 2010 +0000 +++ b/xlinkitem.h Wed Jun 09 13:14:08 2010 +0000 @@ -2,14 +2,16 @@ #define XLINKITEM_H class BranchItem; +class QGraphicsScene; class XLinkObj; -class QGraphicsScene; #include "mapitem.h" +#include "xlink.h" /*! \brief xlinks are used to draw arbitrary connections between branches (BranchObj) in the map. */ ///////////////////////////////////////////////////////////////////////////// + class XLinkItem:public MapItem { public: enum XLinkState {undefinedXLink,initXLink,activeXLink,deleteXLink}; @@ -17,33 +19,13 @@ XLinkItem (const QList &data, TreeItem *parent=NULL); virtual ~XLinkItem (); virtual void init (); - void setBegin (BranchItem*); - BranchItem* getBegin(); - void setEnd (BranchItem*); - void setEnd (QPointF); - BranchItem* getEnd(); - void setColor(QColor); - QColor getColor(); - void setWidth (int); - int getWidth (); - bool activate (); //! Creates a 2nd XLink (without a XLinkObj attached) - bool isBegin(); //! true, if this is master xLink, which may have an XLinkObj attached + void setLink (Link*); + Link* getLink (); void updateXLink(); - virtual void updateVisibility(); // FIXME-3 not really needed atm... BranchItem* getPartnerBranch (); - BranchItem* getOtherBranch (TreeItem *ti); - XLinkItem *getPartnerXLink(); //! Partner XLink - QString saveToDir (); - virtual XLinkObj* createMapObj(QGraphicsScene *scene); private: - XLinkState xLinkState; // init during drawing or active - QColor color; - int width; - BranchItem *beginBranch; - BranchItem *endBranch; - XLinkItem *partnerXLink; - bool isBeginXLink; + Link *link; }; #endif