filterOptions has now a buttonBox
This commit is contained in:
parent
3e559f61da
commit
41684cd282
@ -200,16 +200,22 @@ 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.layoutEditables = QHBoxLayout()
|
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|
|
||||||
self.layoutEditables.addWidget(self.freqGroupBox)
|
QDialogButtonBox.Cancel)
|
||||||
self.layoutEditables.addLayout(self.selectTypeLayout)
|
|
||||||
|
|
||||||
self.setLayout(self.layoutEditables)
|
grid = QGridLayout()
|
||||||
|
grid.addWidget(self.freqGroupBox, 0, 2, 1, 2)
|
||||||
|
grid.addLayout(self.selectTypeLayout, 1, 2, 1, 2)
|
||||||
|
grid.addWidget(self.buttonBox, 2, 2, 1, 2)
|
||||||
|
|
||||||
|
self.setLayout(grid)
|
||||||
|
|
||||||
self.freqminSpinBox.valueChanged.connect(self.updateUi)
|
self.freqminSpinBox.valueChanged.connect(self.updateUi)
|
||||||
self.freqmaxSpinBox.valueChanged.connect(self.updateUi)
|
self.freqmaxSpinBox.valueChanged.connect(self.updateUi)
|
||||||
self.orderSpinBox.valueChanged.connect(self.updateUi)
|
self.orderSpinBox.valueChanged.connect(self.updateUi)
|
||||||
self.selectTypeCombo.currentIndexChanged.connect(self.updateUi)
|
self.selectTypeCombo.currentIndexChanged.connect(self.updateUi)
|
||||||
|
self.buttonBox.accepted.connect(self.accept)
|
||||||
|
self.buttonBox.rejected.connect(self.reject)
|
||||||
|
|
||||||
def updateUi(self):
|
def updateUi(self):
|
||||||
if self.selectTypeCombo.currentText() not in ['bandpass', 'bandstop']:
|
if self.selectTypeCombo.currentText() not in ['bandpass', 'bandstop']:
|
||||||
@ -237,11 +243,14 @@ class FilterOptionsDialog(QDialog):
|
|||||||
freq.append(self.freqmaxSpinBox.value())
|
freq.append(self.freqmaxSpinBox.value())
|
||||||
self.filterOptions.freq = freq
|
self.filterOptions.freq = freq
|
||||||
self.filterOptions.order = self.orderSpinBox.value()
|
self.filterOptions.order = self.orderSpinBox.value()
|
||||||
return self.getFilterOptions()
|
|
||||||
|
|
||||||
def getFilterOptions(self):
|
def getFilterOptions(self):
|
||||||
return self.filterOptions
|
return self.filterOptions
|
||||||
|
|
||||||
|
def accept(self):
|
||||||
|
self.updateUi()
|
||||||
|
QDialog.accept(self)
|
||||||
|
|
||||||
|
|
||||||
class LoadDataDlg(QDialog):
|
class LoadDataDlg(QDialog):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user