OGS
mainwindow.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
14
19#include "DataView/GEOModels.h"
20#include "DataView/MeshModel.h"
24#include "ui_mainwindow.h"
25
26class TreeModel;
27
28namespace MeshLib
29{
30class VtkMappedMeshSource;
31}
32
33class QSignalMapper;
34
38class MainWindow : public QMainWindow, public Ui_MainWindowClass
39{
40 Q_OBJECT
41
42public:
43 explicit MainWindow(QWidget* parent = nullptr);
44
45 void ShowWindow();
46 void HideWindow();
47 void loadFileOnStartUp(const QString& fileName);
48
49protected:
50 void closeEvent(QCloseEvent* event) override;
51
52protected slots:
54 void showGeoDockWidget(bool show);
55 void showStationDockWidget(bool show);
56 void showMshDockWidget(bool show);
57 void showConditionDockWidget(bool show);
58 void showVisDockWidget(bool show);
59
61 void open(int file_type = 0);
63 void save();
65 void callGMSH(std::vector<std::string>& selectedGeometries,
66 unsigned param1,
67 double param2,
68 double param3,
69 double param4,
70 bool delete_geo_file);
72 void exportBoreholesToGMS(std::string listName, std::string fileName);
74 void FEMTestStart();
75 void loadPetrelFiles();
76 void mapGeometry(const std::string& geo_name);
77 void convertMeshToGeometry(const MeshLib::Mesh* mesh);
78 void convertPointsToStations(std::string const& geo_name);
79 void openRecentFile();
80 void about();
81 void showAddPipelineFilterItemDialog(QModelIndex parentIndex);
84 void showGeoNameDialog(const std::string& geometry_name,
85 const GeoLib::GEOTYPE object_type,
86 std::size_t id);
88 void showStationNameDialog(const std::string& stn_vec_name, std::size_t id);
97 void showDiagramPrefsDialog(QModelIndex& index);
99 void showFileConverter();
100 // TODO6 void showFileConverterDialog();
101 void showLicense();
102 void showLineEditDialog(const std::string& geoName);
103 void showGMSHPrefsDialog();
111 void showVtu2GridDialog();
112 void updateDataViews();
113 void writeGeometryToFile(QString gliName, QString fileName);
114 void writeStationListToFile(QString listName, QString fileName);
115
116 void on_actionExportVTK_triggered(bool checked = false);
117 void on_actionExportVRML2_triggered(bool checked = false);
118 void on_actionExportObj_triggered(bool checked = false);
119
123
124private:
125 QMenu* createImportFilesMenu();
126 void loadFile(ImportFileType::type t, const QString& fileName);
127 void loadFEMConditionsFromFile(const QString& fileName,
128 std::string geoName = "");
129 void readSettings();
130 void writeSettings();
131 QString getLastUsedDir();
132
134 std::unique_ptr<MeshModel> _meshModel;
135 std::unique_ptr<ElementTreeModel> _elementModel;
136 std::unique_ptr<ProcessModel> _processModel;
137 std::unique_ptr<FemConditionModel> _conditionModel;
138 std::unique_ptr<VtkVisPipeline> _vtkVisPipeline;
139 QList<QRect> _screenGeometries;
140 std::unique_ptr<QWidget> _vtkWidget;
141 QByteArray _windowState;
142
143 std::unique_ptr<VisPrefsDialog> _visPrefsDialog;
144
145 std::unique_ptr<GEOModels> _geo_model;
146
147signals:
148 void fileUsed(QString filename);
150};
Definition of the ElementTreeModel class.
Definition of the GEOModels class.
Definition of the ImportFileTypes enumeration.
Definition of the MeshModel class.
Definition of the ProcessModel class.
Definition of the VisPrefsDialog class.
Definition of the VtkVisPipeline class.
void showConditionDockWidget(bool show)
void closeEvent(QCloseEvent *event) override
void readSettings()
std::unique_ptr< MeshModel > _meshModel
Definition mainwindow.h:134
void callGMSH(std::vector< std::string > &selectedGeometries, unsigned param1, double param2, double param3, double param4, bool delete_geo_file)
Function calls for generating GMSH files from the GUI.
void open(int file_type=0)
Function calls for opening files.
void FEMTestStart()
Testing functionality for connection to FEM lib.
QMenu * createImportFilesMenu()
void showGMSHPrefsDialog()
void quitPresentationMode()
void loadFile(ImportFileType::type t, const QString &fileName)
void on_actionExportObj_triggered(bool checked=false)
void showFileConverter()
Calls the OGSFileConverter as an external tool.
std::unique_ptr< ElementTreeModel > _elementModel
Definition mainwindow.h:135
void showStationNameDialog(const std::string &stn_vec_name, std::size_t id)
Allows setting the name for a station.
void save()
Function calls for saving files.
void writeStationListToFile(QString listName, QString fileName)
void loadFileOnStartUp(const QString &fileName)
void showGeoDockWidget(bool show)
void showLayers2GridDialog()
void writeSettings()
void showGeoNameDialog(const std::string &geometry_name, const GeoLib::GEOTYPE object_type, std::size_t id)
Allows setting the name for a geometric object.
void showLineEditDialog(const std::string &geoName)
void showStationDockWidget(bool show)
std::unique_ptr< VisPrefsDialog > _visPrefsDialog
Definition mainwindow.h:143
void showLicense()
void convertMeshToGeometry(const MeshLib::Mesh *mesh)
void showDiagramPrefsDialog()
Calls the diagram prefs dialog from the Tools menu.
void showMshDockWidget(bool show)
void loadFEMConditionsFromFile(const QString &fileName, std::string geoName="")
QString getLastUsedDir()
void showMeshAnalysisDialog()
void showAddPipelineFilterItemDialog(QModelIndex parentIndex)
void showCreateStructuredGridDialog()
Creates a structured grid with user-specified parameters.
void ShowWindow()
void showMergeGeometriesDialog()
void showVisDockWidget(bool show)
void showMeshElementRemovalDialog()
Removal of mesh elements based on a number of criteria.
std::unique_ptr< ProcessModel > _processModel
Definition mainwindow.h:136
void showTranslateDataDialog()
void on_actionExportVRML2_triggered(bool checked=false)
void createPresentationMenu()
void openRecentFile()
void fileOpenRequested(int)
DataHolderLib::Project _project
Definition mainwindow.h:133
void writeGeometryToFile(QString gliName, QString fileName)
MainWindow(QWidget *parent=nullptr)
std::unique_ptr< GEOModels > _geo_model
Definition mainwindow.h:145
void startPresentationMode()
std::unique_ptr< VtkVisPipeline > _vtkVisPipeline
Definition mainwindow.h:138
void HideWindow()
void loadPetrelFiles()
void on_actionExportVTK_triggered(bool checked=false)
void showAddFaultsToVoxelGridDialog()
void showVisalizationPrefsDialog()
std::unique_ptr< QWidget > _vtkWidget
Definition mainwindow.h:140
void showVtu2GridDialog()
void mapGeometry(const std::string &geo_name)
void showMeshQualitySelectionDialog(MeshLib::VtkMappedMeshSource *mshSource)
QList< QRect > _screenGeometries
Definition mainwindow.h:139
void fileUsed(QString filename)
QByteArray _windowState
Definition mainwindow.h:141
std::unique_ptr< FemConditionModel > _conditionModel
Definition mainwindow.h:137
void updateDataViews()
void showDataExplorerSettingsDialog()
void convertPointsToStations(std::string const &geo_name)
void exportBoreholesToGMS(std::string listName, std::string fileName)
Function calls for GMS export.
A hierarchical model for a tree implemented as a double-linked list.
Definition TreeModel.h:30
GEOTYPE
Definition GeoType.h:23