FilterOptionsDialog processes parameter filter option of type FilterOption

This commit is contained in:
Sebastian Wehling-Benatelli 2014-10-27 12:19:04 +01:00
parent 185b308166
commit 224c6b625c

View File

@ -148,22 +148,17 @@ class GraphicsTab(QWidget):
pass pass
class FilterOptionsDock(QDialog): class FilterOptionsDialog(QDialog):
def __init__(self, parent=None, titleString="Filter options", def __init__(self, parent=None, titleString="Filter options",
filterOptions=None): filterOptions=None):
super(FilterOptionsDock, self).__init__() """
PyLoT widget FilterOptionsDialog is a QDialog object. It is an UI to
adjust parameters for filtering seismic data.
"""
super(FilterOptionsDialog, self).__init__()
if filterOptions and not isinstance(filterOptions, FilterOptions): self.filterOptions = [filterOptions if filterOptions is not None else FilterOptions()][0]
try:
fOptions = FilterOptions(**filterOptions)
filterOptions = fOptions
except Exception, e:
raise OptionsError('%s' % e)
else:
filterOptions = FilterOptions()
self.filterOptions = filterOptions
self.freqminLabel = QLabel() self.freqminLabel = QLabel()
self.freqminLabel.setText("minimum:") self.freqminLabel.setText("minimum:")