schrodinger.application.models.gui.components.breadcrumbs module

Breadcrumb navigation widget for Model Hub.

Shows: Definitions > DefName > Config1 > Config2 > … Each item is clickable to navigate back to that level.

class schrodinger.application.models.gui.components.breadcrumbs.Breadcrumbs(*args, variant: enum.StrEnum | None = None, **kwargs)

Bases: BaseWidget

Horizontal breadcrumb navigation showing definition and config hierarchy.

Shows: Definitions > DefName > Config1 > Config2 > … Each item is clickable to navigate back to that level.

Only the “Definitions” button is static. All other breadcrumbs (definition name, config path) are dynamically created based on current state.

Signal definitionsClicked:

Emitted when “Definitions” button is clicked.

Signal configClicked:

Emitted when a config breadcrumb is clicked, with the clicked ModelConfiguration (or None if definition name was clicked).

definitionsClicked

A pyqtSignal emitted by instances of the class.

configClicked

A pyqtSignal emitted by instances of the class.

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

initFinalize()

Suggested subclass use: perform any remaining initialization.

setCurrentDefName(name: str | None) None

Set the current definition name.

Parameters:

name – Definition name string, or None to clear the definition button.

setConfigPath(path: list[ModelConfiguration] | None) None

Set the configuration hierarchy path.

Parameters:

path – List of configs from root to currently selected, e.g. [parent_config, child_config, grandchild_config], or None