neurotorchmz.gui.components.treeview#
This module defines the SynapseTreeviee, a class to display detection results and provide an interface to modify them
Classes
|
Implements editabled ttk Treeview entries |
|
A treeview component to display Synapses. |
- class neurotorchmz.gui.components.treeview.EntryPopup(tv: Treeview, callback: Callable[[str, str, str, str], None], rowid: str, column: str, **kw)#
Bases:
EntryImplements editabled ttk Treeview entries
- on_return(event)#
- place_auto()#
- select_all(*val1)#
- class neurotorchmz.gui.components.treeview.SynapseTreeview(master: Widget, session: Session, detection_result: DetectionResult, select_callback: Callable[[ISynapse | None, ISynapseROI | None], None] | None = None, allow_singleframe: bool = False, allow_multiframe: bool = False, **kwargs)#
Bases:
TreeviewA treeview component to display Synapses. Provides GUI components to edit them.
- _btn_remove_cick()#
Triggered when clicking the Remove button
- _btn_stage_click()#
Triggered when clicking the Stage button
- _on_double_click(event)#
Triggered on double clicking and creates a editable field if the clicked field is editable
- _on_entry_changed(rowid: str, column: str, oldval: str, val: str)#
Called after a EntryPopup closes with a changed value. Determines the corresponding ISynapse and modifies it
- _on_right_click(event)#
Triggered on right clicking in the Treeview. Opens a context menu.
- _on_select(event)#
Triggered on selecting a row in the Treeview. Determines the corrosponding ISynapse and passes it back to the callback.
- _update_ISynapseROI(roi: ISynapseROI)#
Updates the values in the treeview for a given ISynapseROI
- clear_synapses(target: Literal['staged', 'non_staged', 'all'])#
- editableFiels = ['CircularSynapseROI.Frame', 'CircularSynapseROI.Center', 'CircularSynapseROI.Radius']#
- get_selected_synapse() tuple[ISynapse | None, ISynapseROI | None]#
Identifies the currently selected rowid and returns the result of get_synapse_by_row_id
- get_synapse_by_row_id(rowid: str) tuple[ISynapse | None, ISynapseROI | None]#
Given a rowid, return the corrosponding ISynapse and ISynapseROI as tuple (ISynapse, ISynapseROI). If provided with a ISynapse row, return (ISynapse, None). If provided with a root node, return (None, None).
- pack(**kwargs)#
Overload the parent pack() method
- select(synapse: ISynapse | None = None, roi: ISynapseROI | None = None)#
Selects an entry based on synapse or roi ID and scrolls to it. As a convenience feature, if both synapse and ROI are given, it will select the synapse if the node is collapsed and the ROI in the other case.
- sync_synapses() None#
Display the given list of ISynapse in the treeview. Updates existing values to keep the scrolling position.