gws.plugin.qfieldcloud.core¶
QField project configuration and object.
Source code: gws.plugin.qfieldcloud.core
Module Contents¶
- gws.plugin.qfieldcloud.core.db_field_name(name: str) str¶
Model field name for a GeoPackage column name, the reverse of
gp_field_name.
- exception gws.plugin.qfieldcloud.core.DeltaApplyError¶
Bases:
gws.ErrorRaised when a delta payload cannot be applied.
- class gws.plugin.qfieldcloud.core.DeltaStatus(*args, **kwargs)¶
Bases:
gws.DataStatus of a delta, as returned to QField.
- content: gws.plugin.qfieldcloud.api.Delta¶
Delta as sent by QField.
- status: gws.plugin.qfieldcloud.api.DeltaStatusType¶
Delta status.
- gws.plugin.qfieldcloud.core.gp_field_name(name: str) str¶
GeoPackage column name for a model field name.
fidis renamed tofid_gws, because GDAL uses it internally.
- class gws.plugin.qfieldcloud.core.ProjectConfig(*args, **kwargs)¶
Bases:
gws.ConfigWithAccessProject offered to QField, packaged from a QGIS project.
- mapCacheLifeTime: gws.Duration = '0'¶
How long rendered offline base maps are reused.
- models: list[gws.ext.config.model] | None¶
Data models for editable layers, matched by table name.
- provider: gws.plugin.qgis.provider.Config¶
QGIS project the QField package is built from.
- syncFiles: list[SyncFileConfig] | None¶
File fields whose content is sent to QField. (added in 8.5)
- thumbnail: gws.FilePath | None¶
Thumbnail image shown in the project details. (added in 8.5)
- class gws.plugin.qfieldcloud.core.QfcProject¶
Bases:
gws.NodeProject offered to QField.
Holds the QGIS provider of the source project, the models for editable layers and the base map settings used when the project is packaged.
- models: list[gws.DatabaseModel]¶
Configured models for editable layers.
- qgisProvider: gws.plugin.qgis.provider.Object¶
QGIS provider for the source project.
- configure()¶
Configuration hook.
Called when the node is initialized. Raising an exception here aborts the creation of the node.
- configure_sync_file(cfg: SyncFileConfig) SyncFile¶
Find the file field for a
syncFilesentry.The columns are checked in the field config, because file fields set their column names in
post_configure.- Parameters:
cfg –
syncFilesentry.- Returns:
The file field and the blob flag.
- Raises:
gws.ConfigurationError – If the name does not match exactly one file field in the project models, the field has no
contentColumn, or has nonameColumnanduseBlobis not set.
- class gws.plugin.qfieldcloud.core.SyncFile(*args, **kwargs)¶
Bases:
gws.DataFile field whose content is sent to QField.
- field: gws.plugin.model_field.file.Object¶
File field.