diff -r 6783e13bb05d -r f688a9913724 linkablemapobj.cpp --- a/linkablemapobj.cpp Sat Apr 09 22:50:08 2005 +0000 +++ b/linkablemapobj.cpp Mon Apr 18 06:17:00 2005 +0000 @@ -1,4 +1,4 @@ -//#include +#include #include "linkablemapobj.h" #include "branchobj.h" @@ -535,6 +535,40 @@ return parObj; } +LinkableMapObj* LinkableMapObj::findObj (QString s) +{ + LinkableMapObj *lmo=this; + QString part; + QString typ; + QString num; + while (!s.isEmpty() ) + { + part=s.section(",",0,0); + typ=part.left (3); + num=part.right(part.length() - 3); + + if (typ=="mc:") + { + if (depth>0) + return false; // in a subtree there is no center + else + break; + } else + if (typ=="bo:") + lmo=((BranchObj*)(lmo))->getBranchNum (num.toUInt()); + else + if (typ=="fi:") + lmo=((BranchObj*)(lmo))->getFloatImageNum (num.toUInt()); + if (!lmo) break; + + if (s.contains(",")) + s=s.right(s.length() - part.length() -1 ); + else + break; + } + return lmo; +} + QPoint LinkableMapObj::getChildPos() { return childPos; @@ -584,6 +618,8 @@ void LinkableMapObj::alignRelativeTo (QPoint ref) { + cout << "LMO::alignRelTo ref="<