OGS
GeoTreeView.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include <QContextMenuEvent>
18 #include <QTreeView>
19 
20 #include "GeoLib/GeoType.h"
21 
22 class vtkPolyDataAlgorithm;
23 
28 class GeoTreeView : public QTreeView
29 {
30  Q_OBJECT
31 
32 public:
34  explicit GeoTreeView(QWidget* parent = nullptr);
35 
37  void updateView();
38 
39 protected slots:
41  void selectionChanged(const QItemSelection& selected,
42  const QItemSelection& deselected) override;
43 
45  void selectionChangedFromOutside(const QItemSelection &selected,
46  const QItemSelection &deselected);
47 
48 private:
50  void contextMenuEvent(QContextMenuEvent* e) override;
52  void setElementAsCondition(bool set_on_points = false);
53 
54 private slots:
55  void addGeometry();
57  void loadFEMConditions();
58  void on_Clicked(QModelIndex idx);
60  void connectPolylines();
62  void mapGeometry();
64  void setNameForElement();
68  void writeToFile() const;
70  void removeGeometry();
72  //void saveFEMConditions();
73 
74 signals:
75  void enableSaveButton(bool);
76  void enableRemoveButton(bool);
77  void geoItemSelected(const vtkPolyDataAlgorithm*, int);
78  void geometryMappingRequested(const std::string&);
80  //void itemSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
81  void listRemoved(std::string name, GeoLib::GEOTYPE);
82  void loadFEMCondFileRequested(std::string);
83  void openGeometryFile(int);
84  void saveToFileRequested(QString, QString) const;
85  void requestCondSetupDialog(const std::string&, const GeoLib::GEOTYPE, const std::size_t, bool on_points);
86  void requestLineEditDialog(const std::string&);
87  void requestNameChangeDialog(const std::string&, const GeoLib::GEOTYPE, const std::size_t);
88  void requestPointToStationConversion(std::string const&);
89  //void saveFEMConditionsRequested(QString, QString);
90 };
Definition of the GEOTYPE enumeration.
A view for the GeoTreeModel.
Definition: GeoTreeView.h:29
GeoTreeView(QWidget *parent=nullptr)
Constructor.
Definition: GeoTreeView.cpp:28
void enableSaveButton(bool)
Saves FEM Conditions associated with the given geometry.
void requestPointToStationConversion(std::string const &)
void mapGeometry()
void setObjectAsCondition()
Definition: GeoTreeView.h:65
void addGeometry()
void on_Clicked(QModelIndex idx)
Definition: GeoTreeView.cpp:39
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.
Definition: GeoTreeView.cpp:44
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.
Definition: GeoTreeView.cpp:30
void setObjectPointsAsCondition()
Definition: GeoTreeView.h:66
void requestCondSetupDialog(const std::string &, const GeoLib::GEOTYPE, const std::size_t, bool on_points)
GEOTYPE
Definition: GeoType.h:25