scratch_28.py

scratch.py under .qgis2\\python\\expressions for 2.8.2 - Saber Razmjooei, 2015-05-29 09:00 AM

Download (451 Bytes)

 
1
"""
2
Template function file. Define new functions using @qgsfunction.
3
When using args="auto" you may define a new variable for each value for the function.
4
feature and parent must always be the last args.
5
To pass a any number of args into a function use args=-1 the first
6
variable will then be a list of values.
7
"""
8

    
9
from qgis.core import *
10
from qgis.gui import *
11

    
12
@qgsfunction(args="auto", group='Custom')
13
def func(value1, feature, parent):
14
    pass
15