1.1 --- a/mapcenterobj.cpp Tue May 26 11:24:51 2009 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,73 +0,0 @@
1.4 -#include <QDateTime>
1.5 -
1.6 -#include "floatimageobj.h"
1.7 -#include "geometry.h"
1.8 -#include "mapcenterobj.h"
1.9 -
1.10 -/////////////////////////////////////////////////////////////////
1.11 -// MapCenterObj
1.12 -/////////////////////////////////////////////////////////////////
1.13 -MapCenterObj::MapCenterObj() : BranchObj ()
1.14 -{
1.15 -// cout << "Const MapCenterObj\n";
1.16 - init();
1.17 -}
1.18 -
1.19 -MapCenterObj::MapCenterObj(QGraphicsScene* s) : BranchObj (s)
1.20 -{
1.21 -// cout << "Const MapCenterObj canvas="<<s<<"\n";
1.22 - init();
1.23 -}
1.24 -
1.25 -MapCenterObj::~MapCenterObj()
1.26 -{
1.27 -// cout << "Destr MapCenterObj\n";
1.28 - clear();
1.29 -}
1.30 -
1.31 -void MapCenterObj::clear()
1.32 -{
1.33 - BranchObj::clear();
1.34 -}
1.35 -
1.36 -void MapCenterObj::init ()
1.37 -{
1.38 - BranchObj::init();
1.39 - orientation=LinkableMapObj::UndefinedOrientation;
1.40 -
1.41 - // TODO this should be done in TextObj later...
1.42 - //QFont font ("Sans Serif,16,-1,5,50,0,0,0,0,0");
1.43 - //heading->setFont(font);
1.44 - //FIXME-2 no treeitem yet: setDefAttr(MovedBranch); and already in BI::createMapObj ?!?
1.45 -
1.46 - frame->setFrameType (FrameObj::Rectangle);
1.47 -}
1.48 -
1.49 -
1.50 -void MapCenterObj::updateLink()
1.51 -{
1.52 - // set childPos to middle of MapCenterObj
1.53 - childPos.setX( clickBox.topLeft().x() + (int)(clickBox.width())/2 );
1.54 - childPos.setY( clickBox.topLeft().y() + (int)(clickBox.height())/2 );
1.55 - parPos=childPos;
1.56 - for (int i=0; i<treeItem->branchCount(); ++i)
1.57 - treeItem->getBranchObjNum(i)->updateLink();
1.58 -}
1.59 -
1.60 -void MapCenterObj::updateRelPositions()
1.61 -{
1.62 - if (repositionRequest) unsetAllRepositionRequests();
1.63 -
1.64 - // update relative Positions of branches and floats
1.65 - for (int i=0; i<treeItem->branchCount(); ++i)
1.66 - {
1.67 - treeItem->getBranchObjNum(i)->setRelPos();
1.68 - treeItem->getBranchObjNum(i)->setOrientation();
1.69 - }
1.70 -
1.71 - for (int i=0; i<floatimage.size(); ++i)
1.72 - floatimage.at(i)->setRelPos();
1.73 -
1.74 - if (repositionRequest) reposition();
1.75 -}
1.76 -