Commit 67d5f80c authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[gui] Modified signals name for code cross coherence

parent c29af11d
...@@ -89,6 +89,7 @@ class Dataset(qt.QObject): ...@@ -89,6 +89,7 @@ class Dataset(qt.QObject):
self.dark_filename = dark_filename self.dark_filename = dark_filename
self.filenames = filenames self.filenames = filenames
self.__dims = AcquisitionDims() self.__dims = AcquisitionDims()
# Keys: dimensions names, values: dimensions values
self._dimensions_values = {} self._dimensions_values = {}
# Initialize data # Initialize data
......
...@@ -42,7 +42,7 @@ class PCAWidget(qt.QMainWindow): ...@@ -42,7 +42,7 @@ class PCAWidget(qt.QMainWindow):
""" """
Widget to apply PCA to a set of images and plot the eigenvalues found. Widget to apply PCA to a set of images and plot the eigenvalues found.
""" """
signalComputed = qt.Signal() sigComputed = qt.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
qt.QWidget.__init__(self, parent) qt.QWidget.__init__(self, parent)
...@@ -102,4 +102,4 @@ class PCAWidget(qt.QMainWindow): ...@@ -102,4 +102,4 @@ class PCAWidget(qt.QMainWindow):
vals = [item for sublist in vals for item in sublist] vals = [item for sublist in vals for item in sublist]
self._plot.show() self._plot.show()
self._plot.addCurve(numpy.arange(len(vals)), vals, symbol='.', linestyle=' ') self._plot.addCurve(numpy.arange(len(vals)), vals, symbol='.', linestyle=' ')
self.signalComputed.emit() self.sigComputed.emit()
...@@ -41,7 +41,6 @@ class BSSWidget(qt.QMainWindow): ...@@ -41,7 +41,6 @@ class BSSWidget(qt.QMainWindow):
""" """
Widget to apply blind source separation. Widget to apply blind source separation.
""" """
signalComputed = qt.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
qt.QMainWindow.__init__(self, parent) qt.QMainWindow.__init__(self, parent)
......
...@@ -45,7 +45,7 @@ class DatasetSelectionWidget(qt.QTabWidget): ...@@ -45,7 +45,7 @@ class DatasetSelectionWidget(qt.QTabWidget):
If both options are filled up, only the files in the list of filenames If both options are filled up, only the files in the list of filenames
are read. are read.
""" """
signalProgress = qt.Signal(int) sigProgressChanged = qt.Signal(int)
def __init__(self, parent=None): def __init__(self, parent=None):
qt.QTabWidget.__init__(self, parent) qt.QTabWidget.__init__(self, parent)
...@@ -90,7 +90,7 @@ class DatasetSelectionWidget(qt.QTabWidget): ...@@ -90,7 +90,7 @@ class DatasetSelectionWidget(qt.QTabWidget):
self._dataset = Dataset(filenames=self._rawFilesData.getFiles(), self._dataset = Dataset(filenames=self._rawFilesData.getFiles(),
dark_filename=self._darkFilenameData.getFilename(), dark_filename=self._darkFilenameData.getFilename(),
load_data=False, filter_data=self._filterData) load_data=False, filter_data=self._filterData)
self._dataset.signalProgress.connect(self.updateProgress) self._dataset.sigProgressChanged.connect(self.updateProgress)
_logger.info("Loading data urls") _logger.info("Loading data urls")
self._dataset.load_data(0.3) self._dataset.load_data(0.3)
_logger.info("Loading data") _logger.info("Loading data")
...@@ -102,7 +102,7 @@ class DatasetSelectionWidget(qt.QTabWidget): ...@@ -102,7 +102,7 @@ class DatasetSelectionWidget(qt.QTabWidget):
return self._dataset return self._dataset
def updateProgress(self, progress): def updateProgress(self, progress):
self.signalProgress.emit(progress) self.sigProgressChanged.emit(progress)
def __filterData(self, filterData): def __filterData(self, filterData):
self._filterData = filterData self._filterData = filterData
......
...@@ -44,7 +44,6 @@ class DisplayComponentsWidget(qt.QMainWindow): ...@@ -44,7 +44,6 @@ class DisplayComponentsWidget(qt.QMainWindow):
""" """
Widget to apply blind source separation. Widget to apply blind source separation.
""" """
signalComputed = qt.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
qt.QMainWindow.__init__(self, parent) qt.QMainWindow.__init__(self, parent)
......
...@@ -50,7 +50,7 @@ class ROISelectionWidget(qt.QWidget): ...@@ -50,7 +50,7 @@ class ROISelectionWidget(qt.QWidget):
""" """
Widget that allows the user to pick a ROI in any image of the dataset. Widget that allows the user to pick a ROI in any image of the dataset.
""" """
signalComputed = qt.Signal(list, list) sigComputed = qt.Signal(list, list)
def __init__(self, parent=None): def __init__(self, parent=None):
qt.QWidget.__init__(self, parent) qt.QWidget.__init__(self, parent)
...@@ -178,9 +178,9 @@ class ROISelectionWidget(qt.QWidget): ...@@ -178,9 +178,9 @@ class ROISelectionWidget(qt.QWidget):
if len(self.dataset.dark_frames): if len(self.dataset.dark_frames):
self.dataset.dark_frames = apply_3D_ROI(self.dataset.dark_frames, self.dataset.dark_frames = apply_3D_ROI(self.dataset.dark_frames,
self.roi.getSize() / 2, numpy.flip(self.roi.getCenter())) self.roi.getSize() / 2, numpy.flip(self.roi.getCenter()))
self.signalComputed.emit(self.roi.getOrigin().tolist(), self.roi.getSize().tolist()) self.sigComputed.emit(self.roi.getOrigin().tolist(), self.roi.getSize().tolist())
else: else:
self.signalComputed.emit([], []) self.sigComputed.emit([], [])
def resetROI(self): def resetROI(self):
""" """
......
...@@ -46,8 +46,8 @@ class ShiftCorrectionWidget(qt.QMainWindow): ...@@ -46,8 +46,8 @@ class ShiftCorrectionWidget(qt.QMainWindow):
""" """
A widget to apply shift correction to a stack of images A widget to apply shift correction to a stack of images
""" """
signalComputed = qt.Signal() sigComputed = qt.Signal()
signalProgress = qt.Signal(int) sigProgressChanged = qt.Signal(int)
def __init__(self, parent=None): def __init__(self, parent=None):
qt.QMainWindow.__init__(self, parent) qt.QMainWindow.__init__(self, parent)
...@@ -120,7 +120,7 @@ class ShiftCorrectionWidget(qt.QMainWindow): ...@@ -120,7 +120,7 @@ class ShiftCorrectionWidget(qt.QMainWindow):
self.thread_correction.start() self.thread_correction.start()
def updateProgress(self, progress): def updateProgress(self, progress):
self.signalProgress.emit(progress) self.sigProgressChanged.emit(progress)
def _changeDataShiftFlag(self, state): def _changeDataShiftFlag(self, state):
self._shift2dataset = state self._shift2dataset = state
...@@ -145,7 +145,7 @@ class ShiftCorrectionWidget(qt.QMainWindow): ...@@ -145,7 +145,7 @@ class ShiftCorrectionWidget(qt.QMainWindow):
data = self.thread_correction.data data = self.thread_correction.data
assert data is not None assert data is not None
self.setStack(data) self.setStack(data)
self.signalComputed.emit() self.sigComputed.emit()
if self._shift2dataset: if self._shift2dataset:
self.dataset.hi_dataset = data self.dataset.hi_dataset = data
......
...@@ -70,7 +70,7 @@ class DataSelectionWidgetOW(OWWidget): ...@@ -70,7 +70,7 @@ class DataSelectionWidgetOW(OWWidget):
self.controlArea.layout().addWidget(_buttons) self.controlArea.layout().addWidget(_buttons)
self._progressBar = gui.ProgressBar(self, 100) self._progressBar = gui.ProgressBar(self, 100)
self._widget.signalProgress.connect(self._updateProgress) self._widget.sigProgressChanged.connect(self._updateProgress)
_buttons.accepted.connect(self._getDataset) _buttons.accepted.connect(self._getDataset)
self.__updatingData = False self.__updatingData = False
......
...@@ -64,7 +64,7 @@ class RoiSelectionWidgetOW(OWWidget): ...@@ -64,7 +64,7 @@ class RoiSelectionWidgetOW(OWWidget):
# self._button.setEnabled(False) # self._button.setEnabled(False)
self.controlArea.layout().addWidget(self._widget) self.controlArea.layout().addWidget(self._widget)
# self.controlArea.layout().addWidget(self._button) # self.controlArea.layout().addWidget(self._button)
self._widget.signalComputed.connect(self._sendSignal) self._widget.sigComputed.connect(self._sendSignal)
# self._button.pressed.connect(self._createRoi) # self._button.pressed.connect(self._createRoi)
......
...@@ -61,8 +61,8 @@ class ShiftCorrectionWidgetOW(OWWidget): ...@@ -61,8 +61,8 @@ class ShiftCorrectionWidgetOW(OWWidget):
self._widget = ShiftCorrectionWidget(parent=self) self._widget = ShiftCorrectionWidget(parent=self)
self._progressBar = gui.ProgressBar(self, 100) self._progressBar = gui.ProgressBar(self, 100)
self._widget.signalComputed.connect(self._sendSignal) self._widget.sigComputed.connect(self._sendSignal)
self._widget.signalProgress.connect(self._updateProgress) self._widget.sigProgressChanged.connect(self._updateProgress)
self.controlArea.layout().addWidget(self._widget) self.controlArea.layout().addWidget(self._widget)
if self.shift: if self.shift:
......
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