Class: QgsOfflineEditing¶
Handles logic relating to synchronizing online and offline copies of layer data.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Classes
Methods
Convert current project for offline editing |
|
Returns |
|
Synchronize to remote layers |
Signals
Emitted whenever a new layer is being processed. |
|
Emitted when the mode for the progress of the current operation is set. |
|
Emitted when the process has started. |
|
Emitted when the processing of all layers has finished |
|
Emitted with the progress of the current mode |
|
Emitted when a warning needs to be displayed. |
Attributes
- class qgis.core.QgsOfflineEditing[source]¶
Bases:
QObject- AddFeatures = 3¶
- AddFields = 2¶
- class ContainerType¶
Bases:
int
- CopyFeatures = 0¶
- GPKG = 1¶
- ProcessFeatures = 1¶
- class ProgressMode¶
Bases:
int
- RemoveFeatures = 4¶
- SpatiaLite = 0¶
- UpdateFeatures = 5¶
- UpdateGeometries = 6¶
- convertToOfflineProject(self, offlineDataPath: str | None, offlineDbFile: str | None, layerIds: Iterable[str | None], onlySelected: bool = False, containerType: QgsOfflineEditing.ContainerType = QgsOfflineEditing.SpatiaLite, layerNameSuffix: str | None = '') bool[source]¶
Convert current project for offline editing
- Parameters:
offlineDataPath (Optional[str]) – Path to offline db file
offlineDbFile (Optional[str]) – Offline db file name
layerIds (Iterable[Optional[str]]) – List of layer names to convert
onlySelected (bool = False) – Only copy selected features from layers where a selection is present
containerType (QgsOfflineEditing.ContainerType = QgsOfflineEditing.SpatiaLite) – defines the SQLite file container type like SpatiaLite or GPKG
layerNameSuffix (Optional[str] = '') – Suffix string added to the offline layer name
- Return type:
bool
- signal layerProgressUpdated(layer: int, numLayers: int)[source]¶
Emitted whenever a new layer is being processed. It is possible to estimate the progress of the complete operation by comparing the index of the current
layerto the total amountnumLayers.- Parameters:
layer (int)
numLayers (int)
- signal progressModeSet(mode: QgsOfflineEditing.ProgressMode, maximum: int)[source]¶
Emitted when the mode for the progress of the current operation is set.
- Parameters:
mode (QgsOfflineEditing.ProgressMode) – progress mode
maximum (int) – total number of entities to process in the current operation
- signal progressUpdated(progress: int)[source]¶
Emitted with the progress of the current mode
- Parameters:
progress (int) – current index of processed entities