astrodatagui: add events for spin box and text field changes

This commit is contained in:
2024-03-18 16:21:19 +01:00
parent 0e94e12a94
commit 4457116d16
+24
View File
@@ -35,6 +35,14 @@ class AstrodataGUI(QtWidgets.QMainWindow):
self.comboPlotNormalizeUnit.currentTextChanged.connect(self.plotOptionsComboBoxTextChanged)
self.comboPlotPeriodogramMethod.currentTextChanged.connect(self.plotOptionsComboBoxTextChanged)
self.sbRemoveOutliersSigma.valueChanged.connect(self.plotOptionsSpinBoxValueChanged)
self.edBinSize.textEdited.connect(self.plotOptionsLineEditTextEdited)
self.edPlotFlattenWL.textEdited.connect(self.plotOptionsLineEditTextEdited)
self.edPlotFlattenPO.textEdited.connect(self.plotOptionsLineEditTextEdited)
self.edPlotFoldPeriod.textEdited.connect(self.plotOptionsLineEditTextEdited)
self.edPlotFoldEpochTime.textEdited.connect(self.plotOptionsLineEditTextEdited)
self.setupCustomSimbadQueries()
self.show()
self.loadDB()
@@ -238,6 +246,22 @@ class AstrodataGUI(QtWidgets.QMainWindow):
case self.comboPlotPeriodogramMethod:
self.updateFlaredetectionWidgetPeriodogram()
def plotOptionsSpinBoxValueChanged(self):
match(self.sender()):
case self.sbRemoveOutliersSigma:
self.updateFlaredetectionWidgetRemoveOutliers()
def plotOptionsLineEditTextEdited(self):
match(self.sender()):
case self.edBinSize:
self.updateFlaredetectionWidgetBin()
case (self.edPlotFlattenWL | self.edPlotFlattenPO):
self.updateFlaredetectionWidgetFlatten()
case (self.edPlotFoldPeriod | self.edPlotFoldEpochTime):
self.updateFlaredetectionWidgetFold()
def updateFlaredetectionWidgetFlux(self):
fluxType = self.comboPlotFluxType.currentText()
self.flaredetectorPreview.setFluxType(fluxType)