Commit 7a084e4d authored by payno's avatar payno
Browse files

[gui] several call fix to `SpectrumView._plot`. Has been renamed `SpectrumView._plotWidget`

parent 8d17c218
......@@ -60,8 +60,8 @@ class AutobkWindow(qt.QMainWindow):
# xas object viewer
mapKeys = ["mu", "bkg", "chie", "k", "chi", "e0"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plot.getYAxis().setLabel(
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plotWidget.getYAxis().setLabel(
"Absorption (a.u.)"
)
self.setCentralWidget(self.xasObjViewer)
......@@ -78,7 +78,7 @@ class AutobkWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -104,7 +104,7 @@ class AutobkWindow(qt.QMainWindow):
self._updateLegendView()
def getNCurves(self):
return len(self.xasObjViewer._spectrumViews[0]._plot.getAllCurves())
return len(self.xasObjViewer._spectrumViews[0]._plotWidget.getAllCurves())
def _updateLegendView(self):
index, viewType = self.xasObjViewer.getViewType()
......
......@@ -60,7 +60,7 @@ class MbackWindow(qt.QMainWindow):
# xas object viewer
mapKeys = ["mu", "fpp", "f2"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("Energy (eV)")
self.setCentralWidget(self.xasObjViewer)
self._parametersWindow = _ParameterWindowContainer(
parent=self, parametersWindow=_MBackParameters
......@@ -75,7 +75,7 @@ class MbackWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -108,7 +108,7 @@ class MbackWindow(qt.QMainWindow):
)
def getNCurves(self):
return len(self.xasObjViewer._spectrumViews[0]._plot.getAllCurves())
return len(self.xasObjViewer._spectrumViews[0]._plotWidget.getAllCurves())
class MbackOW(_ProcessForOrangeMixIn, OWWidget):
......
......@@ -60,7 +60,7 @@ class Mback_normWindow(qt.QMainWindow):
# xas object viewer
mapKeys = ["mu", "mback_mu", "norm"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plotWidgetWidget.getXAxis().setLabel("Energy (eV)")
self.setCentralWidget(self.xasObjViewer)
self._parametersWindow = _ParameterWindowContainer(
parent=self, parametersWindow=_MBackParameters
......@@ -75,7 +75,7 @@ class Mback_normWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -108,7 +108,7 @@ class Mback_normWindow(qt.QMainWindow):
)
def getNCurves(self):
return len(self.xasObjViewer._spectrumViews[0]._plot.getAllCurves())
return len(self.xasObjViewer._spectrumViews[0]._plotWidget.getAllCurves())
class Mback_normOW(_ProcessForOrangeMixIn, OWWidget):
......
......@@ -66,7 +66,7 @@ class _PreEdgeWindow(qt.QMainWindow):
# xas object viewer
mapKeys = ["mu", "norm", "norm_area"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("Energy (eV)")
self.setCentralWidget(self.xasObjViewer)
self._parametersWindow = _ParameterWindowContainer(
parent=self, parametersWindow=_MPreEdgeParameters
......@@ -81,7 +81,7 @@ class _PreEdgeWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -120,7 +120,7 @@ class _PreEdgeWindow(qt.QMainWindow):
)
def getNCurves(self):
return len(self.xasObjViewer._spectrumViews[0]._plot.getAllCurves())
return len(self.xasObjViewer._spectrumViews[0]._plotWidget.getAllCurves())
class PreEdgeOW(_ProcessForOrangeMixIn, OWWidget):
......
......@@ -83,7 +83,7 @@ class XFTFWindow(qt.QMainWindow):
# xas object viewer
mapKeys = ["mu", "chir", "chir_mag", "chir_re", "chir_im", "chir_pha"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("Energy (eV)")
self.setCentralWidget(self.xasObjViewer)
self._parametersWindow = _ParameterWindowContainer(
parent=self, parametersWindow=_MXFTFParameters
......@@ -98,7 +98,7 @@ class XFTFWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -131,7 +131,7 @@ class XFTFWindow(qt.QMainWindow):
)
def getNCurves(self):
return len(self.xasObjViewer._spectrumViews[0]._plot.getAllCurves())
return len(self.xasObjViewer._spectrumViews[0]._plotWidget.getAllCurves())
def setKWeight(self, kweight):
self._parametersWindow._mainwidget.setKWeight(kweight)
......
......@@ -62,8 +62,8 @@ class ExafsWindow(qt.QMainWindow):
qt.QMainWindow.__init__(self, parent)
mapKeys = ["mu", "EXAFS.EXAFSKValues", "EXAFS.EXAFSSignal", "EXAFS.PostEdgeB"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("K")
self.xasObjViewer._spectrumViews[0]._plot.getYAxis().setLabel(
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("K")
self.xasObjViewer._spectrumViews[0]._plotWidget.getYAxis().setLabel(
"Normalized Units"
)
self.setCentralWidget(self.xasObjViewer)
......@@ -81,7 +81,7 @@ class ExafsWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -156,8 +156,8 @@ class ExafsOW(_ProcessForOrangeMixIn, OWWidget):
layout = gui.vBox(self.mainArea, "exafs").layout()
layout.addWidget(self._window)
self._window.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("K")
self._window.xasObjViewer._spectrumViews[0]._plot.getYAxis().setLabel(
self._window.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("K")
self._window.xasObjViewer._spectrumViews[0]._plotWidget.getYAxis().setLabel(
"Normalized Units"
)
......
......@@ -64,10 +64,10 @@ class FTWindow(qt.QMainWindow):
self.xasObjViewer = XasObjectViewer(
mapKeys=["Mu"], spectrumPlots=("FTWindow", "FTIntensity")
)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("K")
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("K")
self.xasObjViewer._spectrumViews[1]._plot.getXAxis().setLabel("R (Angstrom)")
self.xasObjViewer._spectrumViews[1]._plot.getYAxis().setLabel("Arbitrary Units")
self.xasObjViewer._spectrumViews[1]._plotWidget.getXAxis().setLabel("R (Angstrom)")
self.xasObjViewer._spectrumViews[1]._plotWidget.getYAxis().setLabel("Arbitrary Units")
self.setCentralWidget(self.xasObjViewer)
self._pymcaWindow = _ParameterWindowContainer(
parent=self, parametersWindow=XASFourierTransformParameters
......@@ -82,7 +82,7 @@ class FTWindow(qt.QMainWindow):
# legend selectors
self.legendDockWidget1 = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget1.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......@@ -91,7 +91,7 @@ class FTWindow(qt.QMainWindow):
self.addDockWidget(qt.Qt.RightDockWidgetArea, self.legendDockWidget1)
self.legendDockWidget2 = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[1]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[1]._plotWidget
)
self.legendDockWidget2.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......
......@@ -124,8 +124,8 @@ class NormalizationWindow(qt.QMainWindow):
# xas object viewer
mapKeys = ["mu", "NormalizedMu", "NormalizedSignal", "NormalizedBackground"]
self.xasObjViewer = XasObjectViewer(mapKeys=mapKeys)
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plot.getYAxis().setLabel(
self.xasObjViewer._spectrumViews[0]._plotWidget.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plotWidget.getYAxis().setLabel(
"Absorption (a.u.)"
)
self.setCentralWidget(self.xasObjViewer)
......@@ -142,7 +142,7 @@ class NormalizationWindow(qt.QMainWindow):
# legend selector
self.legendDockWidget = LegendSelector.LegendsDockWidget(
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plot
parent=self, plot=self.xasObjViewer._spectrumViews[0]._plotWidget
)
self.legendDockWidget.setAllowedAreas(
qt.Qt.RightDockWidgetArea | qt.Qt.LeftDockWidgetArea
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment