Go to the documentation of this file.
11#pragma once
13#include <memory>
19#include "DataView/GEOModels.h"
20#include "DataView/MeshModel.h"
24#include "ui_mainwindow.h"
26class TreeModel;
28namespace MeshLib
30class VtkMappedMeshSource;
33class QSignalMapper;
38class MainWindow : public QMainWindow, public Ui_MainWindowClass
43 explicit MainWindow(QWidget* parent = nullptr);
45 void ShowWindow();
46 void HideWindow();
47 void loadFileOnStartUp(const QString& fileName);
50 void closeEvent(QCloseEvent* event) override;
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);
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);
116 void on_actionExportVTK_triggered(bool checked = false);
117 void on_actionExportVRML2_triggered(bool checked = false);
118 void on_actionExportObj_triggered(bool checked = false);
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();
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;
143 std::unique_ptr<VisPrefsDialog> _visPrefsDialog;
145 std::unique_ptr<GEOModels> _geo_model;
148 void fileUsed(QString filename);
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)
Definition: mainwindow.cpp:477
void closeEvent(QCloseEvent *event) override
Definition: mainwindow.cpp:435
void readSettings()
Definition: mainwindow.cpp:883
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.
Definition: mainwindow.cpp:501
void FEMTestStart()
Testing functionality for connection to FEM lib.
QMenu * createImportFilesMenu()
Definition: mainwindow.cpp:925
void showGMSHPrefsDialog()
void quitPresentationMode()
void loadFile(ImportFileType::type t, const QString &fileName)
Definition: mainwindow.cpp:576
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.
Definition: mainwindow.cpp:528
void writeStationListToFile(QString listName, QString fileName)
void loadFileOnStartUp(const QString &fileName)
void showGeoDockWidget(bool show)
Definition: mainwindow.cpp:441
void showLayers2GridDialog()
void writeSettings()
Definition: mainwindow.cpp:891
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)
Definition: mainwindow.cpp:453
std::unique_ptr< VisPrefsDialog > _visPrefsDialog
Definition: mainwindow.h:143
void showLicense()
Definition: mainwindow.cpp:899
void convertMeshToGeometry(const MeshLib::Mesh *mesh)
void showDiagramPrefsDialog()
Calls the diagram prefs dialog from the Tools menu.
void showMshDockWidget(bool show)
Definition: mainwindow.cpp:465
void loadFEMConditionsFromFile(const QString &fileName, std::string geoName="")
QString getLastUsedDir()
void showMeshAnalysisDialog()
void showAddPipelineFilterItemDialog(QModelIndex parentIndex)
Definition: mainwindow.cpp:988
void showCreateStructuredGridDialog()
Creates a structured grid with user-specified parameters.
void about()
Definition: mainwindow.cpp:905
void ShowWindow()
void showMergeGeometriesDialog()
void showVisDockWidget(bool show)
Definition: mainwindow.cpp:489
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()
Definition: mainwindow.cpp:519
void fileOpenRequested(int)
DataHolderLib::Project _project
Definition: mainwindow.h:133
void writeGeometryToFile(QString gliName, QString fileName)
Definition: mainwindow.cpp:994
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()
Definition: mainwindow.cpp:952
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()
Definition: mainwindow.cpp:875
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
Definition: GeoType.h:27