schrodinger.ui.qt.standard.controllers.map_input_controller module

class schrodinger.ui.qt.standard.controllers.map_input_controller.MapInputController(*, parent: QWidget, source_combo: QComboBox, load_button: QAbstractButton, path_controller: PathBrowseController | None = None, display_widget: PyQt6.QtWidgets.QWidget | None = None, sources: collections.abc.Collection[InputSource] | None = None, default_source: InputSource | None = None)

Bases: QObject

Coordinate density-map input from a path or Maestro project entry.

This controller coordinates map validation and resolution by selecting the active MapSource and deciding when it resolves a MapReference. Path input resolves immediately, while project input becomes a pending candidate and resolves only when Load is clicked. Project candidate changes do not invalidate an already loaded reference. Source changes and reset() clear the committed reference.

Variables:
  • sourceChanged – Emitted with the newly active source whenever the source selection changes.

  • referenceChanged – Emitted with the resolved MapReference (or None) whenever the current reference changes.

sourceChanged

A pyqtSignal emitted by instances of the class.

referenceChanged

A pyqtSignal emitted by instances of the class.

__init__(*, parent: QWidget, source_combo: QComboBox, load_button: QAbstractButton, path_controller: PathBrowseController | None = None, display_widget: PyQt6.QtWidgets.QWidget | None = None, sources: collections.abc.Collection[InputSource] | None = None, default_source: InputSource | None = None) → None
sources() → tuple[InputSource, ...]

Return the configured map input origins in display order.

source() → InputSource

Return the active map input origin.

setSource(source: InputSource) → None

Select an enabled map input origin.

setSourceEnabled(source: InputSource, enabled: bool) → None

Enable or disable a map input origin.

mapReference() → MapReference | None

Return the currently resolved map reference, if any.

clearReference() → None

Clear the resolved reference and its presentation.

This retains the underlying source input (e.g. a browsed path), so the same reference can be re-resolved when the source is next activated. Use this when switching sources. To also discard retained input, use reset().

reset() → None

Restore the full default input state.

Unlike clearReference(), which drops only the resolved reference and its presentation while keeping the active source and its retained input, this reinstates all default state: it clears retained input (e.g. a browsed path) so a stale or rejected selection cannot be re-resolved, restores the default source selection, and clears the resolved reference. Use this for panel reset and hard input-rejection paths.

validationErrorMessage() → str | None

Return the active map origin’s validation error, if any.