debugging in progress (filter waveform not working)

This commit is contained in:
Sebastian Wehling 2015-03-05 14:52:34 +01:00
parent ffa58c1f89
commit a86a2efb8a
2 changed files with 12 additions and 9 deletions

View File

@ -375,8 +375,7 @@ class MainWindow(QMainWindow):
filterOptions=self.getFilterOptions())
if filterDlg.exec_():
filteroptions = filterDlg.getFilterOptions()
assert isinstance(filteroptions, FilterOptions)
self.setFilterOptions(filteroptions)
self.setFilterOptions(filteroptions)
def getFilterOptions(self):
try:
@ -447,6 +446,7 @@ class MainWindow(QMainWindow):
new = NewEventDlg()
if new.exec_() != QDialog.Rejected:
evtpar = new.getValues()
self.data = Data(self, evtdata=createEvent(**evtpar))
self.dirty = True

View File

@ -326,11 +326,10 @@ class NewEventDlg(QDialog):
self.buttonBox.rejected.connect(self.reject)
def getValues(self):
if self.accepted():
return {'origintime' : self.eventTimeEdit.dateTime().toPyDateTime(),
'latitude' : self.latEdit.text(),
'longitude' : self.lonEdit.text(),
'depth' : self.depEdit.text()}
return {'origintime' : self.eventTimeEdit.dateTime().toPython(),
'latitude' : self.latEdit.text(),
'longitude' : self.lonEdit.text(),
'depth' : self.depEdit.text()}
def setupUI(self):
@ -376,8 +375,10 @@ class FilterOptionsDialog(QDialog):
if parent is not None:
self.filterOptions = parent.getFilterOptions()
else:
elif filterOptions is not None:
self.filterOptions = FilterOptions(filterOptions)
else:
self.filterOptions = FilterOptions()
_enable = True
if self.getFilterOptions().getFilterType() is None:
@ -397,7 +398,7 @@ class FilterOptionsDialog(QDialog):
self.freqmaxSpinBox.setRange(5e-7, 1e6)
self.freqmaxSpinBox.setDecimals(2)
self.freqmaxSpinBox.setSuffix(' Hz')
self.freqmaxSpinBox.setEnabled(_enable)
if _enable:
self.freqminSpinBox.setValue(self.getFilterOptions().getFreq()[0])
if self.getFilterOptions().getFilterType() in ['bandpass', 'bandstop']:
@ -436,6 +437,8 @@ class FilterOptionsDialog(QDialog):
self.freqGroupLayout.addWidget(self.freqmaxSpinBox, 1, 1)
self.freqGroupBox.setLayout(self.freqGroupLayout)
self.freqmaxSpinBox.setEnabled(_enable)
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|
QDialogButtonBox.Cancel)