mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Translate: Retranslate draft to height.
This commit is contained in:
1 parent
dc78998bf6
commit
1e8d5c8f4f
6 files changed
+23
-23
No files matched your search
+4
-4
@@ -16,10 +16,10 @@ from PyQt5.QtWidgets import (
|
||||
QDoubleSpinBox,
|
||||
)
|
||||
|
||||
class DraftDialog(ASubWindow, ListedSubWindow):
|
||||
def __init__(self, title="Draft", parent=None):
|
||||
super(DraftDialog, self).__init__(
|
||||
name=title, ui="InitialConditions_Dialog_Generator_Draft", parent=parent
|
||||
class HeightDialog(ASubWindow, ListedSubWindow):
|
||||
def __init__(self, title="Height", parent=None):
|
||||
super(HeightDialog, self).__init__(
|
||||
name=title, ui="InitialConditions_Dialog_Generator_Height", parent=parent
|
||||
)
|
||||
|
||||
self.value = None
|
||||
@@ -161,6 +161,6 @@ class GenerateCommand(QUndoCommand):
|
||||
|
||||
def redo(self):
|
||||
if self._generator == "growing":
|
||||
self._ics.generate_growing_constante_draft(self._param)
|
||||
self._ics.generate_growing_constante_height(self._param)
|
||||
elif self._generator == "discharge":
|
||||
self._ics.generate_discharge(self._param)
|
||||
@@ -34,7 +34,7 @@ from View.Plot.MplCanvas import MplCanvas
|
||||
from View.InitialConditions.PlotDKP import PlotDKP
|
||||
from View.InitialConditions.PlotFlow import PlotFlow
|
||||
from View.InitialConditions.translate import *
|
||||
from View.InitialConditions.DialogDraft import DraftDialog
|
||||
from View.InitialConditions.DialogHeight import HeightDialog
|
||||
from View.InitialConditions.DialogDischarge import DischargeDialog
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
@@ -129,7 +129,7 @@ class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
|
||||
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||
|
||||
self.find(QPushButton, "pushButton_generate_1").clicked.connect(
|
||||
self.generate_growing_constante_draft
|
||||
self.generate_growing_constante_height
|
||||
)
|
||||
|
||||
self.find(QPushButton, "pushButton_generate_2").clicked.connect(
|
||||
@@ -212,8 +212,8 @@ class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
|
||||
self._table.redo()
|
||||
self._update_plot()
|
||||
|
||||
def generate_growing_constante_draft(self):
|
||||
dlg = DraftDialog(parent=self)
|
||||
def generate_growing_constante_height(self):
|
||||
dlg = HeightDialog(parent=self)
|
||||
if dlg.exec():
|
||||
value = dlg.value
|
||||
self._table.generate("growing", value)
|
||||
|
||||
@@ -11,5 +11,5 @@ table_headers = {
|
||||
"speed": _translate("LateralContribution", "Speed (m/s)"),
|
||||
"flow": _translate("LateralContribution", "Flow (m³/s)"),
|
||||
"elevation": _translate("LateralContribution", "Elevation (m)"),
|
||||
"draft": _translate("LateralContribution", "Draft (m)")
|
||||
"height": _translate("LateralContribution", "Height (m)")
|
||||
}
|
||||
File renamed without changes.
Reference in new issue
Block a user