forked from M-Labs/artiq
1
0
Fork 0

gui: add explorer widgets

This commit is contained in:
Sebastien Bourdeauducq 2015-05-23 01:25:33 +08:00
parent 82ec931003
commit d9c25130e3
2 changed files with 38 additions and 1 deletions

View File

@ -46,6 +46,9 @@ def main():
win = QtGui.QMainWindow() win = QtGui.QMainWindow()
area = dockarea.DockArea() area = dockarea.DockArea()
win.setCentralWidget(area) win.setCentralWidget(area)
status_bar = QtGui.QStatusBar()
status_bar.showMessage("Connected to {}".format(args.server))
win.setStatusBar(status_bar)
win.resize(1400, 800) win.resize(1400, 800)
win.setWindowTitle("ARTIQ") win.setWindowTitle("ARTIQ")

View File

@ -1,7 +1,41 @@
from quamash import QtGui from quamash import QtGui, QtCore
from pyqtgraph import dockarea from pyqtgraph import dockarea
from pyqtgraph import LayoutWidget
class ExplorerDock(dockarea.Dock): class ExplorerDock(dockarea.Dock):
def __init__(self): def __init__(self):
dockarea.Dock.__init__(self, "Explorer", size=(1100, 400)) 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)