Hdf5TreeView class¶
-
class
silx.gui.hdf5.Hdf5TreeView(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QTreeViewTreeView which allow to browse HDF5 file structure.
It provides columns width auto-resizing and additional signals.
The default model is a
NexusSortFilterProxyModelsourcing aHdf5TreeModel. TheHdf5TreeModelis reachable usingfindHdf5TreeModel(). The default header isHdf5HeaderView.Context menu is managed by the
setContextMenuPolicy()with the value Qt.CustomContextMenu. This policy must not be changed, otherwise context menus will not work anymore. You can useaddContextMenuCallback()andremoveContextMenuCallback()to add your custum actions according to the selected objects.-
addContextMenuCallback(callback)[source]¶ Register a context menu callback.
The callback will be called when a context menu is requested with the treeview and the list of selected h5py objects in parameters. The callback must return a list of
qt.QActionobject.Callbacks are stored as saferef. The object must store a reference by itself.
-
findHdf5TreeModel()[source]¶ Find the Hdf5TreeModel from the stack of model filters.
Returns: A Hdf5TreeModel, else None Return type: Hdf5TreeModel
-