Skip to content

Instantly share code, notes, and snippets.

@m-kuhn
Created February 6, 2019 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-kuhn/babc69f9ab18af4ffaeba7b0eb702569 to your computer and use it in GitHub Desktop.
Save m-kuhn/babc69f9ab18af4ffaeba7b0eb702569 to your computer and use it in GitHub Desktop.
class MyCheck(QgsAbstractValidityCheck):
def id(self):
return 'x'
def checkType(self):
return 1001
def name(self):
return "My Provider"
def runCheck(self, context, feedback):
return []
reg = QgsApplication.instance().validityCheckRegistry()
reg.addCheck(MyCheck())
print(reg.checks(1001)[0].name())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment