linkablemapobj.h
changeset 721 12958f987bcf
parent 683 7df0b7986274
child 726 7f43b93242aa
     1.1 --- a/linkablemapobj.h	Wed Jul 16 10:44:44 2008 +0000
     1.2 +++ b/linkablemapobj.h	Wed Jul 16 10:46:14 2008 +0000
     1.3 @@ -9,6 +9,7 @@
     1.4  #define MAX_DEPTH 999
     1.5  
     1.6  class MapEditor;
     1.7 +class VymModel;
     1.8  
     1.9  
    1.10  
    1.11 @@ -55,6 +56,10 @@
    1.12  	virtual void delLink();
    1.13      virtual void init ();
    1.14      virtual void copy (LinkableMapObj*);
    1.15 +
    1.16 +	virtual void setModel (VymModel *vm);
    1.17 +	virtual VymModel* getModel ();
    1.18 +
    1.19      void setChildObj (LinkableMapObj*);
    1.20      virtual void setParObj (LinkableMapObj*);
    1.21      virtual void setParObjTmp (LinkableMapObj*,QPointF,int);	// Only for moving Obj around
    1.22 @@ -94,12 +99,12 @@
    1.23      LinkableMapObj* getParObj();			// returns pointer to toObj
    1.24      virtual LinkableMapObj* findObjBySelect(QString s);	// find obj by selectstring
    1.25  	virtual void setDockPos()=0;				// sets childPos and parPos
    1.26 -    QPointF getChildPos();					// returns pos where childs dock
    1.27 +    QPointF getChildPos();					// returns pos where children dock
    1.28      QPointF getParPos();						// returns pos where parents dock
    1.29      Orientation getOrientation();			// get orientation
    1.30      virtual int getDepth();					// return depth
    1.31 -	virtual void setMapEditor(MapEditor*);	// set MapEditor (needed in LMO::updateNoteFlag)
    1.32 -	virtual MapEditor* getMapEditor();		// get MapEditor (usually from parent);
    1.33 +	virtual void setMapEditor(MapEditor*);	// set MapEditor (needed in LMO::updateNoteFlag) FIXME not needed
    1.34 +	virtual MapEditor* getMapEditor();		// get MapEditor (usually from parent);          FIXME not needed
    1.35  	virtual QPointF getRandPos();			// make randomised position
    1.36  
    1.37  	virtual void reposition();
    1.38 @@ -108,7 +113,7 @@
    1.39  											// of mapeditor e.g. in noteeditor
    1.40  	virtual bool repositionRequested();
    1.41  
    1.42 -	virtual void calcBBoxSizeWithChilds()=0;// calc size of  BBox including childs recursivly
    1.43 +	virtual void calcBBoxSizeWithChildren()=0;// calc size of  BBox including children recursivly
    1.44  
    1.45      virtual void select();
    1.46      virtual void unselect();
    1.47 @@ -120,13 +125,15 @@
    1.48      QPointF childPos;
    1.49      QPointF parPos;
    1.50  	bool link2ParPos;				// While moving around, sometimes link to parent
    1.51 -	MapEditor* mapEditor;			// for and toggleScroll(), get default styles
    1.52 +	MapEditor* mapEditor;			// for and toggleScroll(), get default styles	FIXME should not be needed with model available
    1.53  									// and mapEditor->updateActions()
    1.54  									// and mapEditor->updateSelection()
    1.55 +
    1.56 +	VymModel* model;												
    1.57      Orientation orientation;     
    1.58      qreal linkwidth;				// width of a link
    1.59      int depth;						// depth: undef=-1 mapCenter=0 branch=1..n
    1.60 -	QRectF bboxTotal;				// bounding box including childs
    1.61 +	QRectF bboxTotal;				// bounding box including children
    1.62  
    1.63      LinkableMapObj* childObj;
    1.64      LinkableMapObj* parObj;