diff -r 000000000000 -r 9aadd0f58300 xlinkobj.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xlinkobj.h Tue Aug 15 11:42:10 2006 +0000 @@ -0,0 +1,50 @@ +#ifndef XLINKOBJ_H +#define XLINKOBJ_H + +#include "linkablemapobj.h" + +enum XLinkState {undefinedXLink,initXLink,activeXLink,deleteXLink}; + +///////////////////////////////////////////////////////////////////////////// +class XLinkObj:public MapObj { +public: + XLinkObj (); + XLinkObj (Q3Canvas*); + ~XLinkObj (); + virtual void init (); + virtual void copy (XLinkObj*); + void setBegin (BranchObj*); + BranchObj* getBegin(); + void setEnd (BranchObj*); + void setEnd (QPoint); + BranchObj* getEnd(); + void setColor(QColor); + QColor getColor(); + void setWidth (int); + int getWidth (); + bool activate (); // Sets pointers in branchObjects + void deactivate(); // removes those pointers + bool isUsed(); // true, if at least on branch uses it + void updateXLink(); + BranchObj* otherBranch (BranchObj*); + void positionBBox(); + void calcBBoxSize(); + void setVisibility (bool); + void setVisibility (); + QString saveToDir (); + +private: + static int arrowSize; + QColor color; + int width; + Q3CanvasLine *line; + Q3CanvasPolygon *poly; + BranchObj *beginBranch; + BranchObj *endBranch; + BranchObj *visBranch; // the "visible" part of a partially scrolled link + XLinkState xLinkState; // init during drawing or active + QPoint beginPos; + QPoint endPos; +}; + +#endif