1.1 --- a/treeitem.h Tue Aug 05 07:36:53 2008 +0000
1.2 +++ b/treeitem.h Mon Oct 06 11:10:20 2008 +0000
1.3 @@ -4,9 +4,12 @@
1.4 #include <QList>
1.5 #include <QVariant>
1.6
1.7 +class LinkableMapObj;
1.8 +
1.9 class TreeItem
1.10 {
1.11 public:
1.12 + enum Type {Undefined,MapCenter,Branch};
1.13 TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
1.14 ~TreeItem();
1.15
1.16 @@ -16,13 +19,27 @@
1.17 int childCount() const;
1.18 int columnCount() const;
1.19 QVariant data(int column) const;
1.20 + void setHeading (const QString s);
1.21 + QString getHeading();
1.22 + void setType (const Type t);
1.23 + Type getType ();
1.24 + QString getTypeName ();
1.25 +
1.26 int row() const;
1.27 + int column() const;
1.28 TreeItem *parent();
1.29
1.30 + // Relation to map objects in graphicsscene
1.31 + LinkableMapObj* getLMO();
1.32 + void setLMO (LinkableMapObj*);
1.33 +
1.34 private:
1.35 QList<TreeItem*> childItems;
1.36 QList<QVariant> itemData;
1.37 TreeItem *parentItem;
1.38 +
1.39 + Type type;
1.40 + LinkableMapObj *lmo;
1.41 };
1.42
1.43 #endif