From 4ae56c62f922f131695937d074ae0cf6f36595bb Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Thu, 4 Jul 2024 14:08:12 +0700 Subject: [PATCH] Add prevent digitizing geofencing --- libqfieldsync/project.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libqfieldsync/project.py b/libqfieldsync/project.py index e702bd0..8af25b5 100644 --- a/libqfieldsync/project.py +++ b/libqfieldsync/project.py @@ -21,6 +21,7 @@ def __init__(self): GEOFENCING_ACTIVE = "/geofencingActive" GEOFENCING_LAYER = "/geofencingLayer" GEOFENCING_BEHAVIOR = "/geofencingBehavior" + GEOFENCING_PREVENT_DIGITIZING = "/geofencingPreventDigitizing" class BaseMapType(object): def __init__(self): @@ -144,6 +145,19 @@ def geofencing_behavior(self, value): "qfieldsync", ProjectProperties.GEOFENCING_BEHAVIOR, value ) + @property + def geofencing_prevent_digitizing(self): + geofencing_prevent_digitizing, _ = self.project.readBoolEntry( + "qfieldsync", ProjectProperties.GEOFENCING_PREVENT_DIGITIZING, False + ) + return geofencing_active + + @geofencing_prevent_digitizing.setter + def geofencing_prevent_digitizing(self, value): + self.project.writeEntry( + "qfieldsync", ProjectProperties.GEOFENCING_PREVENT_DIGITIZING, value + ) + @property def geofencing_active(self): geofencing_active, _ = self.project.readBoolEntry(