OGS
StationTreeModel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <vtkPolyDataAlgorithm.h>
7#include <vector>
8
9#include "GeoLib/Point.h"
10
11#include "ModelTreeItem.h"
12#include "Base/TreeModel.h"
13
14namespace GeoLib
15{
16class Station;
17class StationBorehole;
18}
19
20class QString;
21class QModelIndex;
22class PropertyBounds;
23
32{
33 Q_OBJECT
34
35public:
36 explicit StationTreeModel(QObject* parent = nullptr);
38
39 void addStationList(QString listName, const std::vector<GeoLib::Point*>* stations);
40 const std::vector<ModelTreeItem*> &getLists() { return _lists; }
41 QModelIndex index(int row, int column,
42 const QModelIndex& parent = QModelIndex()) const override;
43 //BaseItem* itemFromIndex( const QModelIndex& index ) const;
44 void removeStationList(QModelIndex index);
45 void removeStationList(const std::string &name);
46 void setNameForItem(const std::string& stn_vec_name, std::size_t id,
47 std::string const& item_name);
48 GeoLib::Station* stationFromIndex( const QModelIndex& index, QString &listName ) const;
49 vtkPolyDataAlgorithm* vtkSource(const std::string &name) const;
50
51private:
52 std::vector<ModelTreeItem*> _lists;
53};
A borehole as a geometric object.
A Station (observation site) is basically a Point with some additional information.
Definition Station.h:26
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
QModelIndex parent(const QModelIndex &index) const override
Definition TreeModel.cpp:70
TreeModel(QObject *parent=nullptr)
Definition TreeModel.cpp:15