mirror of https://github.com/m-labs/artiq.git
gui: notebook and enable switch
This commit is contained in:
parent
2a60c7475e
commit
3566cd1ce0
|
@ -83,9 +83,19 @@ class SchedulerWindow(Window):
|
||||||
Window.__init__(self, title="Scheduler")
|
Window.__init__(self, title="Scheduler")
|
||||||
self.set_default_size(720, 570)
|
self.set_default_size(720, 570)
|
||||||
|
|
||||||
vpane = Gtk.VPaned()
|
topvbox = Gtk.VBox(spacing=6)
|
||||||
vpane.set_position(270)
|
self.add(topvbox)
|
||||||
self.add(vpane)
|
|
||||||
|
hbox = Gtk.HBox(spacing=6)
|
||||||
|
enable = Gtk.Switch(active=True)
|
||||||
|
label = Gtk.Label("Run experiments")
|
||||||
|
label.set_justify(Gtk.Justification.RIGHT)
|
||||||
|
hbox.pack_start(label, False, False, 0)
|
||||||
|
hbox.pack_start(enable, False, False, 0)
|
||||||
|
topvbox.pack_start(hbox, False, False, 0)
|
||||||
|
|
||||||
|
notebook = Gtk.Notebook()
|
||||||
|
topvbox.pack_start(notebook, True, True, 0)
|
||||||
|
|
||||||
self.queue_store = Gtk.ListStore(int, str, str, str, str)
|
self.queue_store = Gtk.ListStore(int, str, str, str, str)
|
||||||
tree = Gtk.TreeView(self.queue_store)
|
tree = Gtk.TreeView(self.queue_store)
|
||||||
|
@ -97,10 +107,7 @@ class SchedulerWindow(Window):
|
||||||
scroll = Gtk.ScrolledWindow()
|
scroll = Gtk.ScrolledWindow()
|
||||||
scroll.add(tree)
|
scroll.add(tree)
|
||||||
vbox = Gtk.VBox(spacing=6)
|
vbox = Gtk.VBox(spacing=6)
|
||||||
label = Gtk.Label("Queue")
|
|
||||||
vbox.pack_start(label, False, False, 0)
|
|
||||||
vbox.pack_start(scroll, True, True, 0)
|
vbox.pack_start(scroll, True, True, 0)
|
||||||
|
|
||||||
hbox = Gtk.HBox(spacing=6)
|
hbox = Gtk.HBox(spacing=6)
|
||||||
button = Gtk.Button("Find")
|
button = Gtk.Button("Find")
|
||||||
hbox.pack_start(button, True, True, 0)
|
hbox.pack_start(button, True, True, 0)
|
||||||
|
@ -112,7 +119,7 @@ class SchedulerWindow(Window):
|
||||||
hbox.pack_start(button, True, True, 0)
|
hbox.pack_start(button, True, True, 0)
|
||||||
vbox.pack_start(hbox, False, False, 0)
|
vbox.pack_start(hbox, False, False, 0)
|
||||||
vbox.set_border_width(6)
|
vbox.set_border_width(6)
|
||||||
vpane.add1(vbox)
|
notebook.insert_page(vbox, Gtk.Label("Queue"), -1)
|
||||||
|
|
||||||
self.periodic_store = Gtk.ListStore(str, int, str, str, str, str, str)
|
self.periodic_store = Gtk.ListStore(str, int, str, str, str, str, str)
|
||||||
tree = Gtk.TreeView(self.periodic_store)
|
tree = Gtk.TreeView(self.periodic_store)
|
||||||
|
@ -124,11 +131,15 @@ class SchedulerWindow(Window):
|
||||||
scroll = Gtk.ScrolledWindow()
|
scroll = Gtk.ScrolledWindow()
|
||||||
scroll.add(tree)
|
scroll.add(tree)
|
||||||
vbox = Gtk.VBox(spacing=6)
|
vbox = Gtk.VBox(spacing=6)
|
||||||
label = Gtk.Label("Periodic schedule")
|
|
||||||
vbox.pack_start(label, False, False, 0)
|
|
||||||
vbox.pack_start(scroll, True, True, 0)
|
vbox.pack_start(scroll, True, True, 0)
|
||||||
|
hbox = Gtk.HBox(spacing=6)
|
||||||
|
button = Gtk.Button("Change period")
|
||||||
|
hbox.pack_start(button, True, True, 0)
|
||||||
|
button = Gtk.Button("Remove")
|
||||||
|
hbox.pack_start(button, True, True, 0)
|
||||||
|
vbox.pack_start(hbox, False, False, 0)
|
||||||
vbox.set_border_width(6)
|
vbox.set_border_width(6)
|
||||||
vpane.add2(vbox)
|
notebook.insert_page(vbox, Gtk.Label("Periodic schedule"), -1)
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def sub_connect(self, host, port):
|
def sub_connect(self, host, port):
|
||||||
|
|
Loading…
Reference in New Issue