Commit bfefad92 authored by payno's avatar payno
Browse files

[orangecontrib][pymca] also use the _ParameterWindowContainer for pymca process

parent 503c6635
......@@ -49,6 +49,7 @@ from xas.gui.XasObjectViewer import XasObjectViewer, ViewType
from xas.gui.XasObjectViewer import _exafs_signal_plot, _exafs_postedge_plot, _exafs_knots_plot
from orangecontrib.xas.progress import QProgress
from orangecontrib.xas.utils import Converter
from ..container import _ParameterWindowContainer
_logger = logging.getLogger(__file__)
......@@ -65,7 +66,8 @@ class ExafsWindow(qt.QMainWindow):
self.setCentralWidget(self.xasObjViewer)
# pymca window
self._pymcaWindow = XASPostEdgeParameters(parent=self)
self._pymcaWindow = _ParameterWindowContainer(parent=self,
parametersWindow=XASPostEdgeParameters)
dockWidget = qt.QDockWidget(parent=self)
dockWidget.setWidget(self._pymcaWindow)
self.addDockWidget(qt.Qt.RightDockWidgetArea, dockWidget)
......@@ -151,8 +153,7 @@ class ExafsOW(_ProcessForOrangeMixIn, OWWidget):
self._window._pymcaWindow.setParameters(self._larchSettings)
# signal / slot connection
_sig = self._window._pymcaWindow.sigPostEdgeParametersSignal
_sig.connect(self._updateProcess)
self._window._pymcaWindow.sigChanged.connect(self._updateProcess)
def _updateProcess(self):
self._update_settings()
......
......@@ -51,6 +51,7 @@ from xas.gui.XasObjectViewer import _ft_intensity_plot, _ft_imaginary_plot
from orangecontrib.xas.progress import QProgress
from orangecontrib.xas.utils import Converter
from ..container import _ParameterWindowContainer
_logger = logging.getLogger(__file__)
......@@ -66,7 +67,8 @@ class FTWindow(qt.QMainWindow):
self.xasObjViewer._spectrumViews[1]._plot.getXAxis().setLabel("R (Angstrom)")
self.xasObjViewer._spectrumViews[1]._plot.getYAxis().setLabel("Arbitrary Units")
self.setCentralWidget(self.xasObjViewer)
self._pymcaWindow = XASFourierTransformParameters(parent=self)
self._pymcaWindow = _ParameterWindowContainer(parent=self,
parametersWindow=XASFourierTransformParameters)
dockWidget = qt.QDockWidget(parent=self)
# pymca window
......@@ -163,7 +165,8 @@ class FTOW(_ProcessForOrangeMixIn, OWWidget):
self._window._pymcaWindow.setParameters(self._pymcaSettings)
# signal / slot connection
self._window._pymcaWindow.sigFTParametersSignal.connect(self._updateProcess)
# connect signals / slots
self._window._pymcaWindow.sigChanged.connect(self._updateProcess)
def _updateProcess(self, *arv, **kwargs):
self._update_settings()
......
......@@ -49,6 +49,7 @@ from xas.core.types import XASObject
from xas.gui.XasObjectViewer import XasObjectViewer, ViewType
from orangecontrib.xas.progress import QProgress
from orangecontrib.xas.utils import Converter
from ..container import _ParameterWindowContainer
_logger = logging.getLogger(__file__)
......@@ -63,7 +64,8 @@ class NormalizationWindow(qt.QMainWindow):
self.xasObjViewer._spectrumViews[0]._plot.getXAxis().setLabel("Energy (eV)")
self.xasObjViewer._spectrumViews[0]._plot.getYAxis().setLabel("Absorption (a.u.)")
self.setCentralWidget(self.xasObjViewer)
self._pymcaWindow = XASNormalizationParameters(parent=self)
self._pymcaWindow = _ParameterWindowContainer(parent=self,
parametersWindow=XASNormalizationParameters)
dockWidget = qt.QDockWidget(parent=self)
# pymca window
......@@ -148,11 +150,7 @@ class NormalizationOW(_ProcessForOrangeMixIn, OWWidget):
self._window._pymcaWindow.setParameters(self._pymcaSettings)
# connect signals / slots
if hasattr(self._window._pymcaWindow, 'sigNormalizationParametersSignal'):
_sig = self._window._pymcaWindow.sigNormalizationParametersSignal
else:
_sig = self._window._pymcaWindow.sigXASNormalizationParametersSignal
_sig.connect(self._updateProcess)
_sig = self._window._pymcaWindow.sigChanged.connect(self._updateProcess)
def _updateProcess(self):
self._update_settings()
......
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