main_panel
freecad.datamanager_wb.ui.main_panel
¶
Main Qt panel for the DataManager workbench.
Loads the .ui file, finds widgets, wires signals, and delegates operations to
PanelController.
MainPanel(*, gui_port=None, app_port=None, settings_port=None)
¶
Main Qt panel for the DataManager workbench.
Responsibilities:
- Load the Qt Designer
.uifile. - Find and configure required widgets.
- Connect UI signals to handler methods.
- Delegate domain operations to
PanelController.
This class is the primary bridge between FreeCAD GUI events and the workbench controller/data layers.
Source code in freecad/datamanager_wb/ui/main_panel.py
form = self._load_ui()
instance-attribute
¶
accept()
¶
Close the panel (Qt dialog accept semantics).
When hosted inside FreeCAD's MDI, closes the subwindow; otherwise closes the top-level form.
Source code in freecad/datamanager_wb/ui/main_panel.py
eventFilter(watched, event)
¶
Intercept focus events on list widgets to update copy-button state.
Source code in freecad/datamanager_wb/ui/main_panel.py
reject()
¶
Close the panel (Qt dialog reject semantics).
Source code in freecad/datamanager_wb/ui/main_panel.py
show(*, tab_index=None)
¶
Show the panel, optionally selecting a tab.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tab_index
|
int | None
|
When provided, selects the corresponding tab index before showing the panel. |
None
|
Source code in freecad/datamanager_wb/ui/main_panel.py
get_main_panel()
cached
¶
Return a cached singleton instance of the workbench main panel.
The workbench registers FreeCAD commands that open the panel. Using a cached factory ensures command activations reuse the same Qt widget instance instead of creating multiple panels.