From dbf389bb112a74632016fd1a6a8fec0389319373 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Mon, 21 Jun 2021 23:38:44 -0400 Subject: added button dictionary and hot keys for buttons --- eitControl.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'eitControl.py') diff --git a/eitControl.py b/eitControl.py index df8572d..66edc01 100644 --- a/eitControl.py +++ b/eitControl.py @@ -51,6 +51,7 @@ class Experiment: self.hardwareSetup(args) # now we ready to do gui + self.buttons = {} self.guiSweeper = Sweeper(self.root, Npoints=10, SweepTime=1, onTicCallbacks=[self.updatePlot]) self.guiSetup(root) self.guiSweeper.cmdStart() @@ -105,17 +106,21 @@ class Experiment: # global buttons w1 = pg.LayoutWidget() - bAutoZoom = QtGui.QPushButton('AutoZoom') + bAutoZoom = QtGui.QPushButton('&AutoZoom') bAutoZoom.clicked.connect(self.autoZoom) - bRestart = QtGui.QPushButton('Restart') + self.buttons["AutoZoom"] = bAutoZoom + bRestart = QtGui.QPushButton('&Restart') bRestart.clicked.connect(self.restart) + self.buttons["Restart"] = bRestart bStartStopToggle = QtGui.QPushButton('&Start') bStartStopToggle.clicked.connect(self.start) self.buttons["StartStopToggle"] = bStartStopToggle - bSave = QtGui.QPushButton('Save data') + bSave = QtGui.QPushButton('Sa&ve data') bSave.clicked.connect(self.saveCmd) - bExit = QtGui.QPushButton('Exit') + self.buttons["Save"] = bSave + bExit = QtGui.QPushButton('&Exit') bExit.clicked.connect(exit) + self.buttons["Exit"] = bExit w1.addWidget(bAutoZoom, row=0, col=0) w1.addWidget(bRestart, row=0, col=1) w1.addWidget(bStartStopToggle, row=0, col=2) -- cgit v1.2.3