forked from M-Labs/artiq
1
0
Fork 0

gui: feedback on run deletion

This commit is contained in:
Sebastien Bourdeauducq 2015-07-25 15:08:27 +08:00
parent 61f45f505b
commit 696bceb406
2 changed files with 4 additions and 2 deletions

View File

@ -100,7 +100,7 @@ def main():
area.addDock(d_params, "above", d_results)
area.addDock(d_explorer, "above", d_params)
d_schedule = ScheduleDock(schedule_ctl)
d_schedule = ScheduleDock(status_bar, schedule_ctl)
loop.run_until_complete(d_schedule.sub_connect(
args.server, args.port_notify))
atexit.register(lambda: loop.run_until_complete(d_schedule.sub_close()))

View File

@ -46,9 +46,10 @@ class _ScheduleModel(DictSyncModel):
class ScheduleDock(dockarea.Dock):
def __init__(self, schedule_ctl):
def __init__(self, status_bar, schedule_ctl):
dockarea.Dock.__init__(self, "Schedule", size=(1000, 300))
self.status_bar = status_bar
self.schedule_ctl = schedule_ctl
self.table = QtGui.QTableView()
@ -86,4 +87,5 @@ class ScheduleDock(dockarea.Dock):
if idx:
row = idx[0].row()
rid = self.table_model.row_to_key[row]
self.status_bar.showMessage("Deleted RID {}".format(rid))
asyncio.async(self.delete(rid))