main_panel_presenter
freecad.datamanager_wb.ui.main_panel_presenter
¶
Presenter for MainPanel.
The presenter owns UI-facing orchestration and formatting decisions while keeping
Qt widgets in MainPanel as a thin view layer.
ActiveDocumentChangePlan(clear_varsets_selection, clear_spreadsheets_selection, repopulate_varsets, repopulate_spreadsheets, clear_varset_variable_names, clear_varset_expressions, clear_alias_names, clear_alias_expressions)
dataclass
¶
Presenter-defined orchestration plan for an active document change.
clear_alias_expressions
instance-attribute
¶
clear_alias_names
instance-attribute
¶
clear_spreadsheets_selection
instance-attribute
¶
clear_varset_expressions
instance-attribute
¶
clear_varset_variable_names
instance-attribute
¶
clear_varsets_selection
instance-attribute
¶
repopulate_spreadsheets
instance-attribute
¶
repopulate_varsets
instance-attribute
¶
ChildListState(items, selected_keys)
dataclass
¶
DisplayItem(key, display)
dataclass
¶
ExpressionListState(items)
dataclass
¶
Render-state for an expressions list widget.
items
instance-attribute
¶
MainPanelPresenter(controller)
¶
Presenter for MainPanel interactions and formatting.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
format_expression_item(expression_item, *, use_label)
¶
Format an ExpressionItem-like object for display.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
format_object_name(object_name, *, use_label)
¶
Format an object name for UI display, optionally using object labels.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
format_parent_child_ref(ref, *, use_label)
¶
Format a ParentChildRef-like object for display.
The presenter treats ref as a duck-typed object with parent, child,
and text attributes.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_active_document_change_plan()
¶
Return an orchestration plan for when the active document changes.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_alias_expressions_state(selected_alias_items, *, use_label)
¶
Return render state for the alias expressions list.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_aliases_state(*, selected_spreadsheets, alias_filter_text, only_unused, use_label, selected_refs)
¶
Return render state for the aliases list.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_show_plan(*, mdi_available, has_existing_subwindow)
¶
Return a plan for showing the panel given the available UI host.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_spreadsheets_state(*, filter_text, exclude_copy_on_change, use_label, selected_keys)
¶
Return render state for the Spreadsheets parent list.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_varset_expressions_state(selected_varset_variable_items, *, use_label)
¶
Return render state for the VarSet expressions list.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_varset_variables_state(*, selected_varsets, variable_filter_text, only_unused, use_label, selected_refs)
¶
Return render state for the VarSet variables list.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
get_varsets_state(*, filter_text, exclude_copy_on_change, use_label, selected_keys)
¶
Return render state for the VarSets parent list.
Source code in freecad/datamanager_wb/ui/main_panel_presenter.py
should_enable_copy_button(*, list_has_focus, selected_count)
¶
Return whether a copy button for a list should be enabled.
should_enable_remove_unused(*, only_unused, selected_count)
¶
Return whether the remove-unused action should be enabled.