Skip to content

Commit

Permalink
Add prevent digitizing geofencing
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jul 4, 2024
1 parent 1fa9ec4 commit 4ae56c6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libqfieldsync/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 4ae56c6

Please sign in to comment.