Class: QgsOfflineEditing¶
- class qgis.core.QgsOfflineEditing¶
Bases:
PyQt5.QtCore.QObject
Methods
Convert current project for offline editing
Returns
True
if current project is offlineSynchronize 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 [signal]
Emitted with the progress of the current mode
Emitted when a warning needs to be displayed.
Attributes
- 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¶
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- convertToOfflineProject(self, offlineDataPath: str, offlineDbFile: str, layerIds: Iterable[str], onlySelected: bool = False, containerType: QgsOfflineEditing.ContainerType = QgsOfflineEditing.SpatiaLite, layerNameSuffix: str = '') → bool¶
Convert current project for offline editing
- Parameters
offlineDataPath (str) – Path to offline db file
offlineDbFile (str) – Offline db file name
layerIds (Iterable[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 (str = '') – Suffix string added to the offline layer name
- Return type
bool
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- isOfflineProject(self) → bool¶
Returns
True
if current project is offline- Return type
bool
- isSignalConnected(self, QMetaMethod) → bool¶
- layerProgressUpdated¶
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
layer
to the total amountnumLayers
. [signal]- Parameters
layer (int) –
numLayers (int) –
- progressModeSet¶
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]
- progressStarted¶
Emitted when the process has started. [signal]
- progressStopped¶
Emitted when the processing of all layers has finished [signal]
- progressUpdated¶
Emitted with the progress of the current mode
- Parameters
progress (int) – current index of processed entities [signal]
- receivers(self, PYQT_SIGNAL) → int¶
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- synchronize(self)¶
Synchronize to remote layers
- timerEvent(self, QTimerEvent)¶
- warning¶
Emitted when a warning needs to be displayed.
- Parameters
title (str) – title string for message
message (str) – A descriptive message for the warning [signal]