Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema 300 styles v2 #293

Merged
merged 7 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions threedi_schematisation_editor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def on_3di_project_read(self):
if lm not in self.workspace_context_manager:
lm.load_all_layers(from_project=True)
self.workspace_context_manager.register_layer_manager(lm)
self.uc.bar_info("3Di User Layers registered!")
self.uc.bar_info("Project schematisations loaded!")
self.check_macros_status()
self.toggle_active_project_actions()

Expand Down Expand Up @@ -248,7 +248,7 @@ def load_schematisation(self, model_gpkg=None):
return
lm.load_all_layers()
self.workspace_context_manager.register_layer_manager(lm)
self.uc.bar_info("3Di User Layers registered!")
self.uc.bar_info(f"Schematisation {lm.model_name} loaded!")
self.check_macros_status()
self.toggle_active_project_actions()
if self.model_gpkg and not is_gpkg_connection_exists(self.model_gpkg):
Expand Down
2 changes: 2 additions & 0 deletions threedi_schematisation_editor/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ class Culvert(ModelObject):
invert_level_end: float
discharge_coefficient_positive: float
discharge_coefficient_negative: float
material_id: int
friction_value: float
friction_type: FrictionType
connection_node_id_start: int
Expand All @@ -276,6 +277,7 @@ def display_names() -> list:
"Invert level end point",
"Discharge coefficient positive",
"Discharge coefficient negative",
"Material ID",
"Friction value",
"Friction type",
"Connection node start ID",
Expand Down
4 changes: 2 additions & 2 deletions threedi_schematisation_editor/enumerators.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ class Unit(Enum):


class MeasureVariable(Enum):
S1 = "s1"
VOL1 = "vol1"
WATER_LEVEL = "water_level"
VOLUME = "volume"


class ControlType(Enum):
Expand Down
10 changes: 6 additions & 4 deletions threedi_schematisation_editor/forms/custom_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ def setup_tag_widgets(self):
tag_descriptions = [tag_feat["description"] for tag_feat in tags_layer.getFeatures(tag_ids)]
self.tags.setText(", ".join(tag_descriptions))

def populate_with_extra_widgets(self):
"""Populate widgets for other layers attributes."""
if self.creation is True:
self.fill_related_attributes()
self.populate_widgets()


class AbstractFormWithDistribution(AbstractBaseForm):
"""Base edit form for user layers with distribution table."""
Expand Down Expand Up @@ -1370,10 +1376,6 @@ class ConnectionNodeForm(AbstractFormWithTag):

MODEL = dm.ConnectionNode

def populate_with_extra_widgets(self):
# Populate widgets based on features attributes
self.populate_widgets()


class PipeForm(AbstractFormWithStartEndNode, AbstractFormWithXSTable, AbstractFormWithTag):
"""Pipe user layer edit form logic."""
Expand Down
4 changes: 2 additions & 2 deletions threedi_schematisation_editor/forms/ui/channel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Bank level</string>
<string>Bank level [m MSL]</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
Expand Down Expand Up @@ -1913,7 +1913,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Reference level [m]</string>
<string>Reference level [m MSL]</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Bank level [m]</string>
<string>Bank level [m MSL]</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
Expand All @@ -928,7 +928,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Reference level [m]</string>
<string>Reference level [m MSL]</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
Expand Down
Loading
Loading