2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-28 20:53:35 +08:00

browser: WIP for experiment replay

This commit is contained in:
Robert Jördens 2016-04-10 20:07:46 +08:00
parent 6c200b1418
commit 5e5f94a0f8
2 changed files with 4 additions and 3 deletions

View File

@ -37,7 +37,7 @@ class ResultIconProvider(QtWidgets.QFileIconProvider):
class ResultsDock(QtWidgets.QDockWidget):
def __init__(self, datasets, root=None):
def __init__(self, datasets, main_window, root=None):
QtWidgets.QDockWidget.__init__(self, "Results")
self.setObjectName("Results")
self.setFeatures(QtWidgets.QDockWidget.DockWidgetMovable |
@ -50,6 +50,7 @@ class ResultsDock(QtWidgets.QDockWidget):
root = QtCore.QDir.currentPath()
self.datasets = datasets
self.main_window = main_window
self.rt_model = QtWidgets.QFileSystemModel()
self.rt_model.setFilter(QtCore.QDir.NoDotAndDotDot |
@ -81,7 +82,7 @@ class ResultsDock(QtWidgets.QDockWidget):
def tree_current_changed(self, current, previous):
path = self.rt_model.filePath(current)
# we need to create a new model here. the old one remembers side effect
# create a new model for the ListView here
self.rl_model = QtWidgets.QFileSystemModel()
self.rl_model.setFilter(QtCore.QDir.Files)
self.rl_model.setNameFilters(["*.h5"])

View File

@ -85,7 +85,7 @@ def main():
status_bar = QtWidgets.QStatusBar()
main_window.setStatusBar(status_bar)
d_results = results.ResultsDock(datasets_sub)
d_results = results.ResultsDock(datasets_sub, main_window)
smgr.register(d_results)
d_applets = applets.AppletsDock(main_window, datasets_sub)