mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
refactoring: refacto IC.
This commit is contained in:
1 parent
500885ec4d
commit
b430cbb62b
9 files changed
+70
-106
No files matched your search
@@ -17,22 +17,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from tools import timer
|
||||
from View.Plot.APlot import APlot
|
||||
|
||||
from PyQt5.QtCore import (
|
||||
QCoreApplication
|
||||
)
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
class PlotDischarge(APlot):
|
||||
def __init__(self, canvas=None, data=None, toolbar=None):
|
||||
super(PlotDischarge, self).__init__(
|
||||
canvas=canvas,
|
||||
data=data,
|
||||
toolbar=toolbar
|
||||
)
|
||||
from View.Tools.PamhyrPlot import PamhyrPlot
|
||||
|
||||
class PlotDischarge(PamhyrPlot):
|
||||
@timer
|
||||
def draw(self, highlight=None):
|
||||
self.canvas.axes.cla()
|
||||
@@ -42,11 +29,11 @@ class PlotDischarge(APlot):
|
||||
return
|
||||
|
||||
self.canvas.axes.set_ylabel(
|
||||
_translate("MainWindow_reach", "Discharge (m^3/s)"),
|
||||
self._trad["discharge"],
|
||||
color='green', fontsize=11
|
||||
)
|
||||
self.canvas.axes.set_xlabel(
|
||||
_translate("MainWindow_reach", "KP (m)"),
|
||||
self._trad["kp"],
|
||||
color='green', fontsize=11
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user