mirror of https://gitlab.com/pamhyr/pamhyr2
Mesh tab: modification of the mesh layout to better integrate it into the modeling process
parent
890dbd9d32
commit
c170dbc46c
|
|
@ -314,6 +314,10 @@ class GeometryWindow(PamhyrWindow):
|
|||
trad=self._trad,
|
||||
parent=self
|
||||
)
|
||||
dlg.adjustSize()
|
||||
dialog_geometry = dlg.frameGeometry()
|
||||
dialog_geometry.moveCenter(self.frameGeometry().center())
|
||||
dlg.move(dialog_geometry.topLeft())
|
||||
if dlg.exec():
|
||||
data = {
|
||||
"step": dlg.space_step,
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ define_model_action = [
|
|||
"action_menu_rep_additional_lines",
|
||||
"action_menu_run_adists", "action_menu_pollutants",
|
||||
"action_menu_d90", "action_menu_dif", "action_menu_edit_geotiff",
|
||||
"action_menu_meshing",
|
||||
"action_menu_boundary_conditions_temperature",
|
||||
"action_menu_initial_conditions_temperature",
|
||||
"action_menu_weather_parameters", "action_menu_run_adistt",
|
||||
|
|
@ -310,6 +311,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
"action_menu_edit_scenarios": self.open_scenarios,
|
||||
"action_menu_edit_network": self.open_network,
|
||||
"action_menu_edit_geometry": self.open_geometry,
|
||||
"action_menu_meshing": self.open_meshing,
|
||||
"action_menu_boundary_conditions": self.open_boundary_cond,
|
||||
"action_menu_boundary_conditions_sediment":
|
||||
self.open_boundary_cond_sed,
|
||||
|
|
@ -351,6 +353,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
# Current actions
|
||||
"action_toolBar_network": self.open_network,
|
||||
"action_toolBar_geometry": self.open_geometry,
|
||||
"action_toolBar_meshing": self.open_meshing,
|
||||
"action_toolBar_boundary_cond": self.open_boundary_cond,
|
||||
"action_toolBar_lateral_contrib": self.open_lateral_contrib,
|
||||
"action_toolBar_frictions": self.open_frictions,
|
||||
|
|
@ -1339,7 +1342,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
GeometryWindow,
|
||||
data=[self._study, self.conf, reach]
|
||||
):
|
||||
return
|
||||
return self.get_sub_window(
|
||||
GeometryWindow,
|
||||
data=[self._study, self.conf, reach]
|
||||
)
|
||||
|
||||
geometry = GeometryWindow(
|
||||
study=self._study,
|
||||
|
|
@ -1348,8 +1354,21 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
parent=self
|
||||
)
|
||||
geometry.show()
|
||||
return geometry
|
||||
else:
|
||||
self.msg_select_reach()
|
||||
return None
|
||||
|
||||
def open_meshing(self):
|
||||
"""Open the current reach geometry and its meshing dialog."""
|
||||
geometry = self.open_geometry()
|
||||
if geometry is None or self._study.is_read_only():
|
||||
return
|
||||
|
||||
geometry.raise_()
|
||||
geometry.activateWindow()
|
||||
QApplication.processEvents()
|
||||
geometry.edit_meshing()
|
||||
|
||||
def open_boundary_cond_sed(self):
|
||||
self.open_boundary_cond(tab=1)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<property name="font">
|
||||
<font>
|
||||
<family>Serif</family>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
<property name="font">
|
||||
<font>
|
||||
<family>Ubuntu</family>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
|
|
@ -87,6 +89,7 @@
|
|||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
|
|
@ -126,6 +129,7 @@
|
|||
<string>&Geometry</string>
|
||||
</property>
|
||||
<addaction name="action_menu_edit_geometry"/>
|
||||
<addaction name="action_menu_meshing"/>
|
||||
<addaction name="action_menu_edit_geotiff"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_run">
|
||||
|
|
@ -257,6 +261,7 @@
|
|||
<property name="font">
|
||||
<font>
|
||||
<family>Ubuntu</family>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
|
|
@ -275,6 +280,7 @@
|
|||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
|
|
@ -325,6 +331,7 @@
|
|||
<property name="font">
|
||||
<font>
|
||||
<family>Ubuntu</family>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
|
|
@ -346,6 +353,7 @@
|
|||
</attribute>
|
||||
<addaction name="action_toolBar_network"/>
|
||||
<addaction name="action_toolBar_geometry"/>
|
||||
<addaction name="action_toolBar_meshing"/>
|
||||
<addaction name="action_toolBar_boundary_cond"/>
|
||||
<addaction name="action_toolBar_lateral_contrib"/>
|
||||
<addaction name="action_toolBar_frictions"/>
|
||||
|
|
@ -866,6 +874,30 @@
|
|||
<string>Open results temperature</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_menu_meshing">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>ressources/meshing.png</normaloff>ressources/meshing.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Meshing</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_toolBar_meshing">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>ressources/meshing.png</normaloff>ressources/meshing.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Meshing</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mesh geometry</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
|
|
|||
Loading…
Reference in New Issue