stratified_packager.identity

Plugin identity derived at import.

Holds PLUGIN_SLUG, the slug of the plugin title. It lives here — not in __about__ — because deriving it needs QGIS (slugify() calls unaccent()), whereas __about__ must stay stdlib-only so setuptools can read __version__ at build time without QGIS. Importing neither stratified_packager.settings nor params, this module is the package-wide home for the slug and keeps those two free of a circular import.

Module Attributes

PLUGIN_SLUG

Slug of the plugin title; the plugins/<slug> settings scope and the <slug>_* variable/object-name prefix.

Functions

plugin_icon()

Return the plugin icon as a multi-resolution QIcon.

stratified_packager.identity.plugin_icon()[source]

Return the plugin icon as a multi-resolution QIcon.

Adds every PNG under resources/images/png so Qt selects the sharpest bitmap for each requested size instead of rasterizing icon.svg on the fly. The result is cached: the icon is immutable and safe to share across every caller.

Return type:

QIcon

Returns:

the plugin icon carrying all available PNG resolutions.

stratified_packager.identity.PLUGIN_SLUG: Final = 'stratified_packager'

Slug of the plugin title; the plugins/<slug> settings scope and the <slug>_* variable/object-name prefix.