bugfix: imports corrected;

imports updated, layout of 'FilterOptionsDock' started
This commit is contained in:
Sebastian Wehling-Benatelli 2014-04-10 09:34:13 +02:00
parent 8df11078b4
commit 6af43fc9fd

View File

@ -12,10 +12,10 @@ matplotlib.rcParams['backend.qt4'] = 'PySide'
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
from PySide.QtGui import (QDialog, QDockWidget)
from PySide.QtGui import (QDialog, QDockWidget, QDoubleSpinBox, QLabel,
QGroupBox, QGridLayout)
from pylot.core.util import OptionsError
from pylot.core.util import FilterOptions
from pylot.core.read import FilterOptions
class MPLWidget(FigureCanvasQTAgg):
@ -61,6 +61,38 @@ class FilterOptionsDock(QDockWidget):
filterOptions = fOptions
except Exception, e:
raise OptionsError('%s' % e)
else:
filterOptions = FilterOptions()
freqminLabel = QLabel()
freqminLabel.setText("minimum:")
freqminSpinBox = QDoubleSpinBox()
freqminSpinBox.setRange(5e-7, 1e6)
freqminSpinBox.setDecimals(2)
freqminSpinBox.setValue(filterOptions.freq[0])
freqmaxLabel = QLabel()
freqmaxLabel.setText("maximum:")
freqmaxSpinBox = QDoubleSpinBox()
freqmaxSpinBox.setRange(5e-7, 1e6)
freqmaxSpinBox.setDecimals(2)
if filterOptions.filterType not in ['bandpass', 'bandstop']:
freqminLabel.setText("cutoff:")
freqmaxLabel.setEnabled(False)
freqmaxSpinBox.setEnabled(False)
freqGroupBox = QGroupBox("Frequency range")
gbLayout = QGridLayout()
gbLayout.addWidget(freqminLabel, 0, 0)
gbLayout.addWidget(freqminSpinBox, 0, 1)
gbLayout.addWidget(freqmaxLabel, 1, 0)
gbLayout.addWidget(freqmaxSpinBox, 1, 1)
freqGroupBox.setLayout(gbLayout)
grid = QGridLayout()
grid.addWidget(freqGroupBox, 0, 0, 2, 2)
self.setLayout(grid)
class LoadDataDlg(QDialog):