debug + interactive selection in lateral contrib

This commit is contained in:
Theophile Terraz committed 2024-06-11 16:19:52 +02:00
1 parent ea146cbe87
commit 59fc80a10b
6 files changed
+325 -7

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
# PlotKPC.py -- Pamhyr
# Copyright (C) 2023-2024 INRAE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
from PyQt5.QtCore import QCoreApplication
from View.HydraulicStructures.PlotKPC import PlotKPC
_translate = QCoreApplication.translate
class PlotKPZ(PlotKPC):
def __init__(self, canvas=None, trad=None, toolbar=None,
river=None, reach=None, profile=None,
parent=None):
super(PlotKPC, self).__init__(
canvas=canvas,
trad=trad,
data=river,
toolbar=toolbar,
parent=parent
)
self._current_reach = reach
self._current_profile = profile
self.label_x = self._trad["unit_kp"]
self.label_y = self._trad["unit_elevation"]
self._isometric_axis = False
self._auto_relim_update = True
self._autoscale_update = True
self.parent = parent
def onpick(self, event):
return
+4 -3
View File
@@ -50,7 +50,7 @@ from View.Frictions.Table import (
)
from View.Tools.Plot.PamhyrCanvas import MplCanvas
from View.Geometry.PlotKPZ import PlotKPZ
from View.Frictions.PlotKPZ import PlotKPZ
from View.Frictions.PlotStricklers import PlotStricklers
from View.Frictions.translate import FrictionsTranslate
@@ -135,10 +135,11 @@ class FrictionsWindow(PamhyrWindow):
self.plot = PlotKPZ(
canvas=self.canvas,
data=self._reach.reach,
study=self._study,
reach=self._reach,
river=self._study.river,
trad=self._trad,
toolbar=None,
parent=self
)
self.plot.draw()