OGS
GeoTreeItem Class Reference

Detailed Description

A TreeItem containing an additional GeoObject.

See also
TreeItem

Definition at line 26 of file GeoTreeItem.h.

#include <GeoTreeItem.h>

Inheritance diagram for GeoTreeItem:
[legend]
Collaboration diagram for GeoTreeItem:
[legend]

Public Member Functions

 GeoTreeItem (const QList< QVariant > &data, TreeItem *parent, const GeoLib::GeoObject *item=nullptr)
 
 ~GeoTreeItem () override=default
 
const GeoLib::GeoObjectgetGeoObject () const
 Returns the geo-object associated with this item (i.e. a point, polyline or surface). More...
 
- Public Member Functions inherited from TreeItem
 TreeItem (QList< QVariant > data, TreeItem *parent)
 
virtual ~TreeItem ()
 
void appendChild (TreeItem *item)
 
TreeItemchild (int row) const
 
virtual int childCount () const
 
virtual int columnCount () const
 
virtual QVariant data (int column) const
 
virtual bool setData (int column, const QVariant &value)
 
int row () const
 
TreeItemparentItem () const
 
bool removeChildren (int position, int count)
 

Private Attributes

const GeoLib::GeoObject_item
 

Constructor & Destructor Documentation

◆ GeoTreeItem()

GeoTreeItem::GeoTreeItem ( const QList< QVariant > &  data,
TreeItem parent,
const GeoLib::GeoObject item = nullptr 
)
inline

Constructor

Parameters
dataThe data associated with each column
parentThe parent item in the tree
itemThe GeoObject (i.e. Point, Polyline or Surface)

Definition at line 35 of file GeoTreeItem.h.

38  : TreeItem(data, parent), _item(item)
39  {
40  }
const GeoLib::GeoObject * _item
Definition: GeoTreeItem.h:47
TreeItem(QList< QVariant > data, TreeItem *parent)
Definition: TreeItem.cpp:23
virtual QVariant data(int column) const
Definition: TreeItem.cpp:94

◆ ~GeoTreeItem()

GeoTreeItem::~GeoTreeItem ( )
overridedefault

Member Function Documentation

◆ getGeoObject()

const GeoLib::GeoObject* GeoTreeItem::getGeoObject ( ) const
inline

Returns the geo-object associated with this item (i.e. a point, polyline or surface).

Definition at line 44 of file GeoTreeItem.h.

44 { return _item; }

References _item.

Member Data Documentation

◆ _item

const GeoLib::GeoObject* GeoTreeItem::_item
private

Definition at line 47 of file GeoTreeItem.h.

Referenced by getGeoObject().


The documentation for this class was generated from the following file: