aboutsummaryrefslogtreecommitdiff
path: root/eitControl.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-21 23:35:08 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-21 23:35:08 -0400
commita6c1993a64c29cdb1fbb4a3166cafc529855578f (patch)
treeedf6823813230684997d6c792848e26698d85782 /eitControl.py
parent9258928714f922023e5197fb1fd471ada06b9692 (diff)
downloadqolab-a6c1993a64c29cdb1fbb4a3166cafc529855578f.tar.gz
qolab-a6c1993a64c29cdb1fbb4a3166cafc529855578f.zip
removed stop button, make toggle stop/pause/continue button instead
Diffstat (limited to 'eitControl.py')
-rw-r--r--eitControl.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/eitControl.py b/eitControl.py
index e85b174..df8572d 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -109,20 +109,18 @@ class Experiment:
bAutoZoom.clicked.connect(self.autoZoom)
bRestart = QtGui.QPushButton('Restart')
bRestart.clicked.connect(self.restart)
- bStart = QtGui.QPushButton('Start')
- bStart.clicked.connect(self.start)
- bStop = QtGui.QPushButton('Stop')
- bStop.clicked.connect(self.stop)
+ bStartStopToggle = QtGui.QPushButton('&Start')
+ bStartStopToggle.clicked.connect(self.start)
+ self.buttons["StartStopToggle"] = bStartStopToggle
bSave = QtGui.QPushButton('Save data')
bSave.clicked.connect(self.saveCmd)
bExit = QtGui.QPushButton('Exit')
bExit.clicked.connect(exit)
w1.addWidget(bAutoZoom, row=0, col=0)
w1.addWidget(bRestart, row=0, col=1)
- w1.addWidget(bStart, row=0, col=2)
- w1.addWidget(bStop, row=0, col=3)
- w1.addWidget(bSave, row=0, col=4)
- w1.addWidget(bExit, row=0, col=5)
+ w1.addWidget(bStartStopToggle, row=0, col=2)
+ w1.addWidget(bSave, row=0, col=3)
+ w1.addWidget(bExit, row=0, col=4)
d1.addWidget(w1)
# RF gen gui
@@ -151,13 +149,22 @@ class Experiment:
def stop(self):
self.sweeper.cmdStop()
+ self.buttons["StartStopToggle"].setText("&Continue")
+ self.buttons["StartStopToggle"].clicked.disconnect()
+ self.buttons["StartStopToggle"].clicked.connect(self.start)
def start(self):
self.sweeper.cmdStart()
+ self.buttons["StartStopToggle"].setText("&Pause")
+ self.buttons["StartStopToggle"].clicked.disconnect()
+ self.buttons["StartStopToggle"].clicked.connect(self.stop)
def restart(self):
self.clearData()
self.sweeper.cmdRestart()
+ self.buttons["StartStopToggle"].setText("&Pause")
+ self.buttons["StartStopToggle"].clicked.disconnect()
+ self.buttons["StartStopToggle"].clicked.connect(self.stop)
def getNewDataFileName(self, ext="csv"):
data_dir = self.data_dir