forked from M-Labs/artiq
1
0
Fork 0

browser: add cascade and tile

This commit is contained in:
Robert Jördens 2016-05-25 17:33:33 +02:00
parent 78de2a7d5c
commit ec34a552b0
1 changed files with 17 additions and 7 deletions

View File

@ -75,14 +75,24 @@ class Browser(QtWidgets.QMainWindow):
self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.datasets) self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.datasets)
self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, self.log) self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, self.log)
open_action = QtWidgets.QAction("&Open", self) g = self.menuBar().addMenu("&Experiment")
open_action.setIcon(QtWidgets.QApplication.style().standardIcon( a = QtWidgets.QAction("&Open", self)
a.setIcon(QtWidgets.QApplication.style().standardIcon(
QtWidgets.QStyle.SP_DialogOpenButton)) QtWidgets.QStyle.SP_DialogOpenButton))
open_action.setShortcuts(QtGui.QKeySequence.Open) a.setShortcuts(QtGui.QKeySequence.Open)
open_action.setStatusTip("Open an experiment") a.setStatusTip("Open an experiment")
open_action.triggered.connect(self.experiments.select_experiment) a.triggered.connect(self.experiments.select_experiment)
exp_group = self.menuBar().addMenu("&Experiment") g.addAction(a)
exp_group.addAction(open_action)
g = self.menuBar().addMenu("&View")
a = QtWidgets.QAction("Cascade", self)
a.setStatusTip("Cascade experiment windows")
a.triggered.connect(self.experiments.cascadeSubWindows)
g.addAction(a)
a = QtWidgets.QAction("Tile", self)
a.setStatusTip("Tile experiment windows")
a.triggered.connect(self.experiments.tileSubWindows)
g.addAction(a)
def closeEvent(self, *args): def closeEvent(self, *args):
self.exit_request.set() self.exit_request.set()