Translate: Rename KP to RK (River Kilometric).

This commit is contained in:
Pierre-Antoine Rouby committed 2024-07-05 15:27:18 +02:00
1 parent b83494888b
commit 46dc527222
66 files changed
+668 -614

No files matched your search

+15 -15
View File
@@ -39,7 +39,7 @@ from View.Tools.Plot.PamhyrCanvas import MplCanvas
from View.Tools.Plot.PamhyrToolbar import PamhyrPlotToolbar
from View.HydraulicStructures.PlotAC import PlotAC
from View.HydraulicStructures.PlotKPC import PlotKPC
from View.HydraulicStructures.PlotRKC import PlotRKC
from View.HydraulicStructures.Table import (
TableModel, ComboBoxDelegate
@@ -89,21 +89,21 @@ class HydraulicStructuresWindow(PamhyrWindow):
parent=self,
mode="reaches"
)
self._delegate_kp = ComboBoxDelegate(
self._delegate_rk = ComboBoxDelegate(
trad=self._trad,
data=self._study.river,
parent=self,
mode="kp"
mode="rk"
)
table = self.find(QTableView, f"tableView")
self._table = TableModel(
table_view=table,
table_headers=self._trad.get_dict("table_headers"),
editable_headers=["name", "reach", "kp"],
editable_headers=["name", "reach", "rk"],
delegates={
"reach": self._delegate_reach,
"kp": self._delegate_kp,
"rk": self._delegate_rk,
},
trad=self._trad,
data=self._study.river,
@@ -135,7 +135,7 @@ class HydraulicStructuresWindow(PamhyrWindow):
self.plot_layout.addWidget(self.toolbar)
self.plot_layout.addWidget(self.canvas)
self.plot_kpc = PlotKPC(
self.plot_rkc = PlotRKC(
canvas=self.canvas,
river=self._study.river,
reach=None,
@@ -144,7 +144,7 @@ class HydraulicStructuresWindow(PamhyrWindow):
toolbar=self.toolbar,
parent=self
)
self.plot_kpc.draw()
self.plot_rkc.draw()
self.canvas_2 = MplCanvas(width=5, height=4, dpi=100)
self.canvas_2.setObjectName("canvas_2")
@@ -285,20 +285,20 @@ class HydraulicStructuresWindow(PamhyrWindow):
reach = self._hs_lst.get(rows[0]).input_reach
if reach is not None:
self.plot_kpc.set_reach(reach)
self.plot_rkc.set_reach(reach)
self.plot_ac.set_reach(reach)
profile_kp = self._hs_lst.get(rows[0]).input_kp
if profile_kp is not None:
profile_rk = self._hs_lst.get(rows[0]).input_rk
if profile_rk is not None:
profiles = reach.reach\
.get_profiles_from_kp(
float(profile_kp)
.get_profiles_from_rk(
float(profile_rk)
)
if len(profiles) != 0 and profiles is not None:
profile = profiles[0]
self.plot_kpc.set_profile(profile)
self.plot_rkc.set_profile(profile)
self.plot_ac.set_profile(profile)
else:
self._update_clear_profile()
@@ -308,9 +308,9 @@ class HydraulicStructuresWindow(PamhyrWindow):
self._update_clear_all()
def _update_clear_all(self):
self.plot_kpc.clear()
self.plot_rkc.clear()
self.plot_ac.clear()
def _update_clear_profile(self):
self.plot_ac.clear()
self.plot_kpc.clear_profile()
self.plot_rkc.clear_profile()