Commit 9ed31f77 authored by payno's avatar payno

[orange add-on][dataselection] add Setting

parent fe0b5b62
......@@ -31,9 +31,9 @@ __date__ = "02/10/2018"
from Orange.widgets import gui
from Orange.widgets.widget import OWWidget
from Orange.canvas.registry.description import OutputSignal
from Orange.widgets.settings import Setting
from id06workflow.gui.datasetselection import DatasetSelection
from id06workflow.core.experiment import Experiment
from Orange.widgets.settings import Setting
from silx.gui import qt
import os
import logging
......@@ -85,12 +85,18 @@ class DataSelectionOW(OWWidget):
if os.path.isfile(self._data_file_pattern):
self._widget.setDataFilesPattern(self._data_file_pattern)
elif self._data_file_pattern != '':
_logger.info('%s is not recognized as an existing file pattern' % self._data_file_pattern)
for _file in self._flat_field_files:
if os.path.isfile(_file):
self._widget.addFlatFieldFile(_file)
else:
_logger.info('%s is not a valid file path')
for _file in self._dark_files:
if os.path.isfile(_file):
self._widget.addDarkFile(_file)
else:
_logger.info('%s is not a valid file path')
def _process(self):
"""
......@@ -106,3 +112,8 @@ class DataSelectionOW(OWWidget):
def sizeHint(self):
return qt.QSize(400, 400)
def updateProperties(self):
self._data_file_pattern = self._widget.getDataFilesPattern()
self._flat_field_files = self._widget.getFlatFieldFiles()
self._dark_files = self._widget.getDarkFiles()
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