mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
IC: Add Model and View base code.
This commit is contained in:
1 parent
10f1d11ddf
commit
0512947e0e
10 files changed
+800
-4
No files matched your search
+19
-4
@@ -24,6 +24,7 @@ from View.Network.Window import NetworkWindow
|
||||
from View.Geometry.Window import GeometryWindow
|
||||
from View.BoundaryCondition.Window import BoundaryConditionWindow
|
||||
from View.LateralContribution.Window import LateralContributionWindow
|
||||
from View.InitialConditions.Window import InitialConditionsWindow
|
||||
from View.Stricklers.Window import StricklersWindow
|
||||
from View.Sections.Window import SectionsWindow
|
||||
|
||||
@@ -49,6 +50,7 @@ define_model_action = [
|
||||
"action_toolBar_boundary_cond", "action_toolBar_lateral_contrib",
|
||||
"action_toolBar_spills", "action_toolBar_sections",
|
||||
"action_toolBar_stricklers", "action_toolBar_building",
|
||||
"action_toolBar_initial_cond",
|
||||
]
|
||||
|
||||
action = (
|
||||
@@ -130,6 +132,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
"action_toolBar_stricklers": self.open_stricklers,
|
||||
"action_toolBar_sections": self.open_sections,
|
||||
"action_toolBar_building": lambda: self.open_dummy("Ouvrages"),
|
||||
"action_toolBar_initial_cond": self.open_initial_conditions,
|
||||
}
|
||||
|
||||
for action in actions:
|
||||
@@ -328,28 +331,40 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
"into river network window to work on it")
|
||||
|
||||
def open_boundary_cond(self):
|
||||
self.bound = BoundaryConditionWindow(study = self.model, parent=self)
|
||||
self.bound = BoundaryConditionWindow(study = self.model, parent = self)
|
||||
self.bound.show()
|
||||
|
||||
def open_lateral_contrib(self):
|
||||
self.lateral = LateralContributionWindow(study = self.model, parent=self)
|
||||
self.lateral = LateralContributionWindow(study = self.model, parent = self)
|
||||
self.lateral.show()
|
||||
|
||||
def open_stricklers(self):
|
||||
self.strick = StricklersWindow(
|
||||
study = self.model,
|
||||
config = self.conf,
|
||||
parent=self
|
||||
parent = self
|
||||
)
|
||||
self.strick.show()
|
||||
|
||||
def open_sections(self):
|
||||
self.sections = SectionsWindow(
|
||||
study = self.model,
|
||||
parent=self
|
||||
parent = self
|
||||
)
|
||||
self.sections.show()
|
||||
|
||||
def open_initial_conditions(self):
|
||||
print("xxx")
|
||||
if self.model.river.has_current_reach():
|
||||
print("yyy")
|
||||
self.initial = InitialConditionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
)
|
||||
self.initial.show()
|
||||
print("zzz")
|
||||
|
||||
|
||||
# TODO: Delete me !
|
||||
###############
|
||||
# DUMMY STUFF #
|
||||
|
||||
Reference in new issue
Block a user