forked from M-Labs/artiq
1
0
Fork 0

gui/datasets: rm unused imports/style

This commit is contained in:
Robert Jördens 2016-04-05 18:15:09 +08:00
parent fc524961b2
commit 1814f12152
1 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,4 @@
import asyncio import asyncio
from collections import OrderedDict
from functools import partial
import logging import logging
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtWidgets
@ -16,8 +14,8 @@ logger = logging.getLogger(__name__)
class Model(DictSyncTreeSepModel): class Model(DictSyncTreeSepModel):
def __init__(self, init): def __init__(self, init):
DictSyncTreeSepModel.__init__(self, ".", DictSyncTreeSepModel.__init__(self, ".",
["Dataset", "Persistent", "Value"], ["Dataset", "Persistent", "Value"],
init) init)
def convert(self, k, v, column): def convert(self, k, v, column):
if column == 1: if column == 1:
@ -25,7 +23,7 @@ class Model(DictSyncTreeSepModel):
elif column == 2: elif column == 2:
return short_format(v[1]) return short_format(v[1])
else: else:
raise ValueError raise ValueError
class DatasetsDock(QtWidgets.QDockWidget): class DatasetsDock(QtWidgets.QDockWidget):
@ -46,7 +44,8 @@ class DatasetsDock(QtWidgets.QDockWidget):
self.table = QtWidgets.QTreeView() self.table = QtWidgets.QTreeView()
self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.table.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) self.table.setSelectionMode(
QtWidgets.QAbstractItemView.SingleSelection)
grid.addWidget(self.table, 1, 0) grid.addWidget(self.table, 1, 0)
self.table.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.table.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)