Commit a7c01d11 authored by payno's avatar payno

[gui][e0calculator] add widget to select a roi and compute E0 from it

parent 481e0955
......@@ -173,6 +173,13 @@ class XasObjectViewer(qt.QMainWindow):
class MapViewer(qt.QWidget):
"""
Widget to display different map of the spectra
"""
sigFrameChanged = qt.Signal(int)
"""Signal emitter when the frame number has changed."""
def __init__(self, parent=None, keys=None):
"""
......@@ -209,8 +216,13 @@ class MapViewer(qt.QWidget):
self.keySelectionDocker.setAllowedAreas(qt.Qt.TopDockWidgetArea)
self.keySelectionDocker.setFeatures(qt.QDockWidget.NoDockWidgetFeatures)
# expose API
self.getActiveImage = self._mainWindow.getActiveImage
self.menuBar = self._mainWindow.menuBar
# connect signal / slot
self._keyComboBox.currentTextChanged.connect(self._updateView)
self._mainWindow.sigFrameChanged.connect(self._shareFrameChangedSignal)
def clear(self):
self._mainWindow.clear()
......@@ -235,6 +247,14 @@ class MapViewer(qt.QWidget):
def getPlot(self):
return self._mainWindow.getPlot()
def _shareFrameChangedSignal(self, frame):
self.sigFrameChanged.emit(frame)
def setPerspectiveVisible(self, b):
"""hide the dimension selection"""
self._mainWindow.setOptionVisible(b)
self._mainWindow._browser.setVisible(True)
class _ExtendedSliderWithBrowser(HorizontalSliderWithBrowser):
def __init__(self, parent=None, name=None):
......
This diff is collapsed.
Markdown is supported
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