Class: QgsSvgSelectorWidget

A widget allowing selection of an SVG file, and configuration of SVG related parameters.

QgsSvgSelectorWidget

QgsSvgSelectorWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsSvgSelectorWidget

Base classes

QWidget

QObject

QPaintDevice

class qgis.gui.QgsSvgSelectorWidget[source]

Bases: QWidget

__init__(parent: QWidget | None = None)

Constructor for QgsSvgSelectorWidget

Parameters:

parent (Optional[QWidget] = None)

allowParamerters(self) bool[source]

Returns if the group box to fill parameters is visible

Added in version 3.18.

Deprecated since version 3.40: Use allowParameters().

Return type:

bool

allowParameters(self) bool[source]

Returns if the group box to fill parameters is visible

Added in version 3.38.

Return type:

bool

browserVisible(self) bool[source]

Returns if the SVG browser should be visible

Added in version 3.20.

Return type:

bool

currentSvgPath(self) str[source]
Return type:

str

initParametersModel(self, generator: QgsExpressionContextGenerator | None, layer: QgsVectorLayer | None = None)[source]

Initialize the parameters model so the context and the layer are referenced.

Added in version 3.18.

Parameters:
populateList(self)[source]
propertyOverrideToolButton(self) QgsPropertyOverrideButton | None[source]

Returns the property override tool button of the file line edit

Added in version 3.20.

Return type:

Optional[QgsPropertyOverrideButton]

setAllowParameters(self, allow: bool)[source]

Defines if the group box to fill parameters is visible

Added in version 3.18.

Parameters:

allow (bool)

setBrowserVisible(self, visible: bool)[source]

Defines if the SVG browser should be visible

Added in version 3.20.

Parameters:

visible (bool)

setSvgParameters(self, parameters: Dict[str | None, QgsProperty])[source]

Sets the dynamic parameters

Added in version 3.18.

Parameters:

parameters (Dict[Optional[str], QgsProperty])

setSvgPath(self, svgPath: str | None)[source]

Accepts absolute paths

Parameters:

svgPath (Optional[str])

sourceLineEdit(self) QgsPictureSourceLineEditBase | None[source]

Returns the source line edit

Added in version 3.16.

Return type:

Optional[QgsPictureSourceLineEditBase]

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

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