OGS
ModelTreeItem.h
Go to the documentation of this file.
1
15#pragma once
16
17#include "GeoLib/Station.h"
18
19#include "BaseItem.h"
20#include "Base/TreeItem.h"
21
27class ModelTreeItem : public TreeItem
28{
29public:
36 ModelTreeItem(const QList<QVariant>& data, TreeItem* parent,
37 BaseItem* item = nullptr);
38 ~ModelTreeItem() override { delete _item; }
41
43 BaseItem* getItem() const;
44
46 void setStation(GeoLib::Station* stn) { _stn = stn; }
47
49 void setItem( BaseItem* item ) { _item = item; }
50
51private:
54};
Definition of the BaseItem class.
Definition of the Station class.
Definition of the TreeItem class.
A BaseItem contains additional Information about a subtree in the StationTreeModel.
Definition BaseItem.h:32
A Station (observation site) is basically a Point with some additional information.
Definition Station.h:37
A TreeItem containing some additional information used in the StationModel.
void setItem(BaseItem *item)
Associates a BaseItem with this item.
BaseItem * getItem() const
Returns the BaseItem associated with this item.
BaseItem * _item
GeoLib::Station * _stn
void setStation(GeoLib::Station *stn)
Associates a station object with this item.
~ModelTreeItem() override
ModelTreeItem(const QList< QVariant > &data, TreeItem *parent, BaseItem *item=nullptr)
GeoLib::Station * getStation()
Returns the station object from which this item has been constructed.
Objects nodes for the TreeModel.
Definition TreeItem.h:28
virtual QVariant data(int column) const
Definition TreeItem.cpp:94