1.1 --- a/treeitem.cpp Tue Apr 28 20:53:44 2009 +0000
1.2 +++ b/treeitem.cpp Wed Apr 29 18:46:31 2009 +0000
1.3 @@ -5,12 +5,13 @@
1.4
1.5 #include "branchobj.h"
1.6 #include "branchitem.h"
1.7 +#include "mapcenteritem.h"
1.8 #include "vymmodel.h"
1.9
1.10 using namespace std;
1.11
1.12
1.13 -TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent)
1.14 +TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent):MapItem()
1.15 {
1.16 init();
1.17 parentItem = parent;
1.18 @@ -46,7 +47,6 @@
1.19
1.20 parentItem = NULL;
1.21 itemData.clear();
1.22 - lmo=NULL;
1.23
1.24 branchOffset=0;
1.25 branchCounter=0;
1.26 @@ -60,8 +60,6 @@
1.27
1.28 // Reset ID
1.29 objID="";
1.30 -
1.31 -
1.32 }
1.33
1.34 QString TreeItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset)
1.35 @@ -377,41 +375,6 @@
1.36 parentItem->lastSelectedBranchNum=parentItem->childItems.indexOf(this);
1.37 }
1.38
1.39 -TreeItem* TreeItem::findBySelectString (const QString &s) //FIXME-1
1.40 -{
1.41 -/*
1.42 - LinkableMapObj *lmo=this;
1.43 - QString part;
1.44 - QString typ;
1.45 - QString num;
1.46 - while (!s.isEmpty() )
1.47 - {
1.48 - part=s.section(",",0,0);
1.49 - typ=part.left (3);
1.50 - num=part.right(part.length() - 3);
1.51 - if (typ=="mc:")
1.52 - {
1.53 - if (depth>0)
1.54 - return false; // in a subtree there is no center
1.55 - else
1.56 - break;
1.57 - } else
1.58 - if (typ=="bo:")
1.59 - lmo=lmo->getTreeItem()->getBranchObjNum (num.toInt());
1.60 - else
1.61 - if (typ=="fi:")
1.62 - lmo=((BranchObj*)lmo)->getFloatImageNum (num.toUInt());
1.63 - if (!lmo) break;
1.64 -
1.65 - if (s.contains(","))
1.66 - s=s.right(s.length() - part.length() -1 );
1.67 - else
1.68 - break;
1.69 - }
1.70 - */
1.71 - return NULL;
1.72 -}
1.73 -
1.74 void TreeItem::setLastSelectedBranch(int i)
1.75 {
1.76 lastSelectedBranchNum=i;
1.77 @@ -510,13 +473,4 @@
1.78 }
1.79
1.80
1.81 -LinkableMapObj* TreeItem::getLMO() // FIXME-3 VM should be unnecessary in the end
1.82 -{
1.83 - return lmo;
1.84 -}
1.85
1.86 -void TreeItem::setLMO(LinkableMapObj *l)
1.87 -{
1.88 - lmo=l;
1.89 -}
1.90 -