Class: QgsSublayersDialog¶
Deprecated since version 3.40: Will be removed in QGIS 4.0.
Class Hierarchy¶
Base classes¶
Methods
If we should add layers in a group |
|
Returns column with count or -1 |
|
Populate the table with layers |
|
Returns list of selected layers |
|
Set if we should display the add to group checkbox |
|
If we should display the add to group checkbox |
Attributes
- 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:
object
A structure that defines layers for the purpose of this dialog
- count¶
Number of features (might be unused)
- description¶
Description.
Added in version 3.10.
- layerId¶
Identifier of the layer (one unique layer id may have multiple types though)
- layerName¶
Name of the layer (not necessarily unique)
- type¶
Extra type depending on the use (e.g. geometry type for vector sublayers)
- 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: