diff -r 7e69734a51c4 -r 0ed77eb5d1cd linkobj.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linkobj.h Sun Jan 30 23:28:08 2005 +0000 @@ -0,0 +1,36 @@ +#ifndef LINKOBJ_H +#define LINKOBJ_H + +#include "linkablemapobj.h" + +enum LinkState {undefinedLink,initLink,activeLink,deleteLink}; + +///////////////////////////////////////////////////////////////////////////// +class LinkObj:public MapObj { +public: + LinkObj (); + LinkObj (QCanvas*); + ~LinkObj (); + virtual void init (); + virtual void copy (LinkObj*); + void setBegin (BranchObj*); + void setEnd (BranchObj*); + void setEnd (QPoint); + bool activate (); // Sets pointers in branchObjects + void deactivate(); // removes those pointers + bool isUsed(); // true, if at least on branch uses it + void updateLink(); + void positionBBox(); + void calcBBoxSize(); + void setVisibility (bool); + +private: + QCanvasLine *line; + BranchObj *beginBranch; + BranchObj *endBranch; + LinkState linkState; // init during drawing or active + QPoint beginPos; + QPoint endPos; +}; + +#endif