gws.plugin.qfieldcloud.patcher

Source code: gws.plugin.qfieldcloud.patcher

Module Contents

class gws.plugin.qfieldcloud.patcher.Args(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

baseDir: str
caps: gws.plugin.qfieldcloud.caps.Caps
changes: list[Change]
fileContent: bytes
filePath: str
project: gws.Project
qfcProject: gws.plugin.qfieldcloud.core.QfcProject
user: gws.User
class gws.plugin.qfieldcloud.patcher.Change(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

layerUid: str
newAtts: dict
oldAtts: dict
type: ChangeType
uid: str
wkt: str
class gws.plugin.qfieldcloud.patcher.ChangeType(*args, **kwds)

Bases: gws.Enum

Enumeration type.

Despite being declared as extending Enum (for IDE support), this class is actually just a simple object and intended to be used as a collection of attributes. It doesn’t provide any Enum-specific utilities.

The rationale behind this is that we need Enum members (e.g. Color.RED) to be scalars, and not complex objects as in the standard Enum.

create = 'create'
delete = 'delete'
patch = 'patch'
class gws.plugin.qfieldcloud.patcher.Object
args: Args
caps: gws.plugin.qfieldcloud.caps.Caps
ops_by_model: dict[str, list[Operation]]
project: gws.Project
qfcProject: gws.plugin.qfieldcloud.core.QfcProject
root: gws.Root
user: gws.User
apply_changes(root: gws.Root, args: Args)
apply_upload(root: gws.Root, args: Args)
commit_operations_for_model(me: gws.plugin.qfieldcloud.caps.ModelEntry, ops: list[Operation])
commit_upload(path: str, content: bytes)
commit_upload_for_model(me: gws.plugin.qfieldcloud.caps.ModelEntry, path: str, content: bytes) bool
find_uid_for_path(me: gws.plugin.qfieldcloud.caps.ModelEntry, ff: gws.plugin.model_field.file.Object, path: str, mc: gws.ModelContext) str | None
get_feature(me: gws.plugin.qfieldcloud.caps.ModelEntry, pk: str) gws.Feature | None
prepare(args: Args)
prepare_change(cc: Change)
class gws.plugin.qfieldcloud.patcher.Operation(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

feature: gws.Feature
type: gws.ModelOperation