debugging in progress (filter waveform not working)
This commit is contained in:
parent
ffa58c1f89
commit
a86a2efb8a
@ -375,8 +375,7 @@ class MainWindow(QMainWindow):
|
|||||||
filterOptions=self.getFilterOptions())
|
filterOptions=self.getFilterOptions())
|
||||||
if filterDlg.exec_():
|
if filterDlg.exec_():
|
||||||
filteroptions = filterDlg.getFilterOptions()
|
filteroptions = filterDlg.getFilterOptions()
|
||||||
assert isinstance(filteroptions, FilterOptions)
|
self.setFilterOptions(filteroptions)
|
||||||
self.setFilterOptions(filteroptions)
|
|
||||||
|
|
||||||
def getFilterOptions(self):
|
def getFilterOptions(self):
|
||||||
try:
|
try:
|
||||||
@ -447,6 +446,7 @@ class MainWindow(QMainWindow):
|
|||||||
new = NewEventDlg()
|
new = NewEventDlg()
|
||||||
if new.exec_() != QDialog.Rejected:
|
if new.exec_() != QDialog.Rejected:
|
||||||
evtpar = new.getValues()
|
evtpar = new.getValues()
|
||||||
|
|
||||||
self.data = Data(self, evtdata=createEvent(**evtpar))
|
self.data = Data(self, evtdata=createEvent(**evtpar))
|
||||||
self.dirty = True
|
self.dirty = True
|
||||||
|
|
||||||
|
@ -326,11 +326,10 @@ class NewEventDlg(QDialog):
|
|||||||
self.buttonBox.rejected.connect(self.reject)
|
self.buttonBox.rejected.connect(self.reject)
|
||||||
|
|
||||||
def getValues(self):
|
def getValues(self):
|
||||||
if self.accepted():
|
return {'origintime' : self.eventTimeEdit.dateTime().toPython(),
|
||||||
return {'origintime' : self.eventTimeEdit.dateTime().toPyDateTime(),
|
'latitude' : self.latEdit.text(),
|
||||||
'latitude' : self.latEdit.text(),
|
'longitude' : self.lonEdit.text(),
|
||||||
'longitude' : self.lonEdit.text(),
|
'depth' : self.depEdit.text()}
|
||||||
'depth' : self.depEdit.text()}
|
|
||||||
|
|
||||||
def setupUI(self):
|
def setupUI(self):
|
||||||
|
|
||||||
@ -376,8 +375,10 @@ class FilterOptionsDialog(QDialog):
|
|||||||
|
|
||||||
if parent is not None:
|
if parent is not None:
|
||||||
self.filterOptions = parent.getFilterOptions()
|
self.filterOptions = parent.getFilterOptions()
|
||||||
else:
|
elif filterOptions is not None:
|
||||||
self.filterOptions = FilterOptions(filterOptions)
|
self.filterOptions = FilterOptions(filterOptions)
|
||||||
|
else:
|
||||||
|
self.filterOptions = FilterOptions()
|
||||||
|
|
||||||
_enable = True
|
_enable = True
|
||||||
if self.getFilterOptions().getFilterType() is None:
|
if self.getFilterOptions().getFilterType() is None:
|
||||||
@ -397,7 +398,7 @@ class FilterOptionsDialog(QDialog):
|
|||||||
self.freqmaxSpinBox.setRange(5e-7, 1e6)
|
self.freqmaxSpinBox.setRange(5e-7, 1e6)
|
||||||
self.freqmaxSpinBox.setDecimals(2)
|
self.freqmaxSpinBox.setDecimals(2)
|
||||||
self.freqmaxSpinBox.setSuffix(' Hz')
|
self.freqmaxSpinBox.setSuffix(' Hz')
|
||||||
self.freqmaxSpinBox.setEnabled(_enable)
|
|
||||||
if _enable:
|
if _enable:
|
||||||
self.freqminSpinBox.setValue(self.getFilterOptions().getFreq()[0])
|
self.freqminSpinBox.setValue(self.getFilterOptions().getFreq()[0])
|
||||||
if self.getFilterOptions().getFilterType() in ['bandpass', 'bandstop']:
|
if self.getFilterOptions().getFilterType() in ['bandpass', 'bandstop']:
|
||||||
@ -436,6 +437,8 @@ class FilterOptionsDialog(QDialog):
|
|||||||
self.freqGroupLayout.addWidget(self.freqmaxSpinBox, 1, 1)
|
self.freqGroupLayout.addWidget(self.freqmaxSpinBox, 1, 1)
|
||||||
self.freqGroupBox.setLayout(self.freqGroupLayout)
|
self.freqGroupBox.setLayout(self.freqGroupLayout)
|
||||||
|
|
||||||
|
self.freqmaxSpinBox.setEnabled(_enable)
|
||||||
|
|
||||||
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|
|
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|
|
||||||
QDialogButtonBox.Cancel)
|
QDialogButtonBox.Cancel)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user