scratch_29.py

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

Download (280 Bytes)

 
1
"""
2
Define new functions using @qgsfunction. feature and parent must always be the
3
last args. Use args=-1 to pass a list of values as arguments
4
"""
5

    
6
from qgis.core import *
7
from qgis.gui import *
8

    
9
@qgsfunction(group='Custom')
10
def func(value1, feature, parent):
11
    return value1
12