forked from M-Labs/artiq
browser: WIP for experiment replay
This commit is contained in:
parent
6c200b1418
commit
5e5f94a0f8
|
@ -37,7 +37,7 @@ class ResultIconProvider(QtWidgets.QFileIconProvider):
|
||||||
|
|
||||||
|
|
||||||
class ResultsDock(QtWidgets.QDockWidget):
|
class ResultsDock(QtWidgets.QDockWidget):
|
||||||
def __init__(self, datasets, root=None):
|
def __init__(self, datasets, main_window, root=None):
|
||||||
QtWidgets.QDockWidget.__init__(self, "Results")
|
QtWidgets.QDockWidget.__init__(self, "Results")
|
||||||
self.setObjectName("Results")
|
self.setObjectName("Results")
|
||||||
self.setFeatures(QtWidgets.QDockWidget.DockWidgetMovable |
|
self.setFeatures(QtWidgets.QDockWidget.DockWidgetMovable |
|
||||||
|
@ -50,6 +50,7 @@ class ResultsDock(QtWidgets.QDockWidget):
|
||||||
root = QtCore.QDir.currentPath()
|
root = QtCore.QDir.currentPath()
|
||||||
|
|
||||||
self.datasets = datasets
|
self.datasets = datasets
|
||||||
|
self.main_window = main_window
|
||||||
|
|
||||||
self.rt_model = QtWidgets.QFileSystemModel()
|
self.rt_model = QtWidgets.QFileSystemModel()
|
||||||
self.rt_model.setFilter(QtCore.QDir.NoDotAndDotDot |
|
self.rt_model.setFilter(QtCore.QDir.NoDotAndDotDot |
|
||||||
|
@ -81,7 +82,7 @@ class ResultsDock(QtWidgets.QDockWidget):
|
||||||
|
|
||||||
def tree_current_changed(self, current, previous):
|
def tree_current_changed(self, current, previous):
|
||||||
path = self.rt_model.filePath(current)
|
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 = QtWidgets.QFileSystemModel()
|
||||||
self.rl_model.setFilter(QtCore.QDir.Files)
|
self.rl_model.setFilter(QtCore.QDir.Files)
|
||||||
self.rl_model.setNameFilters(["*.h5"])
|
self.rl_model.setNameFilters(["*.h5"])
|
||||||
|
|
|
@ -85,7 +85,7 @@ def main():
|
||||||
status_bar = QtWidgets.QStatusBar()
|
status_bar = QtWidgets.QStatusBar()
|
||||||
main_window.setStatusBar(status_bar)
|
main_window.setStatusBar(status_bar)
|
||||||
|
|
||||||
d_results = results.ResultsDock(datasets_sub)
|
d_results = results.ResultsDock(datasets_sub, main_window)
|
||||||
smgr.register(d_results)
|
smgr.register(d_results)
|
||||||
|
|
||||||
d_applets = applets.AppletsDock(main_window, datasets_sub)
|
d_applets = applets.AppletsDock(main_window, datasets_sub)
|
||||||
|
|
Loading…
Reference in New Issue