stratified_packager.gui.wdg_layer_options_page

Per-layer properties page editing the §4 layer variables (SPEC §4/§19).

Classes

LayerOptionsPageWidget(layer[, canvas, parent])

Layer Properties page editing one layer's stratified_packager_* variables.

LayerOptionsPageWidgetFactory()

Factory registering LayerOptionsPageWidget in the Layer Properties dialog.

class stratified_packager.gui.wdg_layer_options_page.LayerOptionsPageWidget(layer, canvas=None, parent=None)[source]

Layer Properties page editing one layer’s stratified_packager_* variables.

Parameters:
  • layer (QgsMapLayer)

  • canvas (QgsMapCanvas | None)

  • parent (QWidget | None)

__init__(layer, canvas=None, parent=None)[source]

Build the page and load layer’s variables.

Parameters:
  • layer (QgsMapLayer) – The layer being configured.

  • canvas (QgsMapCanvas | None) – The map canvas (unused; kept for the framework signature).

  • parent (QWidget | None) – The host widget supplied by the Layer Properties dialog.

_load()[source]

Populate the editors from the explicit layer variables (unset = builtin default).

Return type:

None

apply()[source]

Write the explicit layer variables, clearing inherited fields.

Contained at this QGIS-invoked boundary: a failed write is reported, not raised.

Return type:

None

form_host: qgis.PyQt.QtWidgets.QWidget
lbl_header: qgis.PyQt.QtWidgets.QLabel
verticalLayout: qgis.PyQt.QtWidgets.QVBoxLayout
class stratified_packager.gui.wdg_layer_options_page.LayerOptionsPageWidgetFactory[source]

Factory registering LayerOptionsPageWidget in the Layer Properties dialog.

__init__()[source]

Initialize the factory: titled, plugin-iconed, properties-dialog only.

createWidget(layer, canvas, dockWidget=True, parent=None)[source]

Create the per-layer variables page.

Parameters:
  • layer (QgsMapLayer | None) – The layer being configured (the framework only calls this when supportsLayer() returned True, so it is never None).

  • canvas (QgsMapCanvas | None) – The map canvas (unused by the page).

  • dockWidget (bool) – Whether hosted in a dock (unused; framework signature).

  • parent (QWidget | None) – The dialog-supplied parent widget.

Return type:

LayerOptionsPageWidget

Returns:

The page.

Raises:

ValueError – If called without a layer (a framework-contract violation).

supportLayerPropertiesDialog()[source]

Flag if widget is supported for use in layer properties dialog.

Return type:

bool

Returns:

True

supportsLayer(layer)[source]

Report whether layer gets the page (vector layers only — §4 is vector-scoped).

Parameters:

layer (QgsMapLayer | None) – The candidate layer.

Return type:

bool

Returns:

True for vector layers.