GroupDialog
¶
This module provides a dialog widget to select a HDF5 group in a tree.
-
class
silx.gui.dialog.GroupDialog.
GroupDialog
(parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
This
QDialog
uses asilx.gui.hdf5.Hdf5TreeView
to provide a HDF5 group selection dialog.The information identifying the selected node is provided as a
silx.io.url.DataUrl
.Example:
dialog = GroupDialog() dialog.addFile(filepath1) dialog.addFile(filepath2) if dialog.exec_(): print("File path: %s" % dialog.getSelectedDataUrl().file_path()) print("HDF5 group path : %s " % dialog.getSelectedDataUrl().data_path()) else: print("Operation cancelled :(")
-
addFile
(path)[source]¶ Add a HDF5 file to the tree. All groups it contains will be selectable in the dialog.
Parameters: path (str) – File path
-
addGroup
(group)[source]¶ Add a HDF5 group to the tree. This group and all its subgroups will be selectable in the dialog.
Parameters: group (h5py.Group) – HDF5 group
-
getSelectedDataUrl
()[source]¶ Return a
DataUrl
with a file path and a data path. Return None if the dialog was cancelled.Returns: silx.io.url.DataUrl
object pointing to the selected group.
-