diff -r c6a8651e6bbc -r 7a651cb19690 branchobj.cpp --- a/branchobj.cpp Sat Mar 31 09:28:27 2007 +0000 +++ b/branchobj.cpp Wed Apr 25 16:02:55 2007 +0000 @@ -16,11 +16,6 @@ BranchObj* BranchObj::itFirst=NULL; -HeadingObj* BranchObj::getHO() //FIXME testing only -{ - return heading; -} - BranchObj::BranchObj () :OrnamentedObj() { // cout << "Const BranchObj ()\n"; @@ -232,7 +227,7 @@ // Don't try to find that branch, guess 12 pixels y=o->getChildPos().y() -height() + 12; } - if (o->getOrientation()==OrientLeftOfCenter) + if (o->getOrientation()==LinkableMapObj::LeftOfCenter) move ( o->getChildPos().x() - linkwidth, y ); else move (o->getChildPos().x() + linkwidth, y ); @@ -627,7 +622,7 @@ } if (includeImagesHor) { - if (orientation==OrientRightOfCenter) + if (orientation==LinkableMapObj::RightOfCenter) { if (-rp.x()-w > 0) leftPad=max (leftPad,-rp.x()-w); @@ -648,8 +643,8 @@ } // Frame thickness - w+=frame->getBorder(); - h+=frame->getBorder(); + w+=frame->getPadding(); + h+=frame->getPadding(); // Finally set size bbox.setSize (QSizeF (w,h)); @@ -658,7 +653,7 @@ void BranchObj::setDockPos() { // Sets childpos and parpos depending on orientation - if (getOrientation()==OrientLeftOfCenter ) + if (getOrientation()==LinkableMapObj::LeftOfCenter ) { childPos=QPointF ( ornamentsBBox.bottomLeft().x(), @@ -791,7 +786,7 @@ attribut ("textColor",QColor(heading->getColor()).name())); // Save frame - if (frame->getFrameType()!=NoFrame) + if (frame->getFrameType()!=FrameObj::NoFrame) s+=frame->saveToDir (); // save names of flags set @@ -1288,14 +1283,14 @@ { // Align myself depending on orientation and parent, but // only if I am not a mainbranch or mapcenter itself - LinkOrient o; + LinkableMapObj::Orientation o; o=parObj->getOrientation(); switch (orientation) { - case OrientLeftOfCenter: + case LinkableMapObj::LeftOfCenter: move (ref.x() - bbox.width(), ref.y() + (th-bbox.height())/2 ); break; - case OrientRightOfCenter: + case LinkableMapObj::RightOfCenter: move (ref.x() , ref.y() + (th-bbox.height())/2 ); break; default: @@ -1308,7 +1303,7 @@ // Set reference point for alignment of childs QPointF ref2; - if (orientation==OrientLeftOfCenter) + if (orientation==LinkableMapObj::LeftOfCenter) ref2.setX(bbox.topLeft().x() - linkwidth); else ref2.setX(bbox.topRight().x() + linkwidth); @@ -1526,3 +1521,10 @@ return s; } + +void BranchObj::animate() +{ + //relPos.animate(); + cout << "BO::animate x,y="<