Class: QgsProcessingMultipleSelectionPanelWidget

A panel widget for selection of multiple options from a fixed list of options.

Note

Not stable API

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProcessingMultipleSelectionPanelWidget

Base classes

QgsPanelWidget

Base class for any widget that can be shown as a inline panel

QWidget

QObject

QPaintDevice

Subclasses

QgsProcessingMultipleInputPanelWidget

A panel widget for selection of multiple inputs from a fixed list of options.

Methods

addOption

Adds a new option to the widget.

buttonBox

Returns the widget's button box.

dragEnterEvent

Value formatter

listView

Returns pointer to the list view

selectedOptions

Returns the ordered list of selected options.

setValueFormatter

Sets a callback function to use when encountering an invalid geometry and

Signals

acceptClicked

Emitted when the accept button is clicked.

selectionChanged

Emitted when the selection changes in the widget.

class qgis.gui.QgsProcessingMultipleSelectionPanelWidget[source]

Bases: QgsPanelWidget

__init__(availableOptions: Iterable[Any] = [], selectedOptions: Iterable[Any] = [], parent: QWidget | None = None)

Constructor for QgsProcessingMultipleSelectionPanelWidget.

The availableOptions list specifies the list of standard known options for the parameter, whilst the selectedOptions list specifies which options should be initially selected.

The selectedOptions list may contain extra options which are not present in availableOptions, in which case they will be also added as existing options within the dialog.

Parameters:
  • availableOptions (Iterable[Any] = [])

  • selectedOptions (Iterable[Any] = [])

  • parent (Optional[QWidget] = None)

signal acceptClicked[source]

Emitted when the accept button is clicked.

addOption(self, value: Any, title: str | None, selected: bool, updateExistingTitle: bool = False)[source]

Adds a new option to the widget.

Parameters:
  • value (Any)

  • title (Optional[str])

  • selected (bool)

  • updateExistingTitle (bool = False)

buttonBox(self) QDialogButtonBox | None[source]

Returns the widget’s button box.

Return type:

Optional[QDialogButtonBox]

dragEnterEvent(self, event: QDragEnterEvent | None)[source]

Value formatter

Parameters:

event (Optional[QDragEnterEvent])

listView(self) QListView | None[source]

Returns pointer to the list view

Return type:

Optional[QListView]

selectedOptions(self) List[Any][source]

Returns the ordered list of selected options.

Return type:

List[Any]

signal selectionChanged[source]

Emitted when the selection changes in the widget.

setValueFormatter(self, a0: Callable[..., None])[source]

Sets a callback function to use when encountering an invalid geometry and

Parameters:

a0 (Callable[..., None])