1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/linkobj.h Sun Jan 30 23:28:08 2005 +0000
1.3 @@ -0,0 +1,36 @@
1.4 +#ifndef LINKOBJ_H
1.5 +#define LINKOBJ_H
1.6 +
1.7 +#include "linkablemapobj.h"
1.8 +
1.9 +enum LinkState {undefinedLink,initLink,activeLink,deleteLink};
1.10 +
1.11 +/////////////////////////////////////////////////////////////////////////////
1.12 +class LinkObj:public MapObj {
1.13 +public:
1.14 + LinkObj ();
1.15 + LinkObj (QCanvas*);
1.16 + ~LinkObj ();
1.17 + virtual void init ();
1.18 + virtual void copy (LinkObj*);
1.19 + void setBegin (BranchObj*);
1.20 + void setEnd (BranchObj*);
1.21 + void setEnd (QPoint);
1.22 + bool activate (); // Sets pointers in branchObjects
1.23 + void deactivate(); // removes those pointers
1.24 + bool isUsed(); // true, if at least on branch uses it
1.25 + void updateLink();
1.26 + void positionBBox();
1.27 + void calcBBoxSize();
1.28 + void setVisibility (bool);
1.29 +
1.30 +private:
1.31 + QCanvasLine *line;
1.32 + BranchObj *beginBranch;
1.33 + BranchObj *endBranch;
1.34 + LinkState linkState; // init during drawing or active
1.35 + QPoint beginPos;
1.36 + QPoint endPos;
1.37 +};
1.38 +
1.39 +#endif