OGS
StationTreeModel.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <vtkPolyDataAlgorithm.h>
18#include <vector>
19
20#include "GeoLib/Point.h"
21
22#include "ModelTreeItem.h"
23#include "Base/TreeModel.h"
24
25namespace GeoLib
26{
27class Station;
28class StationBorehole;
29}
30
31class QString;
32class QModelIndex;
33class PropertyBounds;
34
43{
44 Q_OBJECT
45
46public:
47 explicit StationTreeModel(QObject* parent = nullptr);
49
50 void addStationList(QString listName, const std::vector<GeoLib::Point*>* stations);
51 const std::vector<ModelTreeItem*> &getLists() { return _lists; }
52 QModelIndex index(int row, int column,
53 const QModelIndex& parent = QModelIndex()) const override;
54 //BaseItem* itemFromIndex( const QModelIndex& index ) const;
55 void removeStationList(QModelIndex index);
56 void removeStationList(const std::string &name);
57 void setNameForItem(const std::string& stn_vec_name, std::size_t id,
58 std::string const& item_name);
59 GeoLib::Station* stationFromIndex( const QModelIndex& index, QString &listName ) const;
60 vtkPolyDataAlgorithm* vtkSource(const std::string &name) const;
61
62private:
63 std::vector<ModelTreeItem*> _lists;
64};
Definition of the Point class.
Definition of the ModelTreeItem class.
Definition of the TreeModel class.
A Station (observation site) is basically a Point with some additional information.
Definition Station.h:37
A model for the StationTreeView implementing a tree as a double-linked list.
void addStationList(QString listName, const std::vector< GeoLib::Point * > *stations)
void setNameForItem(const std::string &stn_vec_name, std::size_t id, std::string const &item_name)
~StationTreeModel() override
void removeStationList(QModelIndex index)
StationTreeModel(QObject *parent=nullptr)
std::vector< ModelTreeItem * > _lists
vtkPolyDataAlgorithm * vtkSource(const std::string &name) const
GeoLib::Station * stationFromIndex(const QModelIndex &index, QString &listName) const
const std::vector< ModelTreeItem * > & getLists()
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
A hierarchical model for a tree implemented as a double-linked list.
Definition TreeModel.h:30
QModelIndex parent(const QModelIndex &index) const override
Definition TreeModel.cpp:81