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 an inline panel.

QWidget

QObject

QPaintDevice

Subclasses

QgsProcessingMultipleInputPanelWidget

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

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]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

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]

virtual 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]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

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

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

Parameters:

a0 (Callable[..., None])