From 5e5f94a0f864f6605e83c858df783a627645bd3a Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sun, 10 Apr 2016 20:07:46 +0800 Subject: [PATCH] browser: WIP for experiment replay --- artiq/browser/results.py | 5 +++-- artiq/frontend/artiq_browser.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/artiq/browser/results.py b/artiq/browser/results.py index 22e8a2196..718bba767 100644 --- a/artiq/browser/results.py +++ b/artiq/browser/results.py @@ -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"]) diff --git a/artiq/frontend/artiq_browser.py b/artiq/frontend/artiq_browser.py index 87028a931..179797332 100755 --- a/artiq/frontend/artiq_browser.py +++ b/artiq/frontend/artiq_browser.py @@ -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)