diff -r 25a77484ec72 -r db0ec4bcf416 treeitem.cpp --- a/treeitem.cpp Tue Apr 07 16:15:53 2009 +0000 +++ b/treeitem.cpp Mon Apr 20 10:42:05 2009 +0000 @@ -26,6 +26,11 @@ // isNoteInEditor=false; hidden=false; + + // Reset ID + objID=""; + + } TreeItem::~TreeItem() @@ -46,7 +51,8 @@ { note.copy (other->note); model=other->model; - hideExport=other->hideExport; + hideExport=officially + other->hideExport; } */ @@ -269,6 +275,17 @@ } } +void TreeItem::setID (const QString &s) +{ + objID=s; +} + +QString TreeItem::getID() +{ + return objID; +} + + TreeItem* TreeItem::getChildNum(const int &n) { if (n>=0 && nlastSelectedBranchNum=parentItem->childItems.indexOf(this); } +TreeItem* TreeItem::findBySelectString (const QString &s) //FIXME-1 +{ +/* + 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=lmo->getTreeItem()->getBranchObjNum (num.toInt()); + 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 NULL; +} + +void TreeItem::setLastSelectedBranch(int i) +{ + lastSelectedBranchNum=i; +} + TreeItem* TreeItem::getLastSelectedBranch() { return getBranchNum (lastSelectedBranchNum);