OGS
StationTreeView.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 <QContextMenuEvent>
7#include <QTreeView>
8#include "GeoLib/Station.h"
9
10class vtkPolyDataAlgorithm;
11
16class StationTreeView : public QTreeView
17{
18 Q_OBJECT
19
20public:
22 explicit StationTreeView(QWidget* parent = nullptr);
23
25 void updateView();
26
27public slots:
28 //void filterStations(std::vector<PropertyBounds> bounds);
29
30protected slots:
32 void selectionChanged(const QItemSelection& selected,
33 const QItemSelection& deselected) override;
34
36 void selectionChangedFromOutside(const QItemSelection &selected,
37 const QItemSelection &deselected);
38
39private:
41 void contextMenuEvent(QContextMenuEvent* e) override;
42
44 void writeStratigraphiesAsImages(QString listName);
45
46private slots:
47 void addStationList();
49 void exportList();
50 void exportStation();
51 void mapStations();
52 void removeStationList();
54 void setNameForElement();
55 void writeToFile();
57
58signals:
59 void enableSaveButton(bool);
61 void geoItemSelected(const vtkPolyDataAlgorithm*, int);
62 void geometryMappingRequested(const std::string&);
64 void itemSelectionChanged(const QItemSelection & selected,
65 const QItemSelection & deselected);
67 void propertiesDialogRequested(std::string name);
68 void requestNameChangeDialog(const std::string&, std::size_t);
69 void stationListExportRequested(std::string listName, std::string fileName);
70 void stationListRemoved(std::string name);
71 void stationListSaved(QString listName, QString fileName);
72 void diagramRequested(QModelIndex&);
73};
void updateView()
Update the view to visualise changes made to the underlying data.
void selectionChangedFromOutside(const QItemSelection &selected, const QItemSelection &deselected)
Instructions if the selection of items in the view has changed by events outside the view (i....
void requestNameChangeDialog(const std::string &, std::size_t)
void propertiesDialogRequested(std::string name)
void openStationListFile(int)
void stationListExportRequested(std::string listName, std::string fileName)
void geometryMappingRequested(const std::string &)
void geoItemSelected(const vtkPolyDataAlgorithm *, int)
void diagramRequested(QModelIndex &)
void enableRemoveButton(bool)
void contextMenuEvent(QContextMenuEvent *e) override
Actions to be taken after a right mouse click is performed in the station view.
void setNameForElement()
Calls a SetNameDialog.
void stationListSaved(QString listName, QString fileName)
void removeGeoItemSelection()
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Instructions if the selection of items in the view has changed.
StationTreeView(QWidget *parent=nullptr)
Constructor.
void enableSaveButton(bool)
void writeStratigraphiesAsImages(QString listName)
Create image files from all stratigraphies in a borehole vector.
void itemSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void stationListRemoved(std::string name)