forked from M-Labs/artiq
schedule: style (NFC)
This commit is contained in:
parent
4f302ee675
commit
c1e6ae2193
@ -16,8 +16,7 @@ class Model(DictSyncModel):
|
|||||||
def __init__(self, init):
|
def __init__(self, init):
|
||||||
DictSyncModel.__init__(self,
|
DictSyncModel.__init__(self,
|
||||||
["RID", "Pipeline", "Status", "Prio", "Due date",
|
["RID", "Pipeline", "Status", "Prio", "Due date",
|
||||||
"Revision", "File", "Class name"],
|
"Revision", "File", "Class name"], init)
|
||||||
init)
|
|
||||||
|
|
||||||
def sort_key(self, k, v):
|
def sort_key(self, k, v):
|
||||||
# order by priority, and then by due date and RID
|
# order by priority, and then by due date and RID
|
||||||
@ -96,14 +95,14 @@ class ScheduleDock(QtWidgets.QDockWidget):
|
|||||||
|
|
||||||
cw = QtGui.QFontMetrics(self.font()).averageCharWidth()
|
cw = QtGui.QFontMetrics(self.font()).averageCharWidth()
|
||||||
h = self.table.horizontalHeader()
|
h = self.table.horizontalHeader()
|
||||||
h.resizeSection(0, 7*cw)
|
h.resizeSection(0, 7 * cw)
|
||||||
h.resizeSection(1, 12*cw)
|
h.resizeSection(1, 12 * cw)
|
||||||
h.resizeSection(2, 16*cw)
|
h.resizeSection(2, 16 * cw)
|
||||||
h.resizeSection(3, 6*cw)
|
h.resizeSection(3, 6 * cw)
|
||||||
h.resizeSection(4, 16*cw)
|
h.resizeSection(4, 16 * cw)
|
||||||
h.resizeSection(5, 30*cw)
|
h.resizeSection(5, 30 * cw)
|
||||||
h.resizeSection(6, 20*cw)
|
h.resizeSection(6, 20 * cw)
|
||||||
h.resizeSection(7, 20*cw)
|
h.resizeSection(7, 20 * cw)
|
||||||
|
|
||||||
def set_model(self, model):
|
def set_model(self, model):
|
||||||
self.table_model = model
|
self.table_model = model
|
||||||
@ -151,7 +150,6 @@ class ScheduleDock(QtWidgets.QDockWidget):
|
|||||||
rids.add(rid)
|
rids.add(rid)
|
||||||
asyncio.ensure_future(self.request_term_multiple(rids))
|
asyncio.ensure_future(self.request_term_multiple(rids))
|
||||||
|
|
||||||
|
|
||||||
def save_state(self):
|
def save_state(self):
|
||||||
return bytes(self.table.horizontalHeader().saveState())
|
return bytes(self.table.horizontalHeader().saveState())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user