compiles again
[engrid.git] / src / guieditboundaryconditions.h
blobbc8925dffbed3428f35c520e447fefc94a9cca6a
1 //
2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + +
4 // + This file is part of enGrid. +
5 // + +
6 // + Copyright 2008,2009 Oliver Gloth +
7 // + +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
12 // + +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
17 // + +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 // + +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 #ifndef guieditboundaryconditions_H
24 #define guieditboundaryconditions_H
26 class GuiEditBoundaryConditions;
28 #include "boundarycondition.h"
29 #include "physicalboundarycondition.h"
30 #include "dialogoperation.h"
31 #include "guivolumedelegate.h"
32 #include "filetemplate.h"
33 #include "multipagewidgetpage.h"
34 #include "volumedefinition.h"
35 #include "multipagewidget.h"
37 #include "ui_guieditboundaryconditions.h"
39 // tabs:
40 // boundary conditions -> add/del/update
41 // boundary types -> add/del/update + change/load/save
42 // solver ->setup/save
43 // MPI -> add/del/update
45 class GuiEditBoundaryConditions : public DialogOperation<Ui::GuiEditBoundaryConditions, Operation>
48 Q_OBJECT;
50 private: // attributes
52 // variables to store settings locally while changing them. They will be copied over to their GuiMainWindow counterparts once OK is clicked.
53 QMap<int, BoundaryCondition> *m_BcMap;
54 QMap<QString, VolumeDefinition> m_VolMap;
55 QMap<QString, PhysicalBoundaryCondition> m_PhysicalBoundaryConditionsMap;
57 private: // utility attributes
59 GuiVolumeDelegate *delegate;
60 QVector <MultiPageWidgetPage*> m_page_vector;
61 PhysicalBoundaryCondition m_PBC_current;
63 MultiPageWidget* m_multipagewidget_Solver;
65 /// vector to hold the binaries
66 QVector <QString> m_SolverBinary;
68 public:
69 GuiEditBoundaryConditions();
70 virtual ~GuiEditBoundaryConditions();
71 void setMap(QMap<int, BoundaryCondition> *a_bcmap) { m_BcMap = a_bcmap; }
73 private:
74 virtual void before();
76 protected: // methods
77 virtual void operate();
79 // Boundary conditions tab
80 protected:
81 void updateVol();
82 protected slots:
83 void addVol();
84 void delVol();
86 // Boundary types tab
87 protected:
88 void updatePhysicalBoundaryConditions();
89 void loadPhysicalValues();
90 void savePhysicalValues();
91 protected slots:
92 void addBoundaryType();
93 void deleteBoundaryType();
94 void changePhysicalValues();
96 // Solver tab
97 protected:
98 void setupSolvers();
99 void saveSolverParameters();
100 protected slots:
102 // MPI configuration tab
103 protected:
104 void loadMpiParameters();
105 void saveMpiParameters();
106 QString tableToString();
107 void stringToTable(QString hostfile_txt);
108 protected slots:
109 void addProcess();
110 void deleteProcess();
111 void importHostFile();
112 void exportHostFile();
115 #endif