diff -r 192e1392ba6a -r 12958f987bcf linkablemapobj.h --- a/linkablemapobj.h Wed Jul 16 10:44:44 2008 +0000 +++ b/linkablemapobj.h Wed Jul 16 10:46:14 2008 +0000 @@ -9,6 +9,7 @@ #define MAX_DEPTH 999 class MapEditor; +class VymModel; @@ -55,6 +56,10 @@ virtual void delLink(); virtual void init (); virtual void copy (LinkableMapObj*); + + virtual void setModel (VymModel *vm); + virtual VymModel* getModel (); + void setChildObj (LinkableMapObj*); virtual void setParObj (LinkableMapObj*); virtual void setParObjTmp (LinkableMapObj*,QPointF,int); // Only for moving Obj around @@ -94,12 +99,12 @@ LinkableMapObj* getParObj(); // returns pointer to toObj virtual LinkableMapObj* findObjBySelect(QString s); // find obj by selectstring virtual void setDockPos()=0; // sets childPos and parPos - QPointF getChildPos(); // returns pos where childs dock + QPointF getChildPos(); // returns pos where children dock QPointF getParPos(); // returns pos where parents dock Orientation getOrientation(); // get orientation virtual int getDepth(); // return depth - virtual void setMapEditor(MapEditor*); // set MapEditor (needed in LMO::updateNoteFlag) - virtual MapEditor* getMapEditor(); // get MapEditor (usually from parent); + virtual void setMapEditor(MapEditor*); // set MapEditor (needed in LMO::updateNoteFlag) FIXME not needed + virtual MapEditor* getMapEditor(); // get MapEditor (usually from parent); FIXME not needed virtual QPointF getRandPos(); // make randomised position virtual void reposition(); @@ -108,7 +113,7 @@ // of mapeditor e.g. in noteeditor virtual bool repositionRequested(); - virtual void calcBBoxSizeWithChilds()=0;// calc size of BBox including childs recursivly + virtual void calcBBoxSizeWithChildren()=0;// calc size of BBox including children recursivly virtual void select(); virtual void unselect(); @@ -120,13 +125,15 @@ QPointF childPos; QPointF parPos; bool link2ParPos; // While moving around, sometimes link to parent - MapEditor* mapEditor; // for and toggleScroll(), get default styles + MapEditor* mapEditor; // for and toggleScroll(), get default styles FIXME should not be needed with model available // and mapEditor->updateActions() // and mapEditor->updateSelection() + + VymModel* model; Orientation orientation; qreal linkwidth; // width of a link int depth; // depth: undef=-1 mapCenter=0 branch=1..n - QRectF bboxTotal; // bounding box including childs + QRectF bboxTotal; // bounding box including children LinkableMapObj* childObj; LinkableMapObj* parObj;