OGS
GeoTreeView.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
9#include "GeoLib/GeoType.h"
10
11class vtkPolyDataAlgorithm;
12
17class GeoTreeView : public QTreeView
18{
19 Q_OBJECT
20
21public:
23 explicit GeoTreeView(QWidget* parent = nullptr);
24
26 void updateView();
27
28protected slots:
30 void selectionChanged(const QItemSelection& selected,
31 const QItemSelection& deselected) override;
32
34 void selectionChangedFromOutside(const QItemSelection &selected,
35 const QItemSelection &deselected);
36
37private:
39 void contextMenuEvent(QContextMenuEvent* e) override;
41 void setElementAsCondition(bool set_on_points = false);
42
43private slots:
44 void addGeometry();
46 void loadFEMConditions();
47 void on_Clicked(QModelIndex idx);
49 void connectPolylines();
51 void mapGeometry();
53 void setNameForElement();
57 void writeToFile() const;
59 void removeGeometry();
61 //void saveFEMConditions();
62
63signals:
64 void enableSaveButton(bool);
66 void geoItemSelected(const vtkPolyDataAlgorithm*, int);
67 void geometryMappingRequested(const std::string&);
69 //void itemSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
70 void listRemoved(std::string name, GeoLib::GEOTYPE);
71 void loadFEMCondFileRequested(std::string);
73 void saveToFileRequested(QString, QString) const;
74 void requestCondSetupDialog(const std::string&, const GeoLib::GEOTYPE, const std::size_t, bool on_points);
75 void requestLineEditDialog(const std::string&);
76 void requestNameChangeDialog(const std::string&, const GeoLib::GEOTYPE, const std::size_t);
77 void requestPointToStationConversion(std::string const&);
78 //void saveFEMConditionsRequested(QString, QString);
79};
GeoTreeView(QWidget *parent=nullptr)
Constructor.
void enableSaveButton(bool)
Saves FEM Conditions associated with the given geometry.
void requestPointToStationConversion(std::string const &)
void mapGeometry()
void setObjectAsCondition()
Definition GeoTreeView.h:54
void addGeometry()
void on_Clicked(QModelIndex idx)
void setNameForElement()
Calls a SetNameDialog.
void listRemoved(std::string name, GeoLib::GEOTYPE)
void writeToFile() const
Saves a geometry in a file.
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 geoItemSelected(const vtkPolyDataAlgorithm *, int)
void enableRemoveButton(bool)
void requestNameChangeDialog(const std::string &, const GeoLib::GEOTYPE, const std::size_t)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Instructions if the selection of items in the view has changed.
void saveToFileRequested(QString, QString) const
void setElementAsCondition(bool set_on_points=false)
Calls a FEMConditionSetupDialog.
void removeGeoItemSelection()
void connectPolylines()
Calls a LineEditDialog.
void convertPointsToStations()
void requestLineEditDialog(const std::string &)
void removeGeometry()
Removes a whole geometry or parts of it.
void openGeometryFile(int)
void contextMenuEvent(QContextMenuEvent *e) override
Actions to be taken after a right mouse click is performed in the station view.
void loadFEMCondFileRequested(std::string)
void geometryMappingRequested(const std::string &)
void loadFEMConditions()
Allows to add FEM Conditions to a process.
void updateView()
Update the view to visualise changes made to the underlying data.
void setObjectPointsAsCondition()
Definition GeoTreeView.h:55
void requestCondSetupDialog(const std::string &, const GeoLib::GEOTYPE, const std::size_t, bool on_points)
GEOTYPE
Definition GeoType.h:12