From 4457116d168829c77b90060493f9d7e039aa7c2d Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Mon, 18 Mar 2024 16:21:19 +0100 Subject: [PATCH] astrodatagui: add events for spin box and text field changes --- main/astrodatagui/AstrodataGUI.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/main/astrodatagui/AstrodataGUI.py b/main/astrodatagui/AstrodataGUI.py index d83338a..2de9790 100644 --- a/main/astrodatagui/AstrodataGUI.py +++ b/main/astrodatagui/AstrodataGUI.py @@ -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)