Skip to content

Commit

Permalink
Added the editor to the f2d_widget.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpachaly committed Jan 21, 2025
1 parent f083bb7 commit d8b2db5
Show file tree
Hide file tree
Showing 7 changed files with 1,064 additions and 199 deletions.
5 changes: 4 additions & 1 deletion flo2d/flo2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def setup_dock_widgets(self):
self.grid_info_tool.grid_elem_picked.connect(self.f2d_grid_info.update_fields)

self.f2d_widget.grid_tools.setup_connection()

self.f2d_widget.pre_processing_tools.setup_connection()

self.f2d_widget.profile_tool.setup_connection()

self.f2d_widget.rain_editor.setup_connection()
Expand Down Expand Up @@ -223,7 +226,7 @@ def setup_dock_widgets(self):

self.f2d_widget.multiple_channels_editor.setup_connection()

self.f2d_widget.pre_processing_tools.setup_connection()
self.f2d_widget.multiple_domains_editor.setup_connection()

def add_action(
self,
Expand Down
7 changes: 7 additions & 0 deletions flo2d/gui/f2d_main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from qgis._gui import QgsDockWidget

from .bc_editor_widget_new import BCEditorWidgetNew
from .multiple_domains_editor_widget import MultipleDomainsEditorWidget
from ..user_communication import UserCommunication
# from .bc_editor_widget import BCEditorWidget
from .channels_editor_widget import ChannelsEditorWidget
Expand Down Expand Up @@ -60,6 +61,7 @@ def __init__(self, iface, lyrs, plot, table):
self.setup_infil_editor()
self.setup_levee_and_breach_editor()
self.setup_multiple_channels_editor()
self.setup_multiple_domains_editor()
self.setup_pre_processing_tools()

# Setup the project folder
Expand All @@ -80,6 +82,7 @@ def __init__(self, iface, lyrs, plot, table):
self.profile_tool_grp,
self.levee_and_breach_editor_grp,
self.multiple_channels_editor_grp,
self.multiple_domains_editor_grp,
self.pre_processing_grp
]
self.set_collapsible_groups()
Expand Down Expand Up @@ -195,6 +198,10 @@ def setup_multiple_channels_editor(self):
self.multiple_channels_editor = MultipleChannelsEditorWidget(self.iface, self.lyrs)
self.multiple_channels_lout.addWidget(self.multiple_channels_editor)

def setup_multiple_domains_editor(self):
self.multiple_domains_editor = MultipleDomainsEditorWidget(self.iface, self.lyrs)
self.multiple_domains_lout.addWidget(self.multiple_domains_editor)

def setup_pre_processing_tools(self):
self.pre_processing_tools = PreProcessingWidget(self.iface, self.lyrs)
self.pre_processing_lout.addWidget(self.pre_processing_tools)
Expand Down
23 changes: 23 additions & 0 deletions flo2d/gui/multiple_domains_editor_widget.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-

# FLO-2D Preprocessor tools for QGIS

from ..user_communication import UserCommunication
from .ui_utils import load_ui

uiDialog, qtBaseClass = load_ui("multiple_domains_editor")


class MultipleDomainsEditorWidget(qtBaseClass, uiDialog):
def __init__(self, iface, lyrs):
qtBaseClass.__init__(self)
uiDialog.__init__(self)
self.iface = iface
self.con = None
self.lyrs = lyrs
self.setupUi(self)
self.uc = UserCommunication(iface, "FLO-2D")
self.grid_lyr = None

def setup_connection(self):
pass
100 changes: 100 additions & 0 deletions flo2d/img/export_gpkg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d8b2db5

Please sign in to comment.