Replot when checkbox toggle

This commit is contained in:
2023-08-14 16:20:46 +02:00
parent 3e02a6fa18
commit 3ad01c9a43

View File

@@ -252,6 +252,7 @@ class ecmcMtnMainGui(QtWidgets.QDialog):
self.checkBoxListAnalog[pv].setChecked(True)
self.checkBoxListAnalog[pv].setStyleSheet("color: " + self.checkboxColor[pv])
layoutVertPlotsSelectionUpper.addWidget(self.checkBoxListAnalog[pv])
self.checkBoxListAnalog[pv].toggled.connect(self.stateChangedAnalog)
layoutVertPlotsSelectionUpper.addSpacing(200)
@@ -269,6 +270,8 @@ class ecmcMtnMainGui(QtWidgets.QDialog):
self.checkBoxListBinary[pv].setChecked(True)
self.checkBoxListBinary[pv].setStyleSheet("color: " + self.checkboxColor[pv])
layoutVertPlotsSelectionLower.addWidget(self.checkBoxListBinary[pv])
self.checkBoxListBinary[pv].toggled.connect(self.stateChangedBinary)
framePlotsSelectionLower.setLayout(layoutVertPlotsSelectionLower)
layoutVertPlotsSelectionLower.addSpacing(200)
@@ -692,6 +695,15 @@ class ecmcMtnMainGui(QtWidgets.QDialog):
return
def stateChangedAnalog(self, int):
# refresh plots
self.plotAnalog()
def stateChangedBinary(self, int):
# refresh plots
self.plotBinary()
def plotAll(self):
if self.MtnYDataValid and self.MtnXDataValid:
self.plotAnalog()