deleting works - partially.
5 TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent)
14 qDeleteAll(childItems);
17 void TreeItem::appendChild(TreeItem *item)
19 childItems.append(item);
22 void TreeItem::removeChild(int row)
26 delete (childItems.at(row) );
27 childItems.removeAt (row);
29 qWarning ("TreeItem::removeChild tried to remove non existing item?!\n");
32 TreeItem *TreeItem::child(int row)
34 return childItems.value(row);
37 int TreeItem::childCount() const
39 return childItems.count();
42 int TreeItem::columnCount() const
44 return itemData.count();
46 int TreeItem::row() const
49 return parentItem->childItems.indexOf(const_cast<TreeItem*>(this));
54 int TreeItem::column() const
59 TreeItem *TreeItem::parent()
65 QVariant TreeItem::data(int column) const
67 return itemData.value(column);
70 void TreeItem::setHeading (const QString s)
75 QString TreeItem::getHeading ()
77 return itemData[0].toString();
80 void TreeItem::setType(const Type t)
83 itemData[1]=getTypeName();
86 TreeItem::Type TreeItem::getType()
91 QString TreeItem::getTypeName()
95 case Undefined: return QString ("Undefined");
96 case MapCenter: return QString ("MapCenter");
97 case Branch: return QString ("Branch");
98 default: return QString ("TreeItem::getTypeName no typename defined?!");
102 LinkableMapObj* TreeItem::getLMO() // FIXME VM should be unnecessary in the end
107 void TreeItem::setLMO(LinkableMapObj *l)