OGS
BaseItem Class Reference

Detailed Description

A BaseItem contains additional Information about a subtree in the StationTreeModel.

It is used for list names in the StationTreeModel and it contains the vtkObject for visualisation of the whole list in 3D.

Definition at line 31 of file BaseItem.h.

#include <BaseItem.h>

Public Member Functions

 BaseItem (const QString &listName, const std::vector< GeoLib::Point * > *stations=nullptr)
 
 ~BaseItem ()
 
QModelIndex modelIndex () const
 Returns the associated QModelIndex which belongs to a Qt model.
 
void setModelIndex (QModelIndex index)
 Sets the model index.
 
const std::vector< GeoLib::Point * > * getStations ()
 
vtkPolyDataAlgorithm * vtkSource () const
 Returns the Vtk polydata source object.
 

Private Attributes

QModelIndex _modelIndex
 
const std::vector< GeoLib::Point * > * _stations
 
vtkPolyDataAlgorithm * _vtkSource
 

Constructor & Destructor Documentation

◆ BaseItem()

BaseItem::BaseItem ( const QString & listName,
const std::vector< GeoLib::Point * > * stations = nullptr )
inlineexplicit

Definition at line 34 of file BaseItem.h.

37 {
38 // create the vtk-object for 3d-visualisation of this list
39 static_cast<VtkStationSource*>(_vtkSource)->setStations(stations);
40 static_cast<VtkStationSource*>(_vtkSource)->SetName(listName);
41 }
vtkPolyDataAlgorithm * _vtkSource
Definition BaseItem.h:65
const std::vector< GeoLib::Point * > * _stations
Definition BaseItem.h:61
VTK source object for the visualisation of station data (including boreholes)
static VtkStationSource * New()
Create new objects with New() because of VTKs object reference counting.

References _vtkSource.

◆ ~BaseItem()

BaseItem::~BaseItem ( )
inline

Definition at line 43 of file BaseItem.h.

44 {
45 _vtkSource->Delete();
46 }

References _vtkSource.

Member Function Documentation

◆ getStations()

const std::vector< GeoLib::Point * > * BaseItem::getStations ( )
inline

Definition at line 54 of file BaseItem.h.

54{ return _stations; }

References _stations.

◆ modelIndex()

QModelIndex BaseItem::modelIndex ( ) const
inline

Returns the associated QModelIndex which belongs to a Qt model.

Definition at line 49 of file BaseItem.h.

49{ return _modelIndex; }
QModelIndex _modelIndex
Definition BaseItem.h:60

References _modelIndex.

◆ setModelIndex()

void BaseItem::setModelIndex ( QModelIndex index)
inline

Sets the model index.

Definition at line 52 of file BaseItem.h.

52{ _modelIndex = index; }

References _modelIndex.

Referenced by StationTreeModel::index().

◆ vtkSource()

vtkPolyDataAlgorithm * BaseItem::vtkSource ( ) const
inline

Returns the Vtk polydata source object.

Definition at line 57 of file BaseItem.h.

57{ return _vtkSource; }

References _vtkSource.

Member Data Documentation

◆ _modelIndex

QModelIndex BaseItem::_modelIndex
private

Definition at line 60 of file BaseItem.h.

Referenced by modelIndex(), and setModelIndex().

◆ _stations

const std::vector<GeoLib::Point*>* BaseItem::_stations
private

Definition at line 61 of file BaseItem.h.

Referenced by getStations().

◆ _vtkSource

vtkPolyDataAlgorithm* BaseItem::_vtkSource
private

The Vtk data source object. This is the starting point for a Vtk data visualization pipeline.

Definition at line 65 of file BaseItem.h.

Referenced by BaseItem(), ~BaseItem(), and vtkSource().


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