OGS
GeoTreeItem.h
Go to the documentation of this file.
1
15#pragma once
16
17#include "Base/TreeItem.h"
18
19#include "GeoLib/GeoObject.h"
20
26class GeoTreeItem : public TreeItem
27{
28public:
35 GeoTreeItem(const QList<QVariant>& data,
36 TreeItem* parent,
37 const GeoLib::GeoObject* item = nullptr)
38 : TreeItem(data, parent), _item(item)
39 {
40 }
41 ~GeoTreeItem() override = default;
42
44 const GeoLib::GeoObject* getGeoObject() const { return _item; }
45
46private:
48};
Base class for classes Point, Polyline, Surface.
Definition of the TreeItem class.
A TreeItem containing an additional GeoObject.
Definition GeoTreeItem.h:27
~GeoTreeItem() override=default
GeoTreeItem(const QList< QVariant > &data, TreeItem *parent, const GeoLib::GeoObject *item=nullptr)
Definition GeoTreeItem.h:35
const GeoLib::GeoObject * getGeoObject() const
Returns the geo-object associated with this item (i.e. a point, polyline or surface).
Definition GeoTreeItem.h:44
const GeoLib::GeoObject * _item
Definition GeoTreeItem.h:47
Objects nodes for the TreeModel.
Definition TreeItem.h:28
virtual QVariant data(int column) const
Definition TreeItem.cpp:94