]> git.sven.stormbind.net Git - sven/vym.git/blob - xlinkitem.h
4e9ce0af77bbe0f112791d118e5fbecffb6d1d20
[sven/vym.git] / xlinkitem.h
1 #ifndef XLINKITEM_H
2 #define XLINKITEM_H
3
4 class BranchItem;
5 class QGraphicsScene;
6 class XLinkObj;
7
8 #include "mapitem.h"
9 #include "xlink.h"
10
11 /*! \brief xlinks are used to draw arbitrary connections between branches (BranchObj) in the map. */
12
13 /////////////////////////////////////////////////////////////////////////////
14
15 class XLinkItem:public MapItem {
16 public:
17     enum XLinkState {undefinedXLink,initXLink,activeXLink,deleteXLink}; 
18
19     XLinkItem (const QList<QVariant> &data, TreeItem *parent=NULL);
20     ~XLinkItem ();
21     void init ();
22     void clear ();
23     void setLink (Link*);
24     Link* getLink ();
25     void updateXLink();
26     MapObj* getMO();
27     void setSelection();
28     BranchItem* getPartnerBranch ();
29
30
31 private:
32     Link *link;
33 };
34
35 #endif