diff -r 01c028006e6d -r a7db20d79c32 vymmodel.cpp --- a/vymmodel.cpp Fri Feb 01 15:28:35 2008 +0000 +++ b/vymmodel.cpp Fri Feb 01 15:28:35 2008 +0000 @@ -16,9 +16,8 @@ void VymModel::clear() { - for (int i=0; iclear(); - mapCenters.clear(); + while (!mapCenters.isEmpty()) + delete mapCenters.takeFirst(); } void VymModel::init () @@ -116,6 +115,7 @@ BranchObj *bo=bo_start; if (bo) { + // Try to find next branch in current MapCenter rbo=bo->next(); if (rbo) return rbo; @@ -216,6 +216,70 @@ mapCenters.at(i)->reposition(); // for positioning heading } +QPolygonF VymModel::shape(BranchObj *bo) +{ + // Creating (arbitrary) shapes + + QPolygonF p; + QRectF rb=bo->getBBox(); + if (bo->getDepth()==0) + { + // Just take BBox of this mapCenter + p<getTotalBBox(); + if (bo->getOrientation()==LinkableMapObj::LeftOfCenter) + p <" + <<"="<getHeading() )<<")" + <<" with ("<< qPrintable (boB->getHeading() ) + <<") willIntersect" + <