# HG changeset patch # User insilmaril # Date 1177516974 0 # Node ID 494a5b8c131e42fec5da28c8ba90cd446a11f423 # Parent b0d72eb511c9138ad9bd7a1890d5d5753cd87f8d started doxygen documentation diff -r b0d72eb511c9 -r 494a5b8c131e branchobj.cpp --- a/branchobj.cpp Wed Apr 25 16:02:54 2007 +0000 +++ b/branchobj.cpp Wed Apr 25 16:02:54 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="<