diff -r 7a96bd401351 -r caba269c3757 linkablemapobj.h --- a/linkablemapobj.h Sun Jan 30 12:58:47 2005 +0000 +++ b/linkablemapobj.h Thu Aug 31 12:51:20 2006 +0000 @@ -5,6 +5,9 @@ #include "noteobj.h" #include "headingobj.h" #include "flagrowobj.h" +//Added by qt3to4: +#include +#include #define MAX_DEPTH 999 @@ -23,7 +26,7 @@ Q_OBJECT public: LinkableMapObj (); - LinkableMapObj (QCanvas*); + LinkableMapObj (Q3Canvas*); LinkableMapObj (LinkableMapObj*); ~LinkableMapObj (); virtual void delLink(); @@ -33,9 +36,22 @@ virtual void setParObj (LinkableMapObj*); virtual void setParObjTmp (LinkableMapObj*,QPoint,int); // Only for moving Obj around virtual void unsetParObjTmp(); // reuse original ParObj + virtual bool hasParObjTmp(); + + virtual void setUseRelPos (const bool&); + virtual void setRelPos(); // set relPos to current parentPos + virtual void setRelPos(const QPoint&); + virtual void setUseOrientation (const bool &); + + + virtual int getTopPad(); + virtual int getLeftPad(); + virtual int getRightPad(); LinkStyle getDefLinkStyle(); void setLinkStyle(LinkStyle); LinkStyle getLinkStyle(); + void setHideLinkUnselected(bool); + bool getHideLinkUnselected(); void setLinkPos (LinkPos); LinkPos getLinkPos (); @@ -51,6 +67,8 @@ // redraw link with given style LinkableMapObj* getChildObj(); // returns pointer to fromObj LinkableMapObj* getParObj(); // returns pointer to toObj + virtual LinkableMapObj* findObjBySelect(QString s); // find obj by selectstring + virtual void setDockPos(); // sets childPos and parPos QPoint getChildPos(); // returns pos where childs dock QPoint getParPos(); // returns pos where parents dock QPoint getRelPos(); // get position relative to parent (or (0,0)) @@ -75,9 +93,12 @@ virtual void select(); virtual void unselect(); virtual QString getSelectString()=0; + virtual QString saveToDir (const QString&,const QString&, const QPoint&)=0;// Save data to tempdir protected: - void parabel(QPointArray &,double,double,double,double); // Create Parabel connecting two points + void parabel(Q3PointArray &,double,double,double,double); // Create Parabel connecting two points + QString getLinkAttr(); + QPoint childPos; QPoint parPos; bool link2ParPos; // While moving around, sometimes link to parent @@ -90,24 +111,31 @@ LinkableMapObj* childObj; LinkableMapObj* parObj; LinkableMapObj* parObjTmpBuf; // temporary buffer the original parent - int offset; // vertical offset of dockpos to pos + int bottomlineY; // vertical offset of dockpos to pos int thickness_start; // for StylePoly* - LinkStyle style; - LinkPos linkpos; + LinkStyle style; // Current style + LinkPos linkpos; // Link at bottom of object or middle of height QColor linkcolor; // Link color - QCanvasLine* l; // line style - QCanvasPolygon* p; // poly styles + Q3CanvasLine* l; // line style + Q3CanvasPolygon* p; // poly styles int arcsegs; // arc: number of segments - QPtrList segment; // a part of e.g. the parabel - QPointArray pa0; // For drawing of PolyParabel and PolyLine - QPointArray pa1; // For drawing of PolyParabel - QPointArray pa2; // For drawing of PolyParabel - QCanvasLine* bottomline; // on bottom of BBox + Q3PtrList segment; // a part of e.g. the parabel + Q3PointArray pa0; // For drawing of PolyParabel and PolyLine + Q3PointArray pa1; // For drawing of PolyParabel + Q3PointArray pa2; // For drawing of PolyParabel + Q3CanvasLine* bottomline; // on bottom of BBox bool repositionRequest; // bool selected; // Used for marking the selection - QCanvasRectangle* selbox; + bool hideLinkUnselected; // to hide links if unselected + Q3CanvasRectangle* selbox; FrameObj *frame; // frame around object + int topPad, botPad, + leftPad, rightPad; // padding within bbox + + QPoint relPos; // position relative to childPos of parent + bool useRelPos; + bool useOrientation; }; #endif