pynaviz.qt.mainwindow#

Functions

get_children_dict(parent)

Helper function to get children as a dictionary

get_pynapple_variables([variables])

scope(variables[, layout_path])

Classes

HelpBox([parent])

MainWindow([variables, layout_path])

NWBReference(nwb_file, key)

Store reference to NWB file object and variable key.

VariableDock(variables, gui)

class pynaviz.qt.mainwindow.HelpBox(parent=None)[source]#

Bases: QFrame

eventFilter(obj, event)[source]#
staticMetaObject = PySide6.QtCore.QMetaObject("HelpBox" inherits "QFrame": )#
class pynaviz.qt.mainwindow.MainWindow(variables=None, layout_path=None)[source]#

Bases: QMainWindow

Parameters:
  • variables (dict | None)

  • layout_path (str | Path | None)

add_dock_widget(variable, key_path, manager_state_dict=None)[source]#

Add a new dock widget to the main window based on the variable or its key path

Parameters:
  • variable (Any)

  • key_path (list[str])

  • manager_state_dict (dict | None)

Return type:

QDockWidget | None

closeEvent(event)[source]#

Handle the close event to ensure proper cleanup.

Parameters:

event (QEvent)

open_file()[source]#
staticMetaObject = PySide6.QtCore.QMetaObject("MainWindow" inherits "QMainWindow": )#
class pynaviz.qt.mainwindow.NWBReference(nwb_file, key)[source]#

Bases: object

Store reference to NWB file object and variable key.

Keeps the NWB file (and its IO handle) alive to prevent HDF5 datasets from being closed during garbage collection.

Parameters:
key: str#
nwb_file: NWBFile#
class pynaviz.qt.mainwindow.VariableDock(variables, gui)[source]#

Bases: QDockWidget

add_dock_widget(item)[source]#
Parameters:

item (QTreeWidgetItem | list[str])

Return type:

QDockWidget | None

on_item_double_clicked(item, column)[source]#

Handle double-click only for leaf items

staticMetaObject = PySide6.QtCore.QMetaObject("VariableDock" inherits "QDockWidget": )#
toggle()[source]#

Collapse or expand the dock content.

pynaviz.qt.mainwindow.get_children_dict(parent)[source]#

Helper function to get children as a dictionary

Parameters:

parent (QTreeWidget | QTreeWidgetItem)

pynaviz.qt.mainwindow.get_pynapple_variables(variables=None)[source]#
Parameters:

variables (dict | list | tuple | str | None)

Return type:

dict

pynaviz.qt.mainwindow.scope(variables, layout_path=None)[source]#
Parameters: