Class: QgsSublayersDialog¶
Presents a choice of sublayers.
Deprecated since version 3.40: Will be removed in QGIS 4.0.
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsSublayersDialog[source]¶
Bases:
QDialog- __init__(providerType: QgsSublayersDialog.ProviderType, name: str | None, parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags(), dataSourceUri: str | None = '')
Construct a new QgsSublayersDialog object - a dialog to select which sub layers to be imported from a data source (e.g. from geopackage or zipfile)
- Parameters:
providerType (QgsSublayersDialog.ProviderType) – provider type
name (Optional[str]) – provider type name
parent (Optional[QWidget] = None) – parent widget of the dialog
fl (Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()) – window flags
dataSourceUri (Optional[str] = '') – data source URI
Deprecated since version 3.40: Will be removed in QGIS 4.0.
- Gdal = 1¶
- class LayerDefinition¶
Bases:
objectA structure that defines layers for the purpose of this dialog
- count: int¶
- description: str¶
- layerId: int¶
- layerName: str¶
- type: str¶
- Mdal = 3¶
- Ogr = 0¶
- PromptAlways = 0¶
- PromptIfNeeded = 1¶
- PromptLoadAll = 3¶
- class PromptMode¶
Bases:
int
- PromptNever = 2¶
- class ProviderType¶
Bases:
int
- Vsifile = 2¶
- populateLayerTable(self, list: Iterable[QgsSublayersDialog.LayerDefinition])[source]¶
Populate the table with layers
- Parameters:
list (Iterable[QgsSublayersDialog.LayerDefinition])
- selection(self) List[QgsSublayersDialog.LayerDefinition][source]¶
Returns list of selected layers
- Return type: