-
Notifications
You must be signed in to change notification settings - Fork 0
/
applicationmodule.py
39 lines (32 loc) · 1.2 KB
/
applicationmodule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
from veriso.modules.applicationmodule_base import ApplicationModuleBase
class ApplicationModule(ApplicationModuleBase):
"""
This is the minimum required implementation to have your own module
"""
def __init__(self, veriso):
super(ApplicationModule, self).__init__(veriso)
"""
def do_load_defects(self):
# example of how to add your own defect layers or fields
defects_module = 'veriso.modules.loaddefects_base'
defects_module = dynamic_import(defects_module)
d = defects_module.LoadDefectsBase(self.iface, self.module_name)
d.layers['point']['fields'] = {
'ogc_fid': {'widget': 'TextEdit'},
'topic': {
'widget': 'Enumeration',
'alias': 'Topic:',
'default': 'my default value'
},
'bemerkung': {
'widget': 'TextEdit',
'alias': 'Bemekung:',
'config': {"IsMultiline": True},
'writable_only_by': ['PG_role_1', 'PG_role_3']
},
'datum': {'widget': 'Hidden'}
}
return d.run()
"""