diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-21 23:38:44 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-21 23:38:44 -0400 |
commit | dbf389bb112a74632016fd1a6a8fec0389319373 (patch) | |
tree | 93aa5c471ac830806719d9da63fc9aee9d261537 | |
parent | a6c1993a64c29cdb1fbb4a3166cafc529855578f (diff) | |
download | qolab-dbf389bb112a74632016fd1a6a8fec0389319373.tar.gz qolab-dbf389bb112a74632016fd1a6a8fec0389319373.zip |
added button dictionary and hot keys for buttons
-rw-r--r-- | eitControl.py | 13 |
1 files changed, 9 insertions, 4 deletions
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) |