Class: QgsProviderSourceWidget

Base class for widgets which allow customization of a provider’s source URI.

Added in version 3.18.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: setSourceUri(), sourceUri()

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProviderSourceWidget

Base classes

QWidget

QObject

QPaintDevice

class qgis.gui.QgsProviderSourceWidget[source]

Bases: QWidget

__init__(parent: QWidget | None = None)

Constructor for QgsProviderSourceWidget with the specified parent widget.

Parameters:

parent (Optional[QWidget] = None)

signal changed[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.

virtual groupTitle(self) str[source]

Returns an optional group title for the source settings, for use in layer properties dialogs.

If not specified, a default title will be used.

Added in version 3.36.

Return type:

str

virtual mapCanvas(self) QgsMapCanvas | None[source]

Returns the map canvas associated with the widget.

Added in version 3.26.

Return type:

Optional[QgsMapCanvas]

virtual setMapCanvas(self, mapCanvas: QgsMapCanvas | None)[source]

Sets a map canvas associated with the widget.

Added in version 3.26.

Parameters:

mapCanvas (Optional[QgsMapCanvas])

abstract setSourceUri(self, uri: str | None)[source]

Sets the source uri to show in the widget.

See also

sourceUri()

Parameters:

uri (Optional[str])

abstract sourceUri(self) str[source]

Returns the source URI as currently defined by the widget.

See also

setSourceUri()

Return type:

str

signal validChanged[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.