Class: QgsOfflineEditing¶
Handles logic relating to synchronizing online and offline copies of layer data.
Class Hierarchy¶
Base classes¶
- 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[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal progressModeSet[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal progressStarted[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal progressStopped[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal progressUpdated[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- synchronize(self, useTransaction: bool = False)[source]¶
Synchronize to remote layers
- Parameters:
useTransaction (bool = False) – enforce the remote layer modifications with the same source to be in a transaction group
- signal warning[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.