From 5fab694c2705adf7e50dfe549b48421fa9ddd617 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Tue, 25 Jul 2023 09:41:05 +0200
Subject: [PATCH] Geometry: Plot: Rename KPC to KPZ.

---
 src/View/Frictions/Window.py                 | 6 +++---
 src/View/Geometry/{PlotKPC.py => PlotKPZ.py} | 8 ++++----
 src/View/Geometry/Window.py                  | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
 rename src/View/Geometry/{PlotKPC.py => PlotKPZ.py} (97%)

diff --git a/src/View/Frictions/Window.py b/src/View/Frictions/Window.py
index 71a3e8e1..18b39e3c 100644
--- a/src/View/Frictions/Window.py
+++ b/src/View/Frictions/Window.py
@@ -33,7 +33,7 @@ from View.Frictions.Table import (
 )
 
 from View.Plot.MplCanvas import MplCanvas
-from View.Geometry.PlotKPC import PlotKPC
+from View.Geometry.PlotKPZ import PlotKPZ
 from View.Frictions.PlotStricklers import PlotStricklers
 from View.Frictions.translate import *
 
@@ -112,7 +112,7 @@ class FrictionsWindow(ASubMainWindow, ListedSubWindow):
         self.plot_layout = self.find(QVBoxLayout, "verticalLayout")
         self.plot_layout.addWidget(self.canvas)
 
-        self.plot = PlotKPC(
+        self.plot = PlotKPZ(
             canvas = self.canvas,
             data = self._reach.reach,
             toolbar = None,
@@ -177,7 +177,7 @@ class FrictionsWindow(ASubMainWindow, ListedSubWindow):
             sec = self._frictions.get(rows[0])
             highlight = (sec.begin_kp, sec.end_kp)
 
-        self.plot = PlotKPC(
+        self.plot = PlotKPZ(
             canvas = self.canvas,
             data = reach,
             toolbar = None,
diff --git a/src/View/Geometry/PlotKPC.py b/src/View/Geometry/PlotKPZ.py
similarity index 97%
rename from src/View/Geometry/PlotKPC.py
rename to src/View/Geometry/PlotKPZ.py
index f3e883f3..b37f988f 100644
--- a/src/View/Geometry/PlotKPC.py
+++ b/src/View/Geometry/PlotKPZ.py
@@ -13,10 +13,10 @@ _translate = QCoreApplication.translate
 
 logger = logging.getLogger()
 
-class PlotKPC(APlot):
+class PlotKPZ(APlot):
     def __init__(self, canvas=None, data=None, toolbar=None,
                  display_current=True):
-        super(PlotKPC, self).__init__(
+        super(PlotKPZ, self).__init__(
             canvas=canvas,
             data=data,
             toolbar=toolbar
@@ -48,7 +48,7 @@ class PlotKPC(APlot):
             color='green', fontsize=12
         )
         self.canvas.axes.set_ylabel(
-            _translate("MainWindow_reach", "Cote (m)"),
+            _translate("MainWindow_reach", "Height (m)"),
             color='green', fontsize=12
         )
 
@@ -218,7 +218,7 @@ class PlotKPC(APlot):
                         kp, z_complete[i]
                     )
             except Exception as e:
-                logger.warning(f"Failed to update graphic KPC: {e}")
+                logger.warning(f"Failed to update graphic KPZ: {e}")
 
             self.canvas.axes.autoscale_view(True, True, True)
             self.canvas.figure.canvas.draw_idle()
diff --git a/src/View/Geometry/Window.py b/src/View/Geometry/Window.py
index 8efea1c3..835db523 100644
--- a/src/View/Geometry/Window.py
+++ b/src/View/Geometry/Window.py
@@ -22,7 +22,7 @@ from PyQt5.QtWidgets import (
 )
 
 from View.Geometry.PlotXY import PlotXY
-from View.Geometry.PlotKPC import PlotKPC
+from View.Geometry.PlotKPZ import PlotKPZ
 from View.Geometry.PlotAC import PlotAC
 
 from View.ASubWindow import WindowToolKit
@@ -201,7 +201,7 @@ class GeometryWindow(QMainWindow, WindowToolKit):
     def plot_kpc(self):
         self.tableView.model().blockSignals(True)
 
-        self._plot_kpc = PlotKPC(
+        self._plot_kpc = PlotKPZ(
             canvas = self.ui.canvas_2,
             data = self._reach,
             toolbar = self.ui.toolbar_2
-- 
GitLab