Go to the documentation of this file.
11 #pragma once
13 #include <memory>
17 #include "Base/ImportFileTypes.h"
18 #include "ui_mainwindow.h"
22 #include "DataView/GEOModels.h"
23 #include "DataView/MeshModel.h"
24 #include "DataView/ProcessModel.h"
25 #include "VtkVis/VisPrefsDialog.h"
26 #include "VtkVis/VtkVisPipeline.h"
28 class TreeModel;
30 namespace MeshLib
31 {
32  class VtkMappedMeshSource;
33 }
35 class QSignalMapper;
40 class MainWindow : public QMainWindow, public Ui_MainWindowClass
41 {
44 public:
45  explicit MainWindow(QWidget* parent = nullptr);
47  void ShowWindow();
48  void HideWindow();
49  void loadFileOnStartUp(const QString &fileName);
51 protected:
52  void closeEvent(QCloseEvent* event) override;
54 protected slots:
55  void showGeoDockWidget( bool show );
56  void showStationDockWidget( bool show );
57  void showMshDockWidget( bool show );
58  void showConditionDockWidget( bool show );
59  void showVisDockWidget( bool show );
62  void open(int file_type = 0);
64  void save();
66  void callGMSH(std::vector<std::string> & selectedGeometries,
67  unsigned param1,
68  double param2,
69  double param3,
70  double param4,
71  bool delete_geo_file);
73  void exportBoreholesToGMS(std::string listName, std::string fileName);
75  void FEMTestStart();
76  void loadPetrelFiles();
77  void mapGeometry(const std::string &geo_name);
78  void convertMeshToGeometry(const MeshLib::Mesh* mesh);
79  void convertPointsToStations(std::string const& geo_name);
80  void openRecentFile();
81  void about();
82  void showAddPipelineFilterItemDialog(QModelIndex parentIndex);
85  void showGeoNameDialog(const std::string &geometry_name, const GeoLib::GEOTYPE object_type, std::size_t id);
87  void showStationNameDialog(const std::string& stn_vec_name, std::size_t id);
95  void showDiagramPrefsDialog(QModelIndex &index);
97  void showFileConverter();
98  //TODO6 void showFileConverterDialog();
99  void showLicense();
100  void showLineEditDialog(const std::string &geoName);
101  void showGMSHPrefsDialog();
103  void showMeshAnalysisDialog();
106  void updateDataViews();
107  void writeGeometryToFile(QString gliName, QString fileName);
108  void writeStationListToFile(QString listName, QString fileName);
110  void on_actionExportVTK_triggered(bool checked = false);
111  void on_actionExportVRML2_triggered(bool checked = false);
112  void on_actionExportObj_triggered(bool checked = false);
114  void createPresentationMenu();
115  void startPresentationMode();
116  void quitPresentationMode();
118 private:
119  QMenu* createImportFilesMenu();
120  void loadFile(ImportFileType::type t, const QString &fileName);
121  void loadFEMConditionsFromFile(const QString &fileName, std::string geoName = "");
122  void readSettings();
123  void writeSettings();
124  QString getLastUsedDir();
127  std::unique_ptr<MeshModel> _meshModel;
128  std::unique_ptr<ElementTreeModel> _elementModel;
129  std::unique_ptr<ProcessModel> _processModel;
130  std::unique_ptr<FemConditionModel> _conditionModel;
131  std::unique_ptr<VtkVisPipeline> _vtkVisPipeline;
132  QList<QRect> _screenGeometries;
133  std::unique_ptr<QWidget> _vtkWidget;
134  QByteArray _windowState;
136  std::unique_ptr<VisPrefsDialog> _visPrefsDialog;
138  std::unique_ptr<GEOModels> _geo_model;
140 signals:
141  void fileUsed( QString filename );
142  void fileOpenRequested( int );
143 };
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:473
void closeEvent(QCloseEvent *event) override
Definition: mainwindow.cpp:431
void readSettings()
Definition: mainwindow.cpp:879
std::unique_ptr< MeshModel > _meshModel
Definition: mainwindow.h:127
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:497
void FEMTestStart()
Testing functionality for connection to FEM lib.
QMenu * createImportFilesMenu()
Definition: mainwindow.cpp:921
void showGMSHPrefsDialog()
void quitPresentationMode()
void loadFile(ImportFileType::type t, const QString &fileName)
Definition: mainwindow.cpp:572
void on_actionExportObj_triggered(bool checked=false)
void showFileConverter()
Calls the OGSFileConverter as an external tool.
std::unique_ptr< ElementTreeModel > _elementModel
Definition: mainwindow.h:128
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:524
void writeStationListToFile(QString listName, QString fileName)
void loadFileOnStartUp(const QString &fileName)
void showGeoDockWidget(bool show)
Definition: mainwindow.cpp:437
void writeSettings()
Definition: mainwindow.cpp:887
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:449
std::unique_ptr< VisPrefsDialog > _visPrefsDialog
Definition: mainwindow.h:136
void showLicense()
Definition: mainwindow.cpp:895
void convertMeshToGeometry(const MeshLib::Mesh *mesh)
void showDiagramPrefsDialog()
Calls the diagram prefs dialog from the Tools menu.
void showMshDockWidget(bool show)
Definition: mainwindow.cpp:461
void loadFEMConditionsFromFile(const QString &fileName, std::string geoName="")
QString getLastUsedDir()
void showMeshAnalysisDialog()
void showAddPipelineFilterItemDialog(QModelIndex parentIndex)
Definition: mainwindow.cpp:984
void showCreateStructuredGridDialog()
Creates a structured grid with user-specified parameters.
void about()
Definition: mainwindow.cpp:901
void ShowWindow()
void showMergeGeometriesDialog()
void showVisDockWidget(bool show)
Definition: mainwindow.cpp:485
void showMeshElementRemovalDialog()
Removal of mesh elements based on a number of criteria.
std::unique_ptr< ProcessModel > _processModel
Definition: mainwindow.h:129
void on_actionExportVRML2_triggered(bool checked=false)
void createPresentationMenu()
void openRecentFile()
Definition: mainwindow.cpp:515
void fileOpenRequested(int)
DataHolderLib::Project _project
Definition: mainwindow.h:126
void writeGeometryToFile(QString gliName, QString fileName)
Definition: mainwindow.cpp:990
MainWindow(QWidget *parent=nullptr)
Definition: mainwindow.cpp:100
std::unique_ptr< GEOModels > _geo_model
Definition: mainwindow.h:138
void startPresentationMode()
std::unique_ptr< VtkVisPipeline > _vtkVisPipeline
Definition: mainwindow.h:131
void HideWindow()
void loadPetrelFiles()
Definition: mainwindow.cpp:948
void on_actionExportVTK_triggered(bool checked=false)
void showVisalizationPrefsDialog()
std::unique_ptr< QWidget > _vtkWidget
Definition: mainwindow.h:133
void mapGeometry(const std::string &geo_name)
void showMeshQualitySelectionDialog(MeshLib::VtkMappedMeshSource *mshSource)
QList< QRect > _screenGeometries
Definition: mainwindow.h:132
void fileUsed(QString filename)
QByteArray _windowState
Definition: mainwindow.h:134
std::unique_ptr< FemConditionModel > _conditionModel
Definition: mainwindow.h:130
void updateDataViews()
Definition: mainwindow.cpp:871
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:25