mirror of https://gitlab.com/pamhyr/pamhyr2
refactoring: refacto BC.
parent
7a5b4779e9
commit
ea3654f1f8
|
|
@ -21,7 +21,7 @@ import logging
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from tools import timer, trace
|
from tools import timer, trace
|
||||||
from View.Plot.APlot import APlot
|
from View.Tools.PamhyrPlot import PamhyrPlot
|
||||||
|
|
||||||
from PyQt5.QtCore import (
|
from PyQt5.QtCore import (
|
||||||
QCoreApplication
|
QCoreApplication
|
||||||
|
|
@ -33,16 +33,18 @@ _translate = QCoreApplication.translate
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
class Plot(APlot):
|
class Plot(PamhyrPlot):
|
||||||
def __init__(self, canvas=None, data=None,
|
def __init__(self, mode = "time", data=None,
|
||||||
mode = "time", toolbar=None):
|
trad=None, canvas=None, toolbar=None,
|
||||||
|
parent=None):
|
||||||
super(Plot, self).__init__(
|
super(Plot, self).__init__(
|
||||||
canvas=canvas,
|
canvas = canvas,
|
||||||
data=data,
|
trad = trad,
|
||||||
toolbar=toolbar
|
data = data,
|
||||||
|
toolbar = toolbar,
|
||||||
|
parent = parent
|
||||||
)
|
)
|
||||||
|
|
||||||
self._trad = BCETranslate()
|
|
||||||
self._table_headers = self._trad.get_dict("table_headers")
|
self._table_headers = self._trad.get_dict("table_headers")
|
||||||
self._mode = mode
|
self._mode = mode
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ from PyQt5.QtWidgets import (
|
||||||
QHeaderView, QDoubleSpinBox, QVBoxLayout,
|
QHeaderView, QDoubleSpinBox, QVBoxLayout,
|
||||||
)
|
)
|
||||||
|
|
||||||
from View.Plot.MplCanvas import MplCanvas
|
from View.Tools.Plot.PamhyrCanvas import MplCanvas
|
||||||
from View.Plot.PamhyrToolbar import PamhyrPlotToolbar
|
from View.Tools.Plot.PamhyrToolbar import PamhyrPlotToolbar
|
||||||
|
|
||||||
from View.BoundaryCondition.Edit.translate import BCETranslate
|
from View.BoundaryCondition.Edit.translate import BCETranslate
|
||||||
from View.BoundaryCondition.Edit.UndoCommand import SetMetaDataCommand
|
from View.BoundaryCondition.Edit.UndoCommand import SetMetaDataCommand
|
||||||
|
|
@ -122,8 +122,6 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||||
parent = parent
|
parent = parent
|
||||||
)
|
)
|
||||||
|
|
||||||
self.ui.setWindowTitle(self._title)
|
|
||||||
|
|
||||||
self.setup_table()
|
self.setup_table()
|
||||||
self.setup_plot()
|
self.setup_plot()
|
||||||
self.setup_data()
|
self.setup_data()
|
||||||
|
|
@ -183,6 +181,7 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||||
canvas = self.canvas,
|
canvas = self.canvas,
|
||||||
data = self._data,
|
data = self._data,
|
||||||
mode = self._study.time_system,
|
mode = self._study.time_system,
|
||||||
|
trad = self._trad,
|
||||||
toolbar = self.toolbar,
|
toolbar = self.toolbar,
|
||||||
)
|
)
|
||||||
self.plot.draw()
|
self.plot.draw()
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ from View.Study.Window import NewStudyWindow
|
||||||
from View.About.Window import AboutWindow
|
from View.About.Window import AboutWindow
|
||||||
from View.Network.Window import NetworkWindow
|
from View.Network.Window import NetworkWindow
|
||||||
from View.Geometry.Window import GeometryWindow
|
from View.Geometry.Window import GeometryWindow
|
||||||
# from View.BoundaryCondition.Window import BoundaryConditionWindow
|
from View.BoundaryCondition.Window import BoundaryConditionWindow
|
||||||
# from View.LateralContribution.Window import LateralContributionWindow
|
# from View.LateralContribution.Window import LateralContributionWindow
|
||||||
# from View.InitialConditions.Window import InitialConditionsWindow
|
# from View.InitialConditions.Window import InitialConditionsWindow
|
||||||
# from View.Stricklers.Window import StricklersWindow
|
# from View.Stricklers.Window import StricklersWindow
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue