From d9c25130e3f61330c478b58fa73b31ef8f05d9c1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 23 May 2015 01:25:33 +0800 Subject: [PATCH] gui: add explorer widgets --- artiq/frontend/artiq_gui.py | 3 +++ artiq/gui/explorer.py | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_gui.py b/artiq/frontend/artiq_gui.py index c346674cf..1b4be3be6 100755 --- a/artiq/frontend/artiq_gui.py +++ b/artiq/frontend/artiq_gui.py @@ -46,6 +46,9 @@ def main(): win = QtGui.QMainWindow() area = dockarea.DockArea() win.setCentralWidget(area) + status_bar = QtGui.QStatusBar() + status_bar.showMessage("Connected to {}".format(args.server)) + win.setStatusBar(status_bar) win.resize(1400, 800) win.setWindowTitle("ARTIQ") diff --git a/artiq/gui/explorer.py b/artiq/gui/explorer.py index dcf7ee9ab..7edeed592 100644 --- a/artiq/gui/explorer.py +++ b/artiq/gui/explorer.py @@ -1,7 +1,41 @@ -from quamash import QtGui +from quamash import QtGui, QtCore from pyqtgraph import dockarea +from pyqtgraph import LayoutWidget class ExplorerDock(dockarea.Dock): def __init__(self): dockarea.Dock.__init__(self, "Explorer", size=(1100, 400)) + + splitter = QtGui.QSplitter(QtCore.Qt.Horizontal) + self.addWidget(splitter) + + grid = LayoutWidget() + splitter.addWidget(grid) + + el = QtGui.QListView() + grid.addWidget(el, 0, 0, colspan=4) + + datetime = QtGui.QDateTimeEdit() + datetime.setDisplayFormat("MMM d yyyy hh:mm:ss") + datetime.setCalendarPopup(True) + datetime.setDate(QtCore.QDate.currentDate()) + datetime_en = QtGui.QCheckBox("Set due date:") + grid.addWidget(datetime_en, 1, 0) + grid.addWidget(datetime, 1, 1, colspan=3) + + pipeline = QtGui.QLineEdit() + pipeline.insert("main") + grid.addLabel("Pipeline:", 2, 0) + grid.addWidget(pipeline, 2, 1) + + priority = QtGui.QSpinBox() + priority.setRange(-99, 99) + grid.addLabel("Priority:", 2, 2) + grid.addWidget(priority, 2, 3) + + submit = QtGui.QPushButton("Submit") + grid.addWidget(submit, 3, 0, colspan=4) + + placeholder = QtGui.QWidget() + splitter.addWidget(placeholder)