QGIS API Documentation  2.12.0-Lyon
qgsexpression_texts.cpp
Go to the documentation of this file.
1 #include "qgsexpression.h"
2 
4 
6 {
7  if( !gFunctionHelpTexts.isEmpty() )
8  return;
9 
10  gFunctionHelpTexts.insert( "$area",
11  Help( "$area", tr( "function" ), tr( "Returns the area of the current feature." ),
13  << HelpVariant( tr( "$area" ), tr( "Returns the area of the current feature." ),
15  /* variableLenArguments */ false,
17  << HelpExample( tr( "$area" ), tr( "42" ), tr( "") )
18  )
19  )
20  );
21 
22  gFunctionHelpTexts.insert( "$atlasfeature",
23  Help( "$atlasfeature", tr( "function" ), tr( "In atlas generation, returns the current feature that is iterated over on the coverage layer. This can be used with the 'attribute' function to return attribute values from the current atlas feature." ),
25  << HelpVariant( tr( "$atlasfeature" ), tr( "In atlas generation, returns the current feature that is iterated over on the coverage layer. This can be used with the 'attribute' function to return attribute values from the current atlas feature." ),
27  /* variableLenArguments */ false,
29  << HelpExample( tr( "attribute( $atlasfeature, 'name' )" ), tr( "value stored in 'name' attribute for the current atlas feature" ), tr( "") )
30  )
31  )
32  );
33 
34  gFunctionHelpTexts.insert( "$atlasfeatureid",
35  Help( "$atlasfeatureid", tr( "function" ), tr( "Returns the feature id of the current row while using atlas. This enables you to use features of atlas in rules and for example show or hide features based on their id." ),
37  << HelpVariant( tr( "$atlasfeatureid" ), tr( "Returns the feature id of the current row while using atlas. This enables you to use features of atlas in rules and for example show or hide features based on their id." ),
39  /* variableLenArguments */ false,
41  << HelpExample( tr( "$atlasfeatureid = $id" ), tr( "true" ), tr( "") )
42  )
43  )
44  );
45 
46  gFunctionHelpTexts.insert( "$atlasgeometry",
47  Help( "$atlasgeometry", tr( "function" ), tr( "Returns the geometry of the current feature iterated in atlas. Can be used for rule based display of geometry when using atlas. For example to only show geometries of other layers when their geometry intersects the iterated geometry of features using atlas." ),
49  << HelpVariant( tr( "$atlasgeometry" ), tr( "Returns the geometry of the current feature iterated in atlas. Can be used for rule based display of geometry when using atlas. For example to only show geometries of other layers when their geometry intersects the iterated geometry of features using atlas." ),
51  /* variableLenArguments */ false,
53  << HelpExample( tr( "intersects( $atlasgeometry, $geometry )" ), tr( "true" ), tr( "") )
54  )
55  )
56  );
57 
58  gFunctionHelpTexts.insert( "$currentfeature",
59  Help( "$currentfeature", tr( "function" ), tr( "Returns the current feature being evaluated. This can be used with the 'attribute' function to evaluate attribute values from the current feature." ),
61  << HelpVariant( tr( "$currentfeature" ), tr( "Returns the current feature being evaluated. This can be used with the 'attribute' function to evaluate attribute values from the current feature." ),
63  /* variableLenArguments */ false,
65  << HelpExample( tr( "attribute( $currentfeature, 'name' )" ), tr( "value stored in 'name' attribute for the current feature" ), tr( "") )
66  )
67  )
68  );
69 
70  gFunctionHelpTexts.insert( "$feature",
71  Help( "$feature", tr( "function" ), tr( "In atlas generation, returns the current feature number that is iterated over on the coverage layer." ),
73  << HelpVariant( tr( "$feature" ), tr( "In atlas generation, returns the current feature number that is iterated over on the coverage layer." ),
75  /* variableLenArguments */ false,
77  << HelpExample( tr( "$feature" ), tr( "2" ), tr( "") )
78  )
79  )
80  );
81 
82  gFunctionHelpTexts.insert( "$geometry",
83  Help( "$geometry", tr( "function" ), tr( "Returns the geometry of the current feature. Can be used for processing with other functions." ),
85  << HelpVariant( tr( "$geometry" ), tr( "Returns the geometry of the current feature. Can be used for processing with other functions." ),
87  /* variableLenArguments */ false,
89  << HelpExample( tr( "geomToWKT( $geometry )" ), tr( "POINT(6 50)" ), tr( "") )
90  )
91  )
92  );
93 
94  gFunctionHelpTexts.insert( "$id",
95  Help( "$id", tr( "function" ), tr( "Returns the feature id of the current row." ),
97  << HelpVariant( tr( "$id" ), tr( "Returns the feature id of the current row." ),
99  /* variableLenArguments */ false,
101  << HelpExample( tr( "$id" ), tr( "42" ), tr( "") )
102  )
103  )
104  );
105 
106  gFunctionHelpTexts.insert( "$length",
107  Help( "$length", tr( "function" ), tr( "Returns the length of a linestring. If you need the length of a border of a polygon, use $perimeter instead." ),
109  << HelpVariant( tr( "$length" ), tr( "Returns the length of a linestring. If you need the length of a border of a polygon, use $perimeter instead." ),
110  QList<HelpArg>(),
111  /* variableLenArguments */ false,
113  << HelpExample( tr( "$length" ), tr( "42.4711" ), tr( "") )
114  )
115  )
116  );
117 
118  gFunctionHelpTexts.insert( "$map",
119  Help( "$map", tr( "function" ), tr( "Returns the id of the current map item if the map is being drawn in a composition, or \"canvas\" if the map is being drawn within the main QGIS window." ),
121  << HelpVariant( tr( "$map" ), tr( "Returns the id of the current map item if the map is being drawn in a composition, or \"canvas\" if the map is being drawn within the main QGIS window." ),
122  QList<HelpArg>(),
123  /* variableLenArguments */ false,
125  << HelpExample( tr( "$map" ), tr( "\"overview_map\"" ), tr( "") )
126  << HelpExample( tr( "$map" ), tr( "\"canvas\"" ), tr( "") )
127  )
128  )
129  );
130 
131  gFunctionHelpTexts.insert( "$numfeatures",
132  Help( "$numfeatures", tr( "function" ), tr( "In atlas generation, returns the total number of features within the coverage layer." ),
134  << HelpVariant( tr( "$numfeatures" ), tr( "In atlas generation, returns the total number of features within the coverage layer." ),
135  QList<HelpArg>(),
136  /* variableLenArguments */ false,
138  << HelpExample( tr( "$numfeatures" ), tr( "42" ), tr( "") )
139  )
140  )
141  );
142 
143  gFunctionHelpTexts.insert( "$numpages",
144  Help( "$numpages", tr( "function" ), tr( "Returns the total number of pages in the composition." ),
146  << HelpVariant( tr( "$numpages" ), tr( "Returns the total number of pages in the composition." ),
147  QList<HelpArg>(),
148  /* variableLenArguments */ false,
150  << HelpExample( tr( "$numpages" ), tr( "42" ), tr( "") )
151  )
152  )
153  );
154 
155  gFunctionHelpTexts.insert( "$page",
156  Help( "$page", tr( "function" ), tr( "Returns the current page number within a composition." ),
158  << HelpVariant( tr( "$page" ), tr( "Returns the current page number within a composition." ),
159  QList<HelpArg>(),
160  /* variableLenArguments */ false,
162  << HelpExample( tr( "$page" ), tr( "2" ), tr( "") )
163  )
164  )
165  );
166 
167  gFunctionHelpTexts.insert( "$perimeter",
168  Help( "$perimeter", tr( "function" ), tr( "Returns the perimeter length of the current feature." ),
170  << HelpVariant( tr( "$perimeter" ), tr( "Returns the perimeter length of the current feature." ),
171  QList<HelpArg>(),
172  /* variableLenArguments */ false,
174  << HelpExample( tr( "$perimeter" ), tr( "42" ), tr( "") )
175  )
176  )
177  );
178 
179  gFunctionHelpTexts.insert( "$rownum",
180  Help( "$rownum", tr( "function" ), tr( "Returns the number of the current row." ),
182  << HelpVariant( tr( "$rownum" ), tr( "Returns the number of the current row." ),
183  QList<HelpArg>(),
184  /* variableLenArguments */ false,
186  << HelpExample( tr( "$rownum" ), tr( "4711" ), tr( "") )
187  )
188  )
189  );
190 
191  gFunctionHelpTexts.insert( "$scale",
192  Help( "$scale", tr( "function" ), tr( "Returns the current scale of the map canvas.\n\nNote: This function is only available in some contexts and will be 0 otherwise." ),
194  << HelpVariant( tr( "$scale" ), tr( "Returns the current scale of the map canvas.\n\nNote: This function is only available in some contexts and will be 0 otherwise." ),
195  QList<HelpArg>(),
196  /* variableLenArguments */ false,
198  << HelpExample( tr( "$scale" ), tr( "10000" ), tr( "") )
199  )
200  )
201  );
202 
203  gFunctionHelpTexts.insert( "$x",
204  Help( "$x", tr( "function" ), tr( "Returns the x coordinate of the current feature." ),
206  << HelpVariant( tr( "$x" ), tr( "Returns the x coordinate of the current feature." ),
207  QList<HelpArg>(),
208  /* variableLenArguments */ false,
210  << HelpExample( tr( "$x" ), tr( "42" ), tr( "") )
211  )
212  )
213  );
214 
215  gFunctionHelpTexts.insert( "$x_at",
216  Help( "$x_at", tr( "function" ), tr( "Retrieves a x coordinate of the current feature's geometry." ),
218  << HelpVariant( tr( "$x_at" ), tr( "Retrieves a x coordinate of the current feature's geometry." ),
220  << HelpArg( tr( "i" ), tr( "index of point of a line (indices start at 0; negative values apply from the last index)" ), false, false ),
221  /* variableLenArguments */ false,
223  << HelpExample( tr( "$x_at(1)" ), tr( "5" ), tr( "") )
224  )
225  )
226  );
227 
228  gFunctionHelpTexts.insert( "$y",
229  Help( "$y", tr( "function" ), tr( "Returns the y coordinate of the current feature." ),
231  << HelpVariant( tr( "$y" ), tr( "Returns the y coordinate of the current feature." ),
232  QList<HelpArg>(),
233  /* variableLenArguments */ false,
235  << HelpExample( tr( "$y" ), tr( "42" ), tr( "") )
236  )
237  )
238  );
239 
240  gFunctionHelpTexts.insert( "$y_at",
241  Help( "$y_at", tr( "function" ), tr( "Retrieves a y coordinate of the current feature's geometry." ),
243  << HelpVariant( tr( "$y_at" ), tr( "Retrieves a y coordinate of the current feature's geometry." ),
245  << HelpArg( tr( "i" ), tr( "index of point of a line (indices start at 0; negative values apply from the last index)" ), false, false ),
246  /* variableLenArguments */ false,
248  << HelpExample( tr( "$y_at(1)" ), tr( "2" ), tr( "") )
249  )
250  )
251  );
252 
253  gFunctionHelpTexts.insert( "AND",
254  Help( "AND", tr( "operator" ), tr( "Returns 1 when condition a and b are true." ),
256  << HelpVariant( tr( "AND" ), tr( "Returns 1 when condition a and b are true." ),
258  << HelpArg( tr( "a" ), tr( "condition" ), false, false )
259  << HelpArg( tr( "b" ), tr( "condition" ), false, false ),
260  /* variableLenArguments */ false,
262  << HelpExample( tr( "TRUE AND TRUE" ), tr( "1" ), tr( "") )
263  << HelpExample( tr( "TRUE AND FALSE" ), tr( "0" ), tr( "") )
264  << HelpExample( tr( "4 = 2+2 AND 1 = 1" ), tr( "1" ), tr( "") )
265  << HelpExample( tr( "4 = 2+2 AND 1 = 2" ), tr( "0" ), tr( "") )
266  )
267  )
268  );
269 
270  gFunctionHelpTexts.insert( "CASE",
271  Help( "CASE", tr( "expression" ), tr( "<pre>\nCASE\nWHEN <i>condition</i> THEN <i>result</i>\n[ ...n ]\n[ ELSE <i>result</i> ]\nEND\n</pre>\n[ ] marks optional components\n\n<h4>Arguments</h4>\n <i> WHEN condition</i> - The condition expression to evaluate. <br>\n<i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br>\n<i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br>\n\n<h4>Example</h4>\n<pre>\nCASE\nWHEN <i>\"column\" IS NULL</i> THEN <i>'None'</i>\n END\n</pre>\n" ),
273  << HelpVariant( tr( "CASE" ), tr( "<pre>\nCASE\nWHEN <i>condition</i> THEN <i>result</i>\n[ ...n ]\n[ ELSE <i>result</i> ]\nEND\n</pre>\n[ ] marks optional components\n\n<h4>Arguments</h4>\n <i> WHEN condition</i> - The condition expression to evaluate. <br>\n<i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br>\n<i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br>\n\n<h4>Example</h4>\n<pre>\nCASE\nWHEN <i>\"column\" IS NULL</i> THEN <i>'None'</i>\n END\n</pre>\n" ),
274  QList<HelpArg>(),
275  /* variableLenArguments */ false,
277  )
278  )
279  );
280 
281  gFunctionHelpTexts.insert( "Color",
282  Help( "Color", tr( "group" ), tr( "This group contains functions for manipulating colors" ),
284  << HelpVariant( tr( "Color" ), tr( "This group contains functions for manipulating colors" ),
285  QList<HelpArg>(),
286  /* variableLenArguments */ false,
288  )
289  )
290  );
291 
292  gFunctionHelpTexts.insert( "Conditionals",
293  Help( "Conditionals", tr( "group" ), tr( "This group contains functions to handle conditional checks in expressions." ),
295  << HelpVariant( tr( "Conditionals" ), tr( "This group contains functions to handle conditional checks in expressions." ),
296  QList<HelpArg>(),
297  /* variableLenArguments */ false,
299  )
300  )
301  );
302 
303  gFunctionHelpTexts.insert( "Conditions",
304  Help( "Conditions", tr( "group" ), tr( "This group contains functions that operate on condition." ),
306  << HelpVariant( tr( "Conditions" ), tr( "This group contains functions that operate on condition." ),
307  QList<HelpArg>(),
308  /* variableLenArguments */ false,
310  )
311  )
312  );
313 
314  gFunctionHelpTexts.insert( "Conversions",
315  Help( "Conversions", tr( "group" ), tr( "This group contains functions to convert on data type to another e.g string to integer, integer to string." ),
317  << HelpVariant( tr( "Conversions" ), tr( "This group contains functions to convert on data type to another e.g string to integer, integer to string." ),
318  QList<HelpArg>(),
319  /* variableLenArguments */ false,
321  )
322  )
323  );
324 
325  gFunctionHelpTexts.insert( "Custom",
326  Help( "Custom", tr( "group" ), tr( "This group contains custom user-created Python functions." ),
328  << HelpVariant( tr( "Custom" ), tr( "This group contains custom user-created Python functions." ),
329  QList<HelpArg>(),
330  /* variableLenArguments */ false,
332  )
333  )
334  );
335 
336  gFunctionHelpTexts.insert( "Date and Time",
337  Help( "Date and Time", tr( "group" ), tr( "This group contains functions for handling date and time data." ),
339  << HelpVariant( tr( "Date and Time" ), tr( "This group contains functions for handling date and time data." ),
340  QList<HelpArg>(),
341  /* variableLenArguments */ false,
343  )
344  )
345  );
346 
347  gFunctionHelpTexts.insert( "Field",
348  Help( "Field", tr( "group" ), tr( "Double click to add field name to expression string.\nRight-Click on field name to open context menu sample value loading options." ),
350  << HelpVariant( tr( "Field" ), tr( "Double click to add field name to expression string.\nRight-Click on field name to open context menu sample value loading options." ),
351  QList<HelpArg>(),
352  /* variableLenArguments */ false,
354  tr( "Loading field values from WFS layers isn't supported, before the layer is actually inserted, ie. when building queries." )
355  )
356  )
357  );
358 
359  gFunctionHelpTexts.insert( "Fields and Values",
360  Help( "Fields and Values", tr( "group" ), tr( "Contains a list of fields from the layer. Sample values can also be accessed via right-click.\nSelect the field name from the list then right-click to access context menu with options to load sample values from the selected field.\n" ),
362  << HelpVariant( tr( "Fields and Values" ), tr( "Contains a list of fields from the layer. Sample values can also be accessed via right-click.\nSelect the field name from the list then right-click to access context menu with options to load sample values from the selected field.\n" ),
363  QList<HelpArg>(),
364  /* variableLenArguments */ false,
366  tr( "Loading field values from WFS layers isn't supported, before the layer is actually inserted, ie. when building queries." )
367  )
368  )
369  );
370 
371  gFunctionHelpTexts.insert( "Fuzzy Matching",
372  Help( "Fuzzy Matching", tr( "group" ), tr( "This group contains functions for fuzzy comparisons between values." ),
374  << HelpVariant( tr( "Fuzzy Matching" ), tr( "This group contains functions for fuzzy comparisons between values." ),
375  QList<HelpArg>(),
376  /* variableLenArguments */ false,
378  )
379  )
380  );
381 
382  gFunctionHelpTexts.insert( "General",
383  Help( "General", tr( "group" ), tr( "This group contains general assorted functions." ),
385  << HelpVariant( tr( "General" ), tr( "This group contains general assorted functions." ),
386  QList<HelpArg>(),
387  /* variableLenArguments */ false,
389  )
390  )
391  );
392 
393  gFunctionHelpTexts.insert( "GeometryGroup",
394  Help( "GeometryGroup", tr( "group" ), tr( "This group contains functions that operate on geometry objects e.g length, area." ),
396  << HelpVariant( tr( "GeometryGroup" ), tr( "This group contains functions that operate on geometry objects e.g length, area." ),
397  QList<HelpArg>(),
398  /* variableLenArguments */ false,
400  )
401  )
402  );
403 
404  gFunctionHelpTexts.insert( "ILIKE",
405  Help( "ILIKE", tr( "operator" ), tr( "Returns 1 if the first parameter matches case-insensitive the supplied pattern. LIKE can be used instead of ILIKE to make the match case-sensitive. Works with numbers also." ),
407  << HelpVariant( tr( "ILIKE" ), tr( "Returns 1 if the first parameter matches case-insensitive the supplied pattern. LIKE can be used instead of ILIKE to make the match case-sensitive. Works with numbers also." ),
409  << HelpArg( tr( "string/number" ), tr( "string to search" ), false, false )
410  << HelpArg( tr( "pattern" ), tr( "pattern to find" ), false, false ),
411  /* variableLenArguments */ false,
413  << HelpExample( tr( "'A' ILIKE 'A'" ), tr( "1" ), tr( "") )
414  << HelpExample( tr( "'A' ILIKE 'a'" ), tr( "1" ), tr( "") )
415  << HelpExample( tr( "'A' ILIKE 'B'" ), tr( "0" ), tr( "") )
416  << HelpExample( tr( "'ABC' ILIKE 'b'" ), tr( "0" ), tr( "") )
417  << HelpExample( tr( "'ABC' ILIKE 'B'" ), tr( "0" ), tr( "") )
418  << HelpExample( tr( "'ABC' ILIKE '%b%'" ), tr( "1" ), tr( "") )
419  << HelpExample( tr( "'ABC' ILIKE '%B%'" ), tr( "1" ), tr( "") )
420  )
421  )
422  );
423 
424  gFunctionHelpTexts.insert( "IN",
425  Help( "IN", tr( "operator" ), tr( "Returns 1 if value is found within a list of values." ),
427  << HelpVariant( tr( "IN" ), tr( "Returns 1 if value is found within a list of values." ),
429  << HelpArg( tr( "a" ), tr( "value" ), false, false )
430  << HelpArg( tr( "b" ), tr( "list of values" ), false, false ),
431  /* variableLenArguments */ false,
433  << HelpExample( tr( "'A' IN ('A','B')" ), tr( "1" ), tr( "") )
434  << HelpExample( tr( "'A' IN ('C','B')" ), tr( "0" ), tr( "") )
435  )
436  )
437  );
438 
439  gFunctionHelpTexts.insert( "IS",
440  Help( "IS", tr( "operator" ), tr( "Returns 1 if a is the same as b." ),
442  << HelpVariant( tr( "IS" ), tr( "Returns 1 if a is the same as b." ),
444  << HelpArg( tr( "a" ), tr( "any value" ), false, false )
445  << HelpArg( tr( "b" ), tr( "any value" ), false, false ),
446  /* variableLenArguments */ false,
448  << HelpExample( tr( "'A' IS 'A'" ), tr( "1" ), tr( "") )
449  << HelpExample( tr( "'A' IS 'a'" ), tr( "0" ), tr( "") )
450  << HelpExample( tr( "4 IS 4" ), tr( "1" ), tr( "") )
451  << HelpExample( tr( "4 IS 2+2" ), tr( "1" ), tr( "") )
452  << HelpExample( tr( "4 IS 2" ), tr( "0" ), tr( "") )
453  << HelpExample( tr( "$geometry IS NULL" ), tr( "0, if your geometry is not NULL" ), tr( "") )
454  )
455  )
456  );
457 
458  gFunctionHelpTexts.insert( "IS NOT",
459  Help( "IS NOT", tr( "operator" ), tr( "Returns 1 if a is not the same as b." ),
461  << HelpVariant( tr( "IS NOT" ), tr( "Returns 1 if a is not the same as b." ),
463  << HelpArg( tr( "a" ), tr( "value" ), false, false )
464  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
465  /* variableLenArguments */ false,
467  << HelpExample( tr( "'a' IS NOT 'b'" ), tr( "1" ), tr( "") )
468  << HelpExample( tr( "'a' IS NOT 'a'" ), tr( "0" ), tr( "") )
469  << HelpExample( tr( "4 IS NOT 2+2" ), tr( "0" ), tr( "") )
470  )
471  )
472  );
473 
474  gFunctionHelpTexts.insert( "LIKE",
475  Help( "LIKE", tr( "operator" ), tr( "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also." ),
477  << HelpVariant( tr( "LIKE" ), tr( "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also." ),
479  << HelpArg( tr( "string/number" ), tr( "value" ), false, false )
480  << HelpArg( tr( "pattern" ), tr( "pattern to compare value with" ), false, false ),
481  /* variableLenArguments */ false,
483  << HelpExample( tr( "'A' LIKE 'A'" ), tr( "1" ), tr( "") )
484  << HelpExample( tr( "'A' LIKE 'a'" ), tr( "0" ), tr( "") )
485  << HelpExample( tr( "'A' LIKE 'B'" ), tr( "0" ), tr( "") )
486  << HelpExample( tr( "'ABC' LIKE 'B'" ), tr( "0" ), tr( "") )
487  << HelpExample( tr( "'ABC' LIKE '%B%'" ), tr( "1" ), tr( "") )
488  )
489  )
490  );
491 
492  gFunctionHelpTexts.insert( "Math",
493  Help( "Math", tr( "group" ), tr( "This group contains math functions e.g square root, sin and cos" ),
495  << HelpVariant( tr( "Math" ), tr( "This group contains math functions e.g square root, sin and cos" ),
496  QList<HelpArg>(),
497  /* variableLenArguments */ false,
499  )
500  )
501  );
502 
503  gFunctionHelpTexts.insert( "NOT",
504  Help( "NOT", tr( "operator" ), tr( "Negates a condition." ),
506  << HelpVariant( tr( "NOT" ), tr( "Negates a condition." ),
508  << HelpArg( tr( "a" ), tr( "condition" ), false, false ),
509  /* variableLenArguments */ false,
511  << HelpExample( tr( "NOT 1" ), tr( "0" ), tr( "") )
512  << HelpExample( tr( "NOT 0" ), tr( "1" ), tr( "") )
513  )
514  )
515  );
516 
517  gFunctionHelpTexts.insert( "NULL",
518  Help( "NULL", tr( "value" ), tr( "Equates to a null value." ),
520  << HelpVariant( tr( "NULL" ), tr( "Equates to a null value." ),
521  QList<HelpArg>(),
522  /* variableLenArguments */ false,
524  << HelpExample( tr( "NULL" ), tr( "a null value" ), tr( "") ),
525  tr( "To test for NULL use an <pre>IS NULL</pre> or <pre>IS NOT NULL</pre> expression." )
526  )
527  )
528  );
529 
530  gFunctionHelpTexts.insert( "OR",
531  Help( "OR", tr( "operator" ), tr( "Returns 1 when condition a or b is true." ),
533  << HelpVariant( tr( "OR" ), tr( "Returns 1 when condition a or b is true." ),
535  << HelpArg( tr( "a" ), tr( "condition" ), false, false )
536  << HelpArg( tr( "b" ), tr( "condition" ), false, false ),
537  /* variableLenArguments */ false,
539  << HelpExample( tr( "4 = 2+2 OR 1 = 1" ), tr( "1" ), tr( "") )
540  << HelpExample( tr( "4 = 2+2 OR 1 = 2" ), tr( "1" ), tr( "") )
541  << HelpExample( tr( "4 = 2 OR 1 = 2" ), tr( "0" ), tr( "") )
542  )
543  )
544  );
545 
546  gFunctionHelpTexts.insert( "Operators",
547  Help( "Operators", tr( "group" ), tr( "This group contains operators e.g + - *" ),
549  << HelpVariant( tr( "Operators" ), tr( "This group contains operators e.g + - *" ),
550  QList<HelpArg>(),
551  /* variableLenArguments */ false,
553  )
554  )
555  );
556 
557  gFunctionHelpTexts.insert( "Recent (Selection)",
558  Help( "Recent (Selection)", tr( "group" ), tr( "This group contains recently used expressions." ),
560  << HelpVariant( tr( "Recent (Selection)" ), tr( "This group contains recently used expressions." ),
561  QList<HelpArg>(),
562  /* variableLenArguments */ false,
564  )
565  )
566  );
567 
568  gFunctionHelpTexts.insert( "Record",
569  Help( "Record", tr( "group" ), tr( "This group contains functions that operate on record identifiers." ),
571  << HelpVariant( tr( "Record" ), tr( "This group contains functions that operate on record identifiers." ),
572  QList<HelpArg>(),
573  /* variableLenArguments */ false,
575  )
576  )
577  );
578 
579  gFunctionHelpTexts.insert( "String",
580  Help( "String", tr( "group" ), tr( "This group contains functions that operate on strings e.g replace, convert to upper case." ),
582  << HelpVariant( tr( "String" ), tr( "This group contains functions that operate on strings e.g replace, convert to upper case." ),
583  QList<HelpArg>(),
584  /* variableLenArguments */ false,
586  )
587  )
588  );
589 
590  gFunctionHelpTexts.insert( "Variables",
591  Help( "Variables", tr( "group" ), tr( "This group contains dynamic variables which can be inserted into your expressions." ),
593  << HelpVariant( tr( "Variables" ), tr( "This group contains dynamic variables which can be inserted into your expressions." ),
594  QList<HelpArg>(),
595  /* variableLenArguments */ false,
597  )
598  )
599  );
600 
601  gFunctionHelpTexts.insert( "abs",
602  Help( "abs", tr( "function" ), tr( "Returns the absolute value of a number." ),
604  << HelpVariant( tr( "abs" ), tr( "Returns the absolute value of a number." ),
606  << HelpArg( tr( "value" ), tr( "a number" ), false, false ),
607  /* variableLenArguments */ false,
609  << HelpExample( tr( "abs(-2)" ), tr( "2" ), tr( "") )
610  )
611  )
612  );
613 
614  gFunctionHelpTexts.insert( "acos",
615  Help( "acos", tr( "function" ), tr( "Returns the inverse cosine of a value in radians." ),
617  << HelpVariant( tr( "acos" ), tr( "Returns the inverse cosine of a value in radians." ),
619  << HelpArg( tr( "value" ), tr( "cosine of an angle in radians" ), false, false ),
620  /* variableLenArguments */ false,
622  << HelpExample( tr( "acos(0.5)" ), tr( "1.0471975511966" ), tr( "") )
623  )
624  )
625  );
626 
627  gFunctionHelpTexts.insert( "age",
628  Help( "age", tr( "function" ), tr( "Returns the difference between two dates or datetimes.\nThe difference is returned as a <code>Interval</code> and needs to be used with one of the following functions in order to extract useful information:<br /><ul><li><code>year</code><li><code>month</code><li><code>week</code><li><code>day</code><li><code>hour</code><li><code>minute</code><li><code>second</code></ul>" ),
630  << HelpVariant( tr( "age" ), tr( "Returns the difference between two dates or datetimes.\nThe difference is returned as a <code>Interval</code> and needs to be used with one of the following functions in order to extract useful information:<br /><ul><li><code>year</code><li><code>month</code><li><code>week</code><li><code>day</code><li><code>hour</code><li><code>minute</code><li><code>second</code></ul>" ),
632  << HelpArg( tr( "datetime1" ), tr( "a string, date or datetime representing the later date" ), false, false )
633  << HelpArg( tr( "datetime2" ), tr( "a string, date or datetime representing the earlier date" ), false, false ),
634  /* variableLenArguments */ false,
636  << HelpExample( tr( "age('2012-05-12','2012-05-2')" ), tr( "interval" ), tr( "use <code>day</code> to extract number of days") )
637  << HelpExample( tr( "day(age('2012-05-12','2012-05-2'))" ), tr( "10" ), tr( "") )
638  )
639  )
640  );
641 
642  gFunctionHelpTexts.insert( "area",
643  Help( "area", tr( "function" ), tr( "Returns the area of a geometry polygon object. Calculations are in the Spatial Reference System of this geometry." ),
645  << HelpVariant( tr( "area" ), tr( "Returns the area of a geometry polygon object. Calculations are in the Spatial Reference System of this geometry." ),
647  << HelpArg( tr( "geometry" ), tr( "polygon geometry object" ), false, false ),
648  /* variableLenArguments */ false,
650  << HelpExample( tr( "area(geom_from_wkt('POLYGON((0 0, 4 0, 4 2, 0 2, 0 0))'))" ), tr( "8.0" ), tr( "") )
651  )
652  )
653  );
654 
655  gFunctionHelpTexts.insert( "asin",
656  Help( "asin", tr( "function" ), tr( "Returns the inverse sine of a value in radians." ),
658  << HelpVariant( tr( "asin" ), tr( "Returns the inverse sine of a value in radians." ),
660  << HelpArg( tr( "value" ), tr( "sine of an angle in radians" ), false, false ),
661  /* variableLenArguments */ false,
663  << HelpExample( tr( "asin(1.0)" ), tr( "1.5707963267949" ), tr( "") )
664  )
665  )
666  );
667 
668  gFunctionHelpTexts.insert( "atan",
669  Help( "atan", tr( "function" ), tr( "Returns the inverse tangent of a value in radians." ),
671  << HelpVariant( tr( "atan" ), tr( "Returns the inverse tangent of a value in radians." ),
673  << HelpArg( tr( "value" ), tr( "tan of an angle in radians" ), false, false ),
674  /* variableLenArguments */ false,
676  << HelpExample( tr( "atan(0.5)" ), tr( "0.463647609000806" ), tr( "") )
677  )
678  )
679  );
680 
681  gFunctionHelpTexts.insert( "atan2",
682  Help( "atan2", tr( "function" ), tr( "Returns the inverse tangent of dy/dx by using the signs of the two arguments to determine the quadrant of the result." ),
684  << HelpVariant( tr( "atan2" ), tr( "Returns the inverse tangent of dy/dx by using the signs of the two arguments to determine the quadrant of the result." ),
686  << HelpArg( tr( "dy" ), tr( "y coordinate difference" ), false, false )
687  << HelpArg( tr( "dx" ), tr( "x coordinate difference" ), false, false ),
688  /* variableLenArguments */ false,
690  << HelpExample( tr( "atan2(1.0, 1.732)" ), tr( "0.523611477769969" ), tr( "") )
691  )
692  )
693  );
694 
695  gFunctionHelpTexts.insert( "attribute",
696  Help( "attribute", tr( "function" ), tr( "Returns the value of a specified attribute from a feature." ),
698  << HelpVariant( tr( "attribute" ), tr( "Returns the value of a specified attribute from a feature." ),
700  << HelpArg( tr( "feature" ), tr( "a feature" ), false, false )
701  << HelpArg( tr( "attribute_name" ), tr( "name of attribute to be returned" ), false, false ),
702  /* variableLenArguments */ false,
704  << HelpExample( tr( "attribute( $currentfeature, 'name' )" ), tr( "value stored in 'name' attribute for the current feature" ), tr( "") )
705  )
706  )
707  );
708 
709  gFunctionHelpTexts.insert( "bounds",
710  Help( "bounds", tr( "function" ), tr( "Returns a geometry which represents the bounding box of an input geometry. Calculations are in the Spatial Reference System of this geometry." ),
712  << HelpVariant( tr( "bounds" ), tr( "Returns a geometry which represents the bounding box of an input geometry. Calculations are in the Spatial Reference System of this geometry." ),
714  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
715  /* variableLenArguments */ false,
717  << HelpExample( tr( "bounds($geometry)" ), tr( "bounding box of $geometry" ), tr( "") )
718  )
719  )
720  );
721 
722  gFunctionHelpTexts.insert( "bounds_height",
723  Help( "bounds_height", tr( "function" ), tr( "Returns the height of the bounding box of a geometry. Calculations are in the Spatial Reference System of this geometry." ),
725  << HelpVariant( tr( "bounds_height" ), tr( "Returns the height of the bounding box of a geometry. Calculations are in the Spatial Reference System of this geometry." ),
727  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
728  /* variableLenArguments */ false,
730  << HelpExample( tr( "bounds_height($geometry)" ), tr( "height of bounding box of $geometry" ), tr( "") )
731  )
732  )
733  );
734 
735  gFunctionHelpTexts.insert( "bounds_width",
736  Help( "bounds_width", tr( "function" ), tr( "Returns the width of the bounding box of a geometry. Calculations are in the Spatial Reference System of this geometry." ),
738  << HelpVariant( tr( "bounds_width" ), tr( "Returns the width of the bounding box of a geometry. Calculations are in the Spatial Reference System of this geometry." ),
740  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
741  /* variableLenArguments */ false,
743  << HelpExample( tr( "bounds_width($geometry)" ), tr( "width of bounding box of $geometry" ), tr( "") )
744  )
745  )
746  );
747 
748  gFunctionHelpTexts.insert( "buffer",
749  Help( "buffer", tr( "function" ), tr( "Returns a geometry that represents all points whose distance from this geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this geometry." ),
751  << HelpVariant( tr( "buffer" ), tr( "Returns a geometry that represents all points whose distance from this geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this geometry." ),
753  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false )
754  << HelpArg( tr( "distance" ), tr( "buffer distance in layer units" ), false, false ),
755  /* variableLenArguments */ false,
757  << HelpExample( tr( "buffer($geometry, 10.5)" ), tr( "polygon of $geometry buffered by 10.5 units" ), tr( "") )
758  )
759  )
760  );
761 
762  gFunctionHelpTexts.insert( "ceil",
763  Help( "ceil", tr( "function" ), tr( "Rounds a number upwards." ),
765  << HelpVariant( tr( "ceil" ), tr( "Rounds a number upwards." ),
767  << HelpArg( tr( "value" ), tr( "a number" ), false, false ),
768  /* variableLenArguments */ false,
770  << HelpExample( tr( "ceil(4.9)" ), tr( "5" ), tr( "") )
771  << HelpExample( tr( "ceil(-4.9)" ), tr( "-4" ), tr( "") )
772  )
773  )
774  );
775 
776  gFunctionHelpTexts.insert( "centroid",
777  Help( "centroid", tr( "function" ), tr( "Returns the geometric center of a geometry." ),
779  << HelpVariant( tr( "centroid" ), tr( "Returns the geometric center of a geometry." ),
781  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
782  /* variableLenArguments */ false,
784  << HelpExample( tr( "centroid($geometry)" ), tr( "a point geometry" ), tr( "") )
785  )
786  )
787  );
788 
789  gFunctionHelpTexts.insert( "clamp",
790  Help( "clamp", tr( "function" ), tr( "Restricts an input value to a specified range." ),
792  << HelpVariant( tr( "clamp" ), tr( "Restricts an input value to a specified range." ),
794  << HelpArg( tr( "minimum" ), tr( "the smallest value <i>input</i> is allowed to take." ), false, false )
795  << HelpArg( tr( "input" ), tr( "a value which will be restricted to the range specified by <i>minimum</i> and <i>maximum</i>" ), false, false )
796  << HelpArg( tr( "maximum" ), tr( "the largest value <i>input</i> is allowed to take" ), false, false ),
797  /* variableLenArguments */ false,
799  << HelpExample( tr( "clamp(1,5,10)" ), tr( "5" ), tr( "<i>input</i> is between 1 and 10 so is returned unchanged") )
800  << HelpExample( tr( "clamp(1,0,10)" ), tr( "1" ), tr( "<i>input</i> is less than minimum value of 1, so function returns 1") )
801  << HelpExample( tr( "clamp(1,11,10)" ), tr( "10" ), tr( "<i>input</i> is greater than maximum value of 10, so function returns 10") )
802  )
803  )
804  );
805 
806  gFunctionHelpTexts.insert( "coalesce",
807  Help( "coalesce", tr( "function" ), tr( "Returns the first non-NULL value from the expression list.<br>This function can take any number of arguments." ),
809  << HelpVariant( tr( "coalesce" ), tr( "Returns the first non-NULL value from the expression list.<br>This function can take any number of arguments." ),
811  << HelpArg( tr( "expression1" ), tr( "" ), false, true )
812  << HelpArg( tr( "expression2" ), tr( "" ), false, true )
813  << HelpArg( tr( "expression" ), tr( "any valid expression or value, irregardless of type." ), true, false ),
814  /* variableLenArguments */ true,
816  << HelpExample( tr( "coalesce(NULL, 2)" ), tr( "2" ), tr( "") )
817  << HelpExample( tr( "coalesce(NULL, 2, 3)" ), tr( "2" ), tr( "") )
818  << HelpExample( tr( "coalesce(7, NULL, 3*2)" ), tr( "7" ), tr( "") )
819  << HelpExample( tr( "coalesce(\"fieldA\", \"fallbackField\", 'ERROR')" ), tr( "value of fieldA if it is non-NULL else the value of \"fallbackField\" or the string 'ERROR' if both are NULL" ), tr( "") )
820  )
821  )
822  );
823 
824  gFunctionHelpTexts.insert( "color_cmyk",
825  Help( "color_cmyk", tr( "function" ), tr( "Returns a string representation of a color based on its cyan, magenta, yellow and black components" ),
827  << HelpVariant( tr( "color_cmyk" ), tr( "Returns a string representation of a color based on its cyan, magenta, yellow and black components" ),
829  << HelpArg( tr( "cyan" ), tr( "cyan component of the color, as a percentage integer value from 0 to 100" ), false, false )
830  << HelpArg( tr( "magenta" ), tr( "magenta component of the color, as a percentage integer value from 0 to 100" ), false, false )
831  << HelpArg( tr( "yellow" ), tr( "yellow component of the color, as a percentage integer value from 0 to 100" ), false, false )
832  << HelpArg( tr( "black" ), tr( "black component of the color, as a percentage integer value from 0 to 100" ), false, false ),
833  /* variableLenArguments */ false,
835  << HelpExample( tr( "color_cmyk(100,50,0,10)" ), tr( "0,115,230" ), tr( "") )
836  )
837  )
838  );
839 
840  gFunctionHelpTexts.insert( "color_cmyka",
841  Help( "color_cmyka", tr( "function" ), tr( "Returns a string representation of a color based on its cyan, magenta, yellow, black and alpha (transparency) components" ),
843  << HelpVariant( tr( "color_cmyka" ), tr( "Returns a string representation of a color based on its cyan, magenta, yellow, black and alpha (transparency) components" ),
845  << HelpArg( tr( "cyan" ), tr( "cyan component of the color, as a percentage integer value from 0 to 100" ), false, false )
846  << HelpArg( tr( "magenta" ), tr( "magenta component of the color, as a percentage integer value from 0 to 100" ), false, false )
847  << HelpArg( tr( "yellow" ), tr( "yellow component of the color, as a percentage integer value from 0 to 100" ), false, false )
848  << HelpArg( tr( "black" ), tr( "black component of the color, as a percentage integer value from 0 to 100" ), false, false )
849  << HelpArg( tr( "alpha" ), tr( "alpha component as an integer value from 0 (completely transparent) to 255 (opaque)." ), false, false ),
850  /* variableLenArguments */ false,
852  << HelpExample( tr( "color_cmyk(100,50,0,10,200)" ), tr( "0,115,230,200" ), tr( "") )
853  )
854  )
855  );
856 
857  gFunctionHelpTexts.insert( "color_hsl",
858  Help( "color_hsl", tr( "function" ), tr( "Returns a string representation of a color based on its hue, saturation, and lightness attributes." ),
860  << HelpVariant( tr( "color_hsl" ), tr( "Returns a string representation of a color based on its hue, saturation, and lightness attributes." ),
862  << HelpArg( tr( "hue" ), tr( "hue of the color, as an integer value from 0 to 360" ), false, false )
863  << HelpArg( tr( "saturation" ), tr( "saturation percentage of the color as an integer value from 0 to 100" ), false, false )
864  << HelpArg( tr( "lightness" ), tr( "lightness percentage of the color as an integer value from 0 to 100" ), false, false ),
865  /* variableLenArguments */ false,
867  << HelpExample( tr( "color_hsl(100,50,70)" ), tr( "166,217,140" ), tr( "") )
868  )
869  )
870  );
871 
872  gFunctionHelpTexts.insert( "color_hsla",
873  Help( "color_hsla", tr( "function" ), tr( "Returns a string representation of a color based on its hue, saturation, lightness and alpha (transparency) attributes" ),
875  << HelpVariant( tr( "color_hsla" ), tr( "Returns a string representation of a color based on its hue, saturation, lightness and alpha (transparency) attributes" ),
877  << HelpArg( tr( "hue" ), tr( "hue of the color, as an integer value from 0 to 360" ), false, false )
878  << HelpArg( tr( "saturation" ), tr( "saturation percentage of the color as an integer value from 0 to 100" ), false, false )
879  << HelpArg( tr( "lightness" ), tr( "lightness percentage of the color as an integer value from 0 to 100" ), false, false )
880  << HelpArg( tr( "alpha" ), tr( "alpha component as an integer value from 0 (completely transparent) to 255 (opaque)." ), false, false ),
881  /* variableLenArguments */ false,
883  << HelpExample( tr( "color_hsla(100,50,70,200)" ), tr( "166,217,140,200" ), tr( "") )
884  )
885  )
886  );
887 
888  gFunctionHelpTexts.insert( "color_hsv",
889  Help( "color_hsv", tr( "function" ), tr( "Returns a string representation of a color based on its hue, saturation, and value attributes." ),
891  << HelpVariant( tr( "color_hsv" ), tr( "Returns a string representation of a color based on its hue, saturation, and value attributes." ),
893  << HelpArg( tr( "hue" ), tr( "hue of the color, as an integer value from 0 to 360" ), false, false )
894  << HelpArg( tr( "saturation" ), tr( "saturation percentage of the color as an integer value from 0 to 100" ), false, false )
895  << HelpArg( tr( "value" ), tr( "value percentage of the color as an integer from 0 to 100" ), false, false ),
896  /* variableLenArguments */ false,
898  << HelpExample( tr( "color_hsv(40,100,100)" ), tr( "255,170,0" ), tr( "") )
899  )
900  )
901  );
902 
903  gFunctionHelpTexts.insert( "color_hsva",
904  Help( "color_hsva", tr( "function" ), tr( "Returns a string representation of a color based on its hue, saturation, value and alpha (transparency) attributes." ),
906  << HelpVariant( tr( "color_hsva" ), tr( "Returns a string representation of a color based on its hue, saturation, value and alpha (transparency) attributes." ),
908  << HelpArg( tr( "hue" ), tr( "hue of the color, as an integer value from 0 to 360" ), false, false )
909  << HelpArg( tr( "saturation" ), tr( "saturation percentage of the color as an integer value from 0 to 100" ), false, false )
910  << HelpArg( tr( "value" ), tr( "value percentage of the color as an integer from 0 to 100" ), false, false )
911  << HelpArg( tr( "alpha" ), tr( "alpha component as an integer value from 0 (completely transparent) to 255 (opaque)" ), false, false ),
912  /* variableLenArguments */ false,
914  << HelpExample( tr( "color_hsva(40,100,100,200)" ), tr( "255,170,0,200" ), tr( "") )
915  )
916  )
917  );
918 
919  gFunctionHelpTexts.insert( "color_part",
920  Help( "color_part", tr( "function" ), tr( "Returns a specific component from a color string, eg the red component or alpha component." ),
922  << HelpVariant( tr( "color_part" ), tr( "Returns a specific component from a color string, eg the red component or alpha component." ),
924  << HelpArg( tr( "color" ), tr( "a color string" ), false, false )
925  << HelpArg( tr( "component" ), tr( "a string corresponding to the color component to return. Valid options are:<br /><ul><li>red: RGB red component (0-255)</li><li>green: RGB green component (0-255)</li><li>blue: RGB blue component (0-255)</li><li>alpha: alpha (transparency) value (0-255)</li><li>hue: HSV hue (0-360)</li><li>saturation: HSV saturation (0-100)</li><li>value: HSV value (0-100)</li><li>hsl_hue: HSL hue (0-360)</li><li>hsl_saturation: HSL saturation (0-100)</li><li>lightness: HSL lightness (0-100)</li><li>cyan: CMYK cyan component (0-100)</li><li>magenta: CMYK magenta component (0-100)</li><li>yellow: CMYK yellow component (0-100)</li> <li>black: CMYK black component (0-100)</li></ul>" ), false, false ),
926  /* variableLenArguments */ false,
928  << HelpExample( tr( "color_part('200,10,30','green')" ), tr( "10" ), tr( "") )
929  )
930  )
931  );
932 
933  gFunctionHelpTexts.insert( "color_rgb",
934  Help( "color_rgb", tr( "function" ), tr( "Returns a string representation of a color based on its red, green, and blue components." ),
936  << HelpVariant( tr( "color_rgb" ), tr( "Returns a string representation of a color based on its red, green, and blue components." ),
938  << HelpArg( tr( "red" ), tr( "red component as an integer value from 0 to 255" ), false, false )
939  << HelpArg( tr( "green" ), tr( "green component as an integer value from 0 to 255" ), false, false )
940  << HelpArg( tr( "blue" ), tr( "blue component as an integer value from 0 to 255" ), false, false ),
941  /* variableLenArguments */ false,
943  << HelpExample( tr( "color_rgb(255,127,0)" ), tr( "255,127,0" ), tr( "") )
944  )
945  )
946  );
947 
948  gFunctionHelpTexts.insert( "color_rgba",
949  Help( "color_rgba", tr( "function" ), tr( "Returns a string representation of a color based on its red, green, blue, and alpha (transparency) components." ),
951  << HelpVariant( tr( "color_rgba" ), tr( "Returns a string representation of a color based on its red, green, blue, and alpha (transparency) components." ),
953  << HelpArg( tr( "red" ), tr( "red component as an integer value from 0 to 255" ), false, false )
954  << HelpArg( tr( "green" ), tr( "green component as an integer value from 0 to 255" ), false, false )
955  << HelpArg( tr( "blue" ), tr( "blue component as an integer value from 0 to 255" ), false, false )
956  << HelpArg( tr( "alpha" ), tr( "alpha component as an integer value from 0 (completely transparent) to 255 (opaque)." ), false, false ),
957  /* variableLenArguments */ false,
959  << HelpExample( tr( "color_rgba(255,127,0,200)" ), tr( "255,127,0,200" ), tr( "") )
960  )
961  )
962  );
963 
964  gFunctionHelpTexts.insert( "combine",
965  Help( "combine", tr( "function" ), tr( "Returns the combination of two geometries." ),
967  << HelpVariant( tr( "combine" ), tr( "Returns the combination of two geometries." ),
969  << HelpArg( tr( "geometry1" ), tr( "a geometry" ), false, false )
970  << HelpArg( tr( "geometry2" ), tr( "a geometry" ), false, false ),
971  /* variableLenArguments */ false,
973  << HelpExample( tr( "geom_to_wkt( combine( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 2 1)' ) ) )" ), tr( "MULTILINESTRING((4 4, 2 1), (3 3, 4 4), (4 4, 5 5))" ), tr( "") )
974  << HelpExample( tr( "geom_to_wkt( combine( geom_from_wkt( 'LINESTRING(3 3, 4 4)' ), geom_from_wkt( 'LINESTRING(3 3, 6 6, 2 1)' ) ) )" ), tr( "LINESTRING(3 3, 4 4, 6 6, 2 1)" ), tr( "") )
975  )
976  )
977  );
978 
979  gFunctionHelpTexts.insert( "concat",
980  Help( "concat", tr( "function" ), tr( "Concatenates several strings to one. NULL values are converted to empty strings. Other values (like numbers) are converted to strings." ),
982  << HelpVariant( tr( "concat" ), tr( "Concatenates several strings to one. NULL values are converted to empty strings. Other values (like numbers) are converted to strings." ),
984  << HelpArg( tr( "string1" ), tr( "" ), false, true )
985  << HelpArg( tr( "string2" ), tr( "" ), false, true )
986  << HelpArg( tr( "string" ), tr( "a string value" ), true, false ),
987  /* variableLenArguments */ true,
989  << HelpExample( tr( "concat('sun', 'set')" ), tr( "'sunset'" ), tr( "") )
990  << HelpExample( tr( "concat('a','b','c','d','e')" ), tr( "'abcde'" ), tr( "") )
991  << HelpExample( tr( "concat('Anno ', 1984)" ), tr( "'Anno 1984'" ), tr( "") )
992  << HelpExample( tr( "concat('The Wall', NULL)" ), tr( "'The Wall'" ), tr( "") )
993  )
994  )
995  );
996 
997  gFunctionHelpTexts.insert( "contains",
998  Help( "contains", tr( "function" ), tr( "Tests whether a geometry contains another. Returns true if and only if no points of geometry b lie in the exterior of geometry a, and at least one point of the interior of b lies in the interior of a." ),
1000  << HelpVariant( tr( "contains" ), tr( "Tests whether a geometry contains another. Returns true if and only if no points of geometry b lie in the exterior of geometry a, and at least one point of the interior of b lies in the interior of a." ),
1001  QList<HelpArg>()
1002  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
1003  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
1004  /* variableLenArguments */ false,
1006  << HelpExample( tr( "geom_to_wkt( combine( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 2 1)' ) ) )" ), tr( "MULTILINESTRING((4 4, 2 1), (3 3, 4 4), (4 4, 5 5))" ), tr( "") )
1007  << HelpExample( tr( "contains( geom_from_wkt( 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))' ), geom_from_wkt( 'POINT(0.5 0.5 )' ) )" ), tr( "true" ), tr( "") )
1008  << HelpExample( tr( "contains( geom_from_wkt( 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "false" ), tr( "") )
1009  )
1010  )
1011  );
1012 
1013  gFunctionHelpTexts.insert( "convex_hull",
1014  Help( "convex_hull", tr( "function" ), tr( "Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set." ),
1016  << HelpVariant( tr( "convex_hull" ), tr( "Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set." ),
1017  QList<HelpArg>()
1018  << HelpArg( tr( "geometry" ), tr( "a geometry" ), false, false ),
1019  /* variableLenArguments */ false,
1021  << HelpExample( tr( "geom_to_wkt( combine( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 2 1)' ) ) )" ), tr( "MULTILINESTRING((4 4, 2 1), (3 3, 4 4), (4 4, 5 5))" ), tr( "") )
1022  << HelpExample( tr( "geom_to_wkt( convex_hull( geom_from_wkt( 'LINESTRING(3 3, 4 4, 4 10)' ) ) )" ), tr( "POLYGON((3 3,4 10,4 4,3 3))" ), tr( "") )
1023  )
1024  )
1025  );
1026 
1027  gFunctionHelpTexts.insert( "cos",
1028  Help( "cos", tr( "function" ), tr( "Returns cosine of an angle." ),
1030  << HelpVariant( tr( "cos" ), tr( "Returns cosine of an angle." ),
1031  QList<HelpArg>()
1032  << HelpArg( tr( "angle" ), tr( "angle in radians" ), false, false ),
1033  /* variableLenArguments */ false,
1035  << HelpExample( tr( "cos(1.571)" ), tr( "0.000796326710733263" ), tr( "") )
1036  )
1037  )
1038  );
1039 
1040  gFunctionHelpTexts.insert( "crosses",
1041  Help( "crosses", tr( "function" ), tr( "Tests whether a geometry crosses another. Returns true if the supplied geometries have some, but not all, interior points in common." ),
1043  << HelpVariant( tr( "crosses" ), tr( "Tests whether a geometry crosses another. Returns true if the supplied geometries have some, but not all, interior points in common." ),
1044  QList<HelpArg>()
1045  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
1046  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
1047  /* variableLenArguments */ false,
1049  << HelpExample( tr( "crosses( geom_from_wkt( 'LINESTRING(3 5, 4 4, 5 3)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "true" ), tr( "") )
1050  << HelpExample( tr( "crosses( geom_from_wkt( 'POINT(4 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "false" ), tr( "") )
1051  )
1052  )
1053  );
1054 
1055  gFunctionHelpTexts.insert( "day",
1056  Help( "day", tr( "function" ), tr( "Extract the day from a date, or the number of days from an interval." ),
1058  << HelpVariant( tr( "Date variant" ), tr( "Extract the day from a date or datetime." ),
1059  QList<HelpArg>()
1060  << HelpArg( tr( "date" ), tr( "a date or datetime value" ), false, false ),
1061  /* variableLenArguments */ false,
1063  << HelpExample( tr( "day('2012-05-12')" ), tr( "12" ), tr( "") )
1064  )
1065  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in days of an interval." ),
1066  QList<HelpArg>()
1067  << HelpArg( tr( "interval" ), tr( "interval value to return number of days from" ), false, false ),
1068  /* variableLenArguments */ false,
1070  << HelpExample( tr( "day(tointerval('3 days'))" ), tr( "3" ), tr( "") )
1071  << HelpExample( tr( "day(age('2012-01-01','2010-01-01'))" ), tr( "730" ), tr( "") )
1072  )
1073  )
1074  );
1075 
1076  gFunctionHelpTexts.insert( "day_of_week",
1077  Help( "day_of_week", tr( "function" ), tr( "Returns the day of the week for a specified date or datetime. The returned value ranges from 0 to 6, where 0 corresponds to a Sunday and 6 to a Saturday." ),
1079  << HelpVariant( tr( "day_of_week" ), tr( "Returns the day of the week for a specified date or datetime. The returned value ranges from 0 to 6, where 0 corresponds to a Sunday and 6 to a Saturday." ),
1080  QList<HelpArg>()
1081  << HelpArg( tr( "date" ), tr( "date or datetime value" ), false, false ),
1082  /* variableLenArguments */ false,
1084  << HelpExample( tr( "day_of_week(todate('2015-09-21'))" ), tr( "1" ), tr( "") )
1085  )
1086  )
1087  );
1088 
1089  gFunctionHelpTexts.insert( "difference",
1090  Help( "difference", tr( "function" ), tr( "Returns a geometry that represents that part of geometry_a that does not intersect with geometry_b." ),
1092  << HelpVariant( tr( "difference" ), tr( "Returns a geometry that represents that part of geometry_a that does not intersect with geometry_b." ),
1093  QList<HelpArg>()
1094  << HelpArg( tr( "geometry_a" ), tr( "a geometry" ), false, false )
1095  << HelpArg( tr( "geometry_b" ), tr( "a geometry" ), false, false ),
1096  /* variableLenArguments */ false,
1098  << HelpExample( tr( "geom_to_wkt( difference( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4)' ) ) )" ), tr( "LINESTRING(4 4, 5 5)" ), tr( "") )
1099  )
1100  )
1101  );
1102 
1103  gFunctionHelpTexts.insert( "disjoint",
1104  Help( "disjoint", tr( "function" ), tr( "Tests whether geometries do not spatially intersect. Returns true if the geometries do not share any space together." ),
1106  << HelpVariant( tr( "disjoint" ), tr( "Tests whether geometries do not spatially intersect. Returns true if the geometries do not share any space together." ),
1107  QList<HelpArg>()
1108  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
1109  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
1110  /* variableLenArguments */ false,
1112  << HelpExample( tr( "disjoint( geom_from_wkt( 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0 ))' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "true" ), tr( "") )
1113  << HelpExample( tr( "disjoint( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'POINT(4 4)' ))" ), tr( "false" ), tr( "") )
1114  )
1115  )
1116  );
1117 
1118  gFunctionHelpTexts.insert( "distance",
1119  Help( "distance", tr( "function" ), tr( "Returns the minimum distance (based on spatial ref) between two geometries in projected units." ),
1121  << HelpVariant( tr( "distance" ), tr( "Returns the minimum distance (based on spatial ref) between two geometries in projected units." ),
1122  QList<HelpArg>()
1123  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
1124  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
1125  /* variableLenArguments */ false,
1127  << HelpExample( tr( "distance( geom_from_wkt( 'POINT(4 4)' ), geom_from_wkt( 'POINT(4 8)' ) )" ), tr( "4" ), tr( "") )
1128  )
1129  )
1130  );
1131 
1132  gFunctionHelpTexts.insert( "end_point",
1133  Help( "end_point", tr( "function" ), tr( "Returns the last node from a geometry." ),
1135  << HelpVariant( tr( "end_point" ), tr( "Returns the last node from a geometry." ),
1136  QList<HelpArg>()
1137  << HelpArg( tr( "geometry" ), tr( "geometry object" ), false, false ),
1138  /* variableLenArguments */ false,
1140  << HelpExample( tr( "geom_to_wkt(end_point(geom_from_wkt('LINESTRING(4 0, 4 2, 0 2)')))" ), tr( "'Point (0 2)'" ), tr( "") )
1141  )
1142  )
1143  );
1144 
1145  gFunctionHelpTexts.insert( "exp",
1146  Help( "exp", tr( "function" ), tr( "Returns exponential of an value." ),
1148  << HelpVariant( tr( "exp" ), tr( "Returns exponential of an value." ),
1149  QList<HelpArg>()
1150  << HelpArg( tr( "value" ), tr( "number to return exponent of" ), false, false ),
1151  /* variableLenArguments */ false,
1153  << HelpExample( tr( "exp(1.0)" ), tr( "2.71828182845905" ), tr( "") )
1154  )
1155  )
1156  );
1157 
1158  gFunctionHelpTexts.insert( "floor",
1159  Help( "floor", tr( "function" ), tr( "Rounds a number downwards." ),
1161  << HelpVariant( tr( "floor" ), tr( "Rounds a number downwards." ),
1162  QList<HelpArg>()
1163  << HelpArg( tr( "value" ), tr( "a number" ), false, false ),
1164  /* variableLenArguments */ false,
1166  << HelpExample( tr( "floor(4.9)" ), tr( "4" ), tr( "") )
1167  << HelpExample( tr( "floor(-4.9)" ), tr( "-5" ), tr( "") )
1168  )
1169  )
1170  );
1171 
1172  gFunctionHelpTexts.insert( "format",
1173  Help( "format", tr( "function" ), tr( "Format a string using supplied arguments." ),
1175  << HelpVariant( tr( "format" ), tr( "Format a string using supplied arguments." ),
1176  QList<HelpArg>()
1177  << HelpArg( tr( "string" ), tr( "A string with place holders for the arguments. Use %1, %2, etc for placeholders. Placeholders can be repeated." ), false, false )
1178  << HelpArg( tr( "arg1" ), tr( "" ), false, true )
1179  << HelpArg( tr( "arg2" ), tr( "" ), false, true )
1180  << HelpArg( tr( "arg" ), tr( "any type. Any number of arguments." ), true, false ),
1181  /* variableLenArguments */ true,
1183  << HelpExample( tr( "format('This %1 a %2','is', 'test')" ), tr( "'This is a test''" ), tr( "") )
1184  )
1185  )
1186  );
1187 
1188  gFunctionHelpTexts.insert( "format_date",
1189  Help( "format_date", tr( "function" ), tr( "Format a date type or string into a custom string format. Uses Qt date/time format strings. See <a href='http://qt-project.org/doc/qt-4.8/qdatetime.html#toString'>QDateTime::toString</a>." ),
1191  << HelpVariant( tr( "format_date" ), tr( "Format a date type or string into a custom string format. Uses Qt date/time format strings. See <a href='http://qt-project.org/doc/qt-4.8/qdatetime.html#toString'>QDateTime::toString</a>." ),
1192  QList<HelpArg>()
1193  << HelpArg( tr( "datetime" ), tr( "date, time or datetime value" ), false, false )
1194  << HelpArg( tr( "format" ), tr( "String template used to format the string. <table><thead><tr><th>Expression</th><th>Output</th></tr></thead><tr valign=\"top\"><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr><tr valign=\"top\"><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr><tr valign=\"top\"><td>ddd</td><td>the abbreviated localized day name (e.g. 'Mon' to 'Sun')</td></tr><tr valign=\"top\"><td>dddd</td><td>the long localized day name (e.g. 'Monday' to 'Sunday')</td></tr><tr valign=\"top\"><td>M</td><td>the month as number without a leading zero (1-12)</td></tr><tr valign=\"top\"><td>MM</td><td>the month as number with a leading zero (01-12)</td></tr><tr valign=\"top\"><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec')</td></tr><tr valign=\"top\"><td>MMMM</td><td>the long localized month name (e.g. 'January' to 'December')</td></tr><tr valign=\"top\"><td>yy</td><td>the year as two digit number (00-99)</td></tr><tr valign=\"top\"><td>yyyy</td><td>the year as four digit number</td></tr></table><p>These expressions may be used for the time part of the format string:</p><table><thead><tr><th>Expression</th><th>Output</th></tr></thead><tr valign=\"top\"><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr><tr valign=\"top\"><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr><tr valign=\"top\"><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr><tr valign=\"top\"><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr><tr valign=\"top\"><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr><tr valign=\"top\"><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr><tr valign=\"top\"><td>s</td><td>the second without a leading zero (0 to 59)</td></tr><tr valign=\"top\"><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr><tr valign=\"top\"><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr><tr valign=\"top\"><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr><tr valign=\"top\"><td>AP or A</td><td>interpret as an AM/PM time. <i>AP</i> must be either \"AM\" or \"PM\".</td></tr><tr valign=\"top\"><td>ap or a</td><td>Interpret as an AM/PM time. <i>ap</i> must be either \"am\" or \"pm\".</td></tr></table>" ), false, false ),
1195  /* variableLenArguments */ false,
1197  << HelpExample( tr( "format_date('2012-05-15','dd.MM.yyyy')" ), tr( "'15.05.2012'" ), tr( "") )
1198  )
1199  )
1200  );
1201 
1202  gFunctionHelpTexts.insert( "format_number",
1203  Help( "format_number", tr( "function" ), tr( "Returns a number formatted with the locale separator for thousands. Also truncates the number to the number of supplied places." ),
1205  << HelpVariant( tr( "format_number" ), tr( "Returns a number formatted with the locale separator for thousands. Also truncates the number to the number of supplied places." ),
1206  QList<HelpArg>()
1207  << HelpArg( tr( "number" ), tr( "number to be formatted" ), false, false )
1208  << HelpArg( tr( "places" ), tr( "integer representing the number of decimal places to truncate the string to." ), false, false ),
1209  /* variableLenArguments */ false,
1211  << HelpExample( tr( "format_number(10000000.332,2)" ), tr( "'10,000,000.33'" ), tr( "") )
1212  )
1213  )
1214  );
1215 
1216  gFunctionHelpTexts.insert( "geom_from_gml",
1217  Help( "geom_from_gml", tr( "function" ), tr( "Returns a geometry from a GML representation of geometry." ),
1219  << HelpVariant( tr( "geom_from_gml" ), tr( "Returns a geometry from a GML representation of geometry." ),
1220  QList<HelpArg>()
1221  << HelpArg( tr( "gml" ), tr( "GML representation of a geometry as a string" ), false, false ),
1222  /* variableLenArguments */ false,
1224  << HelpExample( tr( "geom_from_gml( '<gml:LineString srsName=\"EPSG:4326\"><gml:coordinates>4,4 5,5 6,6</gml:coordinates></gml:LineString>')" ), tr( "a geometry object" ), tr( "") )
1225  )
1226  )
1227  );
1228 
1229  gFunctionHelpTexts.insert( "geom_from_wkt",
1230  Help( "geom_from_wkt", tr( "function" ), tr( "Returns a geometry created from a Well-Known Text (WKT) representation." ),
1232  << HelpVariant( tr( "geom_from_wkt" ), tr( "Returns a geometry created from a Well-Known Text (WKT) representation." ),
1233  QList<HelpArg>()
1234  << HelpArg( tr( "text" ), tr( "Well-Known Text (WKT) representation of a geometry" ), false, false ),
1235  /* variableLenArguments */ false,
1237  << HelpExample( tr( "geom_from_wkt( 'POINT(4 5)' )" ), tr( "a geometry object" ), tr( "") )
1238  )
1239  )
1240  );
1241 
1242  gFunctionHelpTexts.insert( "geom_to_wkt",
1243  Help( "geom_to_wkt", tr( "function" ), tr( "Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata." ),
1245  << HelpVariant( tr( "geom_to_wkt" ), tr( "Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata." ),
1246  QList<HelpArg>()
1247  << HelpArg( tr( "geometry" ), tr( "a geometry" ), false, false ),
1248  /* variableLenArguments */ false,
1250  << HelpExample( tr( "geom_to_wkt( $geometry )" ), tr( "POINT(6 50)" ), tr( "") )
1251  )
1252  )
1253  );
1254 
1255  gFunctionHelpTexts.insert( "geometry",
1256  Help( "geometry", tr( "function" ), tr( "Returns a feature's geometry." ),
1258  << HelpVariant( tr( "geometry" ), tr( "Returns a feature's geometry." ),
1259  QList<HelpArg>()
1260  << HelpArg( tr( "feature" ), tr( "a feature object" ), false, false ),
1261  /* variableLenArguments */ false,
1263  << HelpExample( tr( "geom_to_wkt( geometry( get_feature( layer, attributeField, value ) ) )" ), tr( "'POINT(6 50)'" ), tr( "") )
1264  << HelpExample( tr( "intersects( $geometry, geometry( get_feature( layer, attributeField, value ) ) )" ), tr( "true" ), tr( "") )
1265  )
1266  )
1267  );
1268 
1269  gFunctionHelpTexts.insert( "get_feature",
1270  Help( "get_feature", tr( "function" ), tr( "Returns the first feature of a layer matching a given attribute value." ),
1272  << HelpVariant( tr( "get_feature" ), tr( "Returns the first feature of a layer matching a given attribute value." ),
1273  QList<HelpArg>()
1274  << HelpArg( tr( "layer" ), tr( "layer name or ID" ), false, false )
1275  << HelpArg( tr( "attribute" ), tr( "attribute name" ), false, false )
1276  << HelpArg( tr( "value" ), tr( "attribute value to match" ), false, false ),
1277  /* variableLenArguments */ false,
1279  << HelpExample( tr( "get_feature('streets','name','main st')" ), tr( "first feature found in \"streets\" layer with \"main st\" value in the \"name\" field" ), tr( "") )
1280  )
1281  )
1282  );
1283 
1284  gFunctionHelpTexts.insert( "hamming_distance",
1285  Help( "hamming_distance", tr( "function" ), tr( "Returns the Hamming distance between two strings. This equates to the number of characters at corresponding positions within the input strings where the characters are different. The input strings must be the same length, and the comparison is case-sensitive." ),
1287  << HelpVariant( tr( "hamming_distance" ), tr( "Returns the Hamming distance between two strings. This equates to the number of characters at corresponding positions within the input strings where the characters are different. The input strings must be the same length, and the comparison is case-sensitive." ),
1288  QList<HelpArg>()
1289  << HelpArg( tr( "string1" ), tr( "a string" ), false, false )
1290  << HelpArg( tr( "string2" ), tr( "a string" ), false, false ),
1291  /* variableLenArguments */ false,
1293  << HelpExample( tr( "hamming_distance('abc','xec')" ), tr( "2" ), tr( "") )
1294  << HelpExample( tr( "hamming_distance('abc','ABc')" ), tr( "2" ), tr( "") )
1295  << HelpExample( tr( "hamming_distance(upper('abc'),upper('ABC'))" ), tr( "0" ), tr( "") )
1296  )
1297  )
1298  );
1299 
1300  gFunctionHelpTexts.insert( "hour",
1301  Help( "hour", tr( "function" ), tr( "Extract the hour part from a datetime or time, or the number of hours from an interval." ),
1303  << HelpVariant( tr( "Time variant" ), tr( "Extract the hour part from a time or datetime." ),
1304  QList<HelpArg>()
1305  << HelpArg( tr( "datetime" ), tr( "a time or datetime value" ), false, false ),
1306  /* variableLenArguments */ false,
1308  << HelpExample( tr( "hour('2012-07-22T13:24:57')" ), tr( "13" ), tr( "") )
1309  )
1310  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in hours of an interval." ),
1311  QList<HelpArg>()
1312  << HelpArg( tr( "interval" ), tr( "interval value to return number of hours from" ), false, false ),
1313  /* variableLenArguments */ false,
1315  << HelpExample( tr( "hour(tointerval('3 hours'))" ), tr( "3" ), tr( "") )
1316  << HelpExample( tr( "hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00'))" ), tr( "3" ), tr( "") )
1317  << HelpExample( tr( "hour(age('2012-01-01','2010-01-01'))" ), tr( "17520" ), tr( "") )
1318  )
1319  )
1320  );
1321 
1322  gFunctionHelpTexts.insert( "if",
1323  Help( "if", tr( "function" ), tr( "Tests a condition and returns a different result depending on the conditional check." ),
1325  << HelpVariant( tr( "if" ), tr( "Tests a condition and returns a different result depending on the conditional check." ),
1326  QList<HelpArg>()
1327  << HelpArg( tr( "condition" ), tr( "the condition which should be checked" ), false, false )
1328  << HelpArg( tr( "result_when_true" ), tr( "the result which will be returned when the condition is True" ), false, false )
1329  << HelpArg( tr( "result_when_false" ), tr( "the result which will be returned when the condition is False" ), false, false ),
1330  /* variableLenArguments */ false,
1332  << HelpExample( tr( "if( 1, 'One', 'Not One' )" ), tr( "'One'" ), tr( "") )
1333  << HelpExample( tr( "if( 8, 'One', 'Not One' )" ), tr( "'Not One'" ), tr( "") )
1334  )
1335  )
1336  );
1337 
1338  gFunctionHelpTexts.insert( "intersection",
1339  Help( "intersection", tr( "function" ), tr( "Returns a geometry that represents the shared portion of two geometries." ),
1341  << HelpVariant( tr( "intersection" ), tr( "Returns a geometry that represents the shared portion of two geometries." ),
1342  QList<HelpArg>()
1343  << HelpArg( tr( "geometry1" ), tr( "a geometry" ), false, false )
1344  << HelpArg( tr( "geometry2" ), tr( "a geometry" ), false, false ),
1345  /* variableLenArguments */ false,
1347  << HelpExample( tr( "geom_to_wkt( intersection( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4)' ) ) )" ), tr( "LINESTRING(3 3, 4 4)" ), tr( "") )
1348  )
1349  )
1350  );
1351 
1352  gFunctionHelpTexts.insert( "intersects",
1353  Help( "intersects", tr( "function" ), tr( "Tests whether a geometry intersects another. Returns true if the geometries spatially intersect (share any portion of space) and false if they do not." ),
1355  << HelpVariant( tr( "intersects" ), tr( "Tests whether a geometry intersects another. Returns true if the geometries spatially intersect (share any portion of space) and false if they do not." ),
1356  QList<HelpArg>()
1357  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
1358  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
1359  /* variableLenArguments */ false,
1361  << HelpExample( tr( "intersects( geom_from_wkt( 'POINT(4 4)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "true" ), tr( "") )
1362  << HelpExample( tr( "intersects( geom_from_wkt( 'POINT(4 5)' ), geom_from_wkt( 'POINT(5 5)' ) )" ), tr( "false" ), tr( "") )
1363  )
1364  )
1365  );
1366 
1367  gFunctionHelpTexts.insert( "intersects_bbox",
1368  Help( "intersects_bbox", tr( "function" ), tr( "Tests whether a geometry's bounding box overlaps another geometry's bounding box. Returns true if the geometries spatially intersect the bounding box defined and false if they do not." ),
1370  << HelpVariant( tr( "intersects_bbox" ), tr( "Tests whether a geometry's bounding box overlaps another geometry's bounding box. Returns true if the geometries spatially intersect the bounding box defined and false if they do not." ),
1371  QList<HelpArg>()
1372  << HelpArg( tr( "geometry" ), tr( "a geometry" ), false, false )
1373  << HelpArg( tr( "geometry" ), tr( "a geometry" ), false, false ),
1374  /* variableLenArguments */ false,
1376  << HelpExample( tr( "intersects_bbox( geom_from_wkt( 'POINT(4 5)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "true" ), tr( "") )
1377  << HelpExample( tr( "intersects_bbox( geom_from_wkt( 'POINT(6 5)' ), geom_from_wkt( 'POLYGON((3 3, 4 4, 5 5, 3 3))' ) )" ), tr( "false" ), tr( "") )
1378  )
1379  )
1380  );
1381 
1382  gFunctionHelpTexts.insert( "layer_property",
1383  Help( "layer_property", tr( "function" ), tr( "Returns a matching layer property or metadata value." ),
1385  << HelpVariant( tr( "layer_property" ), tr( "Returns a matching layer property or metadata value." ),
1386  QList<HelpArg>()
1387  << HelpArg( tr( "layer" ), tr( "a string, representing either a layer name or layer ID" ), false, false )
1388  << HelpArg( tr( "property" ), tr( "a string corresponding to the property to return. Valid options are:<br /><ul><li>name: layer name</li><li>id: layer ID</li><li>title: metadata title string</li><li>abstract: metadata abstract string</li><li>keywords: metadata keywords</li><li>data_url: metadata URL</li><li>attribution: metadata attribution string</li><li>attribution_url: metadata attribution URL</li><li>source: layer source</li><li>min_scale: minimum display scale for layer</li><li>max_scale: maximum display scale for layer</li><li>crs: layer CRS</li><li>crs_definition: layer CRS full definition</li> <li>extent: layer extent (as a geometry object)</li><li>type: layer type, eg Vector or Raster</li><li>storage_type: storage format (vector layers only)</li><li>geometry_type: geometry type, eg Point (vector layers only)</li><li>feature_count: approximate feature count for layer (vector layers only)</li></ul>" ), false, false ),
1389  /* variableLenArguments */ false,
1391  << HelpExample( tr( "layer_property('streets','title')" ), tr( "'Basemap Streets'" ), tr( "") )
1392  << HelpExample( tr( "layer_property('airports','feature_count')" ), tr( "120" ), tr( "") )
1393  << HelpExample( tr( "layer_property('landsat','crs')" ), tr( "'EPSG:4326'" ), tr( "") )
1394  )
1395  )
1396  );
1397 
1398  gFunctionHelpTexts.insert( "left",
1399  Help( "left", tr( "function" ), tr( "Returns a substring that contains the <i>n</i> leftmost characters of the string." ),
1401  << HelpVariant( tr( "left" ), tr( "Returns a substring that contains the <i>n</i> leftmost characters of the string." ),
1402  QList<HelpArg>()
1403  << HelpArg( tr( "string" ), tr( "a string" ), false, false )
1404  << HelpArg( tr( "length" ), tr( "integer. The number of characters from the left of the string to return." ), false, false ),
1405  /* variableLenArguments */ false,
1407  << HelpExample( tr( "left('Hello World',5)" ), tr( "'Hello'" ), tr( "") )
1408  )
1409  )
1410  );
1411 
1412  gFunctionHelpTexts.insert( "length",
1413  Help( "length", tr( "function" ), tr( "Returns the number of characters in a string or the length of a geometry linestring." ),
1415  << HelpVariant( tr( "String variant" ), tr( "Returns the number of characters in a string." ),
1416  QList<HelpArg>()
1417  << HelpArg( tr( "string" ), tr( "string to count length of" ), false, false ),
1418  /* variableLenArguments */ false,
1420  << HelpExample( tr( "length('hello')" ), tr( "5" ), tr( "") )
1421  )
1422  << HelpVariant( tr( "Geometry variant" ), tr( "Calculate the length of a geometry line object. Calculations are in the Spatial Reference System of this geometry." ),
1423  QList<HelpArg>()
1424  << HelpArg( tr( "geometry" ), tr( "line geometry object" ), false, false ),
1425  /* variableLenArguments */ false,
1427  << HelpExample( tr( "length(geom_from_wkt('LINESTRING(0 0, 4 0)'))" ), tr( "4.0" ), tr( "") )
1428  )
1429  )
1430  );
1431 
1432  gFunctionHelpTexts.insert( "levenshtein",
1433  Help( "levenshtein", tr( "function" ), tr( "Returns the Levenshtein edit distance between two strings. This equates to the minimum number of character edits (insertions, deletions or substitutions) required to change one string to another.<br />The Levenshtein distance is a measure of the similarity between two strings. Smaller distances mean the strings are more similar, and larger distances indicate more different strings. The distance is case sensitive." ),
1435  << HelpVariant( tr( "levenshtein" ), tr( "Returns the Levenshtein edit distance between two strings. This equates to the minimum number of character edits (insertions, deletions or substitutions) required to change one string to another.<br />The Levenshtein distance is a measure of the similarity between two strings. Smaller distances mean the strings are more similar, and larger distances indicate more different strings. The distance is case sensitive." ),
1436  QList<HelpArg>()
1437  << HelpArg( tr( "string1" ), tr( "a string" ), false, false )
1438  << HelpArg( tr( "string2" ), tr( "a string" ), false, false ),
1439  /* variableLenArguments */ false,
1441  << HelpExample( tr( "levenshtein('kittens','mitten')" ), tr( "2" ), tr( "") )
1442  << HelpExample( tr( "levenshtein('Kitten','kitten')" ), tr( "1" ), tr( "") )
1443  << HelpExample( tr( "levenshtein(upper('Kitten'),upper('kitten'))" ), tr( "0" ), tr( "") )
1444  )
1445  )
1446  );
1447 
1448  gFunctionHelpTexts.insert( "ln",
1449  Help( "ln", tr( "function" ), tr( "Returns the natural logarithm of a value." ),
1451  << HelpVariant( tr( "ln" ), tr( "Returns the natural logarithm of a value." ),
1452  QList<HelpArg>()
1453  << HelpArg( tr( "value" ), tr( "numeric value" ), false, false ),
1454  /* variableLenArguments */ false,
1456  << HelpExample( tr( "ln(1)" ), tr( "0" ), tr( "") )
1457  << HelpExample( tr( "ln(2.7182818284590452354)" ), tr( "1" ), tr( "") )
1458  )
1459  )
1460  );
1461 
1462  gFunctionHelpTexts.insert( "log",
1463  Help( "log", tr( "function" ), tr( "Returns the value of the logarithm of the passed value and base." ),
1465  << HelpVariant( tr( "log" ), tr( "Returns the value of the logarithm of the passed value and base." ),
1466  QList<HelpArg>()
1467  << HelpArg( tr( "base" ), tr( "any positive number" ), false, false )
1468  << HelpArg( tr( "value" ), tr( "any positive number" ), false, false ),
1469  /* variableLenArguments */ false,
1471  << HelpExample( tr( "log(2, 32)" ), tr( "5" ), tr( "") )
1472  << HelpExample( tr( "log(0.5, 32)" ), tr( "-5" ), tr( "") )
1473  )
1474  )
1475  );
1476 
1477  gFunctionHelpTexts.insert( "log10",
1478  Help( "log10", tr( "function" ), tr( "Returns the value of the base 10 logarithm of the passed expression." ),
1480  << HelpVariant( tr( "log10" ), tr( "Returns the value of the base 10 logarithm of the passed expression." ),
1481  QList<HelpArg>()
1482  << HelpArg( tr( "value" ), tr( "any positive number" ), false, false ),
1483  /* variableLenArguments */ false,
1485  << HelpExample( tr( "log10(1)" ), tr( "0" ), tr( "") )
1486  << HelpExample( tr( "log10(100)" ), tr( "2" ), tr( "") )
1487  )
1488  )
1489  );
1490 
1491  gFunctionHelpTexts.insert( "longest_common_substring",
1492  Help( "longest_common_substring", tr( "function" ), tr( "Returns the longest common substring between two strings. This substring is the longest string that is a substring of the two input strings. Eg, the longest common substring of \"ABABC\" and \"BABCA\" is \"ABC\". The substring is case sensitive." ),
1494  << HelpVariant( tr( "longest_common_substring" ), tr( "Returns the longest common substring between two strings. This substring is the longest string that is a substring of the two input strings. Eg, the longest common substring of \"ABABC\" and \"BABCA\" is \"ABC\". The substring is case sensitive." ),
1495  QList<HelpArg>()
1496  << HelpArg( tr( "string1" ), tr( "a string" ), false, false )
1497  << HelpArg( tr( "string2" ), tr( "a string" ), false, false ),
1498  /* variableLenArguments */ false,
1500  << HelpExample( tr( "longest_common_substring('ABABC','BABCA')" ), tr( "'ABC'" ), tr( "") )
1501  << HelpExample( tr( "longest_common_substring('abcDeF','abcdef')" ), tr( "'abc'" ), tr( "") )
1502  << HelpExample( tr( "longest_common_substring(upper('abcDeF'),upper('abcdex'))" ), tr( "'ABCDE'" ), tr( "") )
1503  )
1504  )
1505  );
1506 
1507  gFunctionHelpTexts.insert( "lower",
1508  Help( "lower", tr( "function" ), tr( "Converts a string to lower case letters." ),
1510  << HelpVariant( tr( "lower" ), tr( "Converts a string to lower case letters." ),
1511  QList<HelpArg>()
1512  << HelpArg( tr( "string" ), tr( "the string to convert to lower case" ), false, false ),
1513  /* variableLenArguments */ false,
1515  << HelpExample( tr( "lower('HELLO World')" ), tr( "'hello world'" ), tr( "") )
1516  )
1517  )
1518  );
1519 
1520  gFunctionHelpTexts.insert( "lpad",
1521  Help( "lpad", tr( "function" ), tr( "Returns a string padded to supplied width using a fill character." ),
1523  << HelpVariant( tr( "lpad" ), tr( "Returns a string padded to supplied width using a fill character." ),
1524  QList<HelpArg>()
1525  << HelpArg( tr( "string" ), tr( "string to pad" ), false, false )
1526  << HelpArg( tr( "width" ), tr( "length of new string" ), false, false )
1527  << HelpArg( tr( "fill" ), tr( "character to pad the remaining space with" ), false, false ),
1528  /* variableLenArguments */ false,
1530  << HelpExample( tr( "lpad('Hello', 10, 'x')" ), tr( "'xxxxxHello'" ), tr( "") )
1531  )
1532  )
1533  );
1534 
1535  gFunctionHelpTexts.insert( "make_point",
1536  Help( "make_point", tr( "function" ), tr( "Creates a point geometry from an x and y value." ),
1538  << HelpVariant( tr( "make_point" ), tr( "Creates a point geometry from an x and y value." ),
1539  QList<HelpArg>()
1540  << HelpArg( tr( "x" ), tr( "x coordinate of point" ), false, false )
1541  << HelpArg( tr( "y" ), tr( "y coordinate of point" ), false, false ),
1542  /* variableLenArguments */ false,
1544  << HelpExample( tr( "geom_to_wkt(make_point(2,4))" ), tr( "'Point (2 4)'" ), tr( "") )
1545  )
1546  )
1547  );
1548 
1549  gFunctionHelpTexts.insert( "max",
1550  Help( "max", tr( "function" ), tr( "Returns the largest value in a set of values." ),
1552  << HelpVariant( tr( "max" ), tr( "Returns the largest value in a set of values." ),
1553  QList<HelpArg>()
1554  << HelpArg( tr( "value1" ), tr( "" ), false, true )
1555  << HelpArg( tr( "value2" ), tr( "" ), false, true )
1556  << HelpArg( tr( "value" ), tr( "a number" ), true, false ),
1557  /* variableLenArguments */ true,
1559  << HelpExample( tr( "max(2,10.2,5.5)" ), tr( "10.2" ), tr( "") )
1560  )
1561  )
1562  );
1563 
1564  gFunctionHelpTexts.insert( "min",
1565  Help( "min", tr( "function" ), tr( "Returns the smallest value in a set of values." ),
1567  << HelpVariant( tr( "min" ), tr( "Returns the smallest value in a set of values." ),
1568  QList<HelpArg>()
1569  << HelpArg( tr( "value1" ), tr( "" ), false, true )
1570  << HelpArg( tr( "value2" ), tr( "" ), false, true )
1571  << HelpArg( tr( "value" ), tr( "a number" ), true, false ),
1572  /* variableLenArguments */ true,
1574  << HelpExample( tr( "min(20.5,10,6.2)" ), tr( "6.2" ), tr( "") )
1575  )
1576  )
1577  );
1578 
1579  gFunctionHelpTexts.insert( "minute",
1580  Help( "minute", tr( "function" ), tr( "Extract the minutes part from a datetime or time, or the number of minutes from an interval." ),
1582  << HelpVariant( tr( "Time variant" ), tr( "Extract the minutes part from a time or datetime." ),
1583  QList<HelpArg>()
1584  << HelpArg( tr( "datetime" ), tr( "a time or datetime value" ), false, false ),
1585  /* variableLenArguments */ false,
1587  << HelpExample( tr( "minute('2012-07-22T13:24:57')" ), tr( "24" ), tr( "") )
1588  )
1589  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in minutes of an interval." ),
1590  QList<HelpArg>()
1591  << HelpArg( tr( "interval" ), tr( "interval value to return number of minutes from" ), false, false ),
1592  /* variableLenArguments */ false,
1594  << HelpExample( tr( "minute(tointerval('3 minutes'))" ), tr( "3" ), tr( "") )
1595  << HelpExample( tr( "minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00'))" ), tr( "20" ), tr( "") )
1596  << HelpExample( tr( "minute(age('2012-01-01','2010-01-01'))" ), tr( "1051200" ), tr( "") )
1597  )
1598  )
1599  );
1600 
1601  gFunctionHelpTexts.insert( "month",
1602  Help( "month", tr( "function" ), tr( "Extract the month part from a date, or the number of months from an interval." ),
1604  << HelpVariant( tr( "Date variant" ), tr( "Extract the month part from a date or datetime." ),
1605  QList<HelpArg>()
1606  << HelpArg( tr( "date" ), tr( "a date or datetime value" ), false, false ),
1607  /* variableLenArguments */ false,
1609  << HelpExample( tr( "month('2012-05-12')" ), tr( "05" ), tr( "") )
1610  )
1611  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in months of an interval." ),
1612  QList<HelpArg>()
1613  << HelpArg( tr( "interval" ), tr( "interval value to return number of months from" ), false, false ),
1614  /* variableLenArguments */ false,
1616  << HelpExample( tr( "month(to_interval('3 months'))" ), tr( "3" ), tr( "") )
1617  << HelpExample( tr( "month(age('2012-01-01','2010-01-01'))" ), tr( "4.03333" ), tr( "") )
1618  )
1619  )
1620  );
1621 
1622  gFunctionHelpTexts.insert( "now",
1623  Help( "now", tr( "function" ), tr( "Returns the current date and time." ),
1625  << HelpVariant( tr( "now" ), tr( "Returns the current date and time." ),
1626  QList<HelpArg>(),
1627  /* variableLenArguments */ false,
1629  << HelpExample( tr( "now()" ), tr( "2012-07-22T13:24:57" ), tr( "") )
1630  )
1631  )
1632  );
1633 
1634  gFunctionHelpTexts.insert( "num_points",
1635  Help( "num_points", tr( "function" ), tr( "Returns the number of vertices in a geometry." ),
1637  << HelpVariant( tr( "num_points" ), tr( "Returns the number of vertices in a geometry." ),
1638  QList<HelpArg>()
1639  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
1640  /* variableLenArguments */ false,
1642  << HelpExample( tr( "num_points($geometry)" ), tr( "number of vertices in $geometry" ), tr( "") )
1643  )
1644  )
1645  );
1646 
1647  gFunctionHelpTexts.insert( "*",
1648  Help( "*", tr( "operator" ), tr( "Multiplication of two values" ),
1650  << HelpVariant( tr( "*" ), tr( "Multiplication of two values" ),
1651  QList<HelpArg>()
1652  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1653  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1654  /* variableLenArguments */ false,
1656  << HelpExample( tr( "5 * 4" ), tr( "20" ), tr( "") )
1657  << HelpExample( tr( "5 * NULL" ), tr( "NULL" ), tr( "") )
1658  )
1659  )
1660  );
1661 
1662  gFunctionHelpTexts.insert( "||",
1663  Help( "||", tr( "operator" ), tr( "Joins two values together into a string.\n\nIf one of the values is NULL the result will be NULL. See the CONCAT function for a different behavior." ),
1665  << HelpVariant( tr( "||" ), tr( "Joins two values together into a string.\n\nIf one of the values is NULL the result will be NULL. See the CONCAT function for a different behavior." ),
1666  QList<HelpArg>()
1667  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1668  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1669  /* variableLenArguments */ false,
1671  << HelpExample( tr( "'Here' || ' and ' || 'there'" ), tr( "'Here and there'" ), tr( "") )
1672  << HelpExample( tr( "'Nothing' || NULL" ), tr( "NULL" ), tr( "") )
1673  << HelpExample( tr( "'Dia: ' || \"Diameter\"" ), tr( "'Dia: 25'" ), tr( "") )
1674  << HelpExample( tr( "1 || 2" ), tr( "'12'" ), tr( "") )
1675  )
1676  )
1677  );
1678 
1679  gFunctionHelpTexts.insert( "/",
1680  Help( "/", tr( "operator" ), tr( "Division of two values" ),
1682  << HelpVariant( tr( "/" ), tr( "Division of two values" ),
1683  QList<HelpArg>()
1684  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1685  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1686  /* variableLenArguments */ false,
1688  << HelpExample( tr( "5 / 4" ), tr( "1.25" ), tr( "") )
1689  << HelpExample( tr( "5 / NULL" ), tr( "NULL" ), tr( "") )
1690  )
1691  )
1692  );
1693 
1694  gFunctionHelpTexts.insert( "=",
1695  Help( "=", tr( "operator" ), tr( "Compares two values and evaluates to 1 if they are equal." ),
1697  << HelpVariant( tr( "=" ), tr( "Compares two values and evaluates to 1 if they are equal." ),
1698  QList<HelpArg>()
1699  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1700  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1701  /* variableLenArguments */ false,
1703  << HelpExample( tr( "5 = 4" ), tr( "0" ), tr( "") )
1704  << HelpExample( tr( "4 = 4" ), tr( "1" ), tr( "") )
1705  << HelpExample( tr( "5 = NULL" ), tr( "NULL" ), tr( "") )
1706  << HelpExample( tr( "NULL = NULL" ), tr( "NULL" ), tr( "") )
1707  )
1708  )
1709  );
1710 
1711  gFunctionHelpTexts.insert( "^",
1712  Help( "^", tr( "operator" ), tr( "Power of two values." ),
1714  << HelpVariant( tr( "^" ), tr( "Power of two values." ),
1715  QList<HelpArg>()
1716  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1717  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1718  /* variableLenArguments */ false,
1720  << HelpExample( tr( "5 ^ 4" ), tr( "625" ), tr( "") )
1721  << HelpExample( tr( "5 ^ NULL" ), tr( "NULL" ), tr( "") )
1722  )
1723  )
1724  );
1725 
1726  gFunctionHelpTexts.insert( ">=",
1727  Help( ">=", tr( "operator" ), tr( "Compares two values and evaluates to 1 if the left value is greater or equal than the right value." ),
1729  << HelpVariant( tr( ">=" ), tr( "Compares two values and evaluates to 1 if the left value is greater or equal than the right value." ),
1730  QList<HelpArg>()
1731  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1732  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1733  /* variableLenArguments */ false,
1735  << HelpExample( tr( "5 &gt;= 4" ), tr( "1" ), tr( "") )
1736  << HelpExample( tr( "5 &gt;= 5" ), tr( "1" ), tr( "") )
1737  << HelpExample( tr( "4 &gt;= 5" ), tr( "0" ), tr( "") )
1738  )
1739  )
1740  );
1741 
1742  gFunctionHelpTexts.insert( ">",
1743  Help( ">", tr( "operator" ), tr( "Compares two values and evaluates to 1 if the left value is greater than the right value." ),
1745  << HelpVariant( tr( ">" ), tr( "Compares two values and evaluates to 1 if the left value is greater than the right value." ),
1746  QList<HelpArg>()
1747  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1748  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1749  /* variableLenArguments */ false,
1751  << HelpExample( tr( "5 &gt; 4" ), tr( "1" ), tr( "") )
1752  << HelpExample( tr( "5 &gt; 5" ), tr( "0" ), tr( "") )
1753  << HelpExample( tr( "4 &gt; 5" ), tr( "0" ), tr( "") )
1754  )
1755  )
1756  );
1757 
1758  gFunctionHelpTexts.insert( "<=",
1759  Help( "<=", tr( "operator" ), tr( "Compares two values and evaluates to 1 if the left value is less or equal than the right value." ),
1761  << HelpVariant( tr( "<=" ), tr( "Compares two values and evaluates to 1 if the left value is less or equal than the right value." ),
1762  QList<HelpArg>()
1763  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1764  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1765  /* variableLenArguments */ false,
1767  << HelpExample( tr( "5 &lt;= 4" ), tr( "0" ), tr( "") )
1768  << HelpExample( tr( "5 &lt;= 5" ), tr( "1" ), tr( "") )
1769  << HelpExample( tr( "4 &lt;= 5" ), tr( "1" ), tr( "") )
1770  )
1771  )
1772  );
1773 
1774  gFunctionHelpTexts.insert( "<",
1775  Help( "<", tr( "operator" ), tr( "Compares two values and evaluates to 1 if the left value is less than the right value." ),
1777  << HelpVariant( tr( "<" ), tr( "Compares two values and evaluates to 1 if the left value is less than the right value." ),
1778  QList<HelpArg>()
1779  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1780  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1781  /* variableLenArguments */ false,
1783  << HelpExample( tr( "5 &lt; 4" ), tr( "0" ), tr( "") )
1784  << HelpExample( tr( "5 &lt; 5" ), tr( "0" ), tr( "") )
1785  << HelpExample( tr( "4 &lt; 5" ), tr( "1" ), tr( "") )
1786  )
1787  )
1788  );
1789 
1790  gFunctionHelpTexts.insert( "-",
1791  Help( "-", tr( "operator" ), tr( "Subtraction of two values. If one of the values is NULL the result will be NULL." ),
1793  << HelpVariant( tr( "-" ), tr( "Subtraction of two values. If one of the values is NULL the result will be NULL." ),
1794  QList<HelpArg>()
1795  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1796  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1797  /* variableLenArguments */ false,
1799  << HelpExample( tr( "5 - 4" ), tr( "1" ), tr( "") )
1800  << HelpExample( tr( "5 - NULL" ), tr( "NULL" ), tr( "") )
1801  )
1802  )
1803  );
1804 
1805  gFunctionHelpTexts.insert( "%",
1806  Help( "%", tr( "operator" ), tr( "Remainder of division" ),
1808  << HelpVariant( tr( "%" ), tr( "Remainder of division" ),
1809  QList<HelpArg>()
1810  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1811  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1812  /* variableLenArguments */ false,
1814  << HelpExample( tr( "5 % 4" ), tr( "1" ), tr( "") )
1815  << HelpExample( tr( "5 % NULL" ), tr( "NULL" ), tr( "") )
1816  )
1817  )
1818  );
1819 
1820  gFunctionHelpTexts.insert( "<>",
1821  Help( "<>", tr( "operator" ), tr( "Compares two values and evaluates to 1 if they are not equal." ),
1823  << HelpVariant( tr( "<>" ), tr( "Compares two values and evaluates to 1 if they are not equal." ),
1824  QList<HelpArg>()
1825  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1826  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1827  /* variableLenArguments */ false,
1829  << HelpExample( tr( "5 &lt;&gt; 4" ), tr( "1" ), tr( "") )
1830  << HelpExample( tr( "4 &lt;&gt; 4" ), tr( "0" ), tr( "") )
1831  << HelpExample( tr( "5 &lt;&gt; NULL" ), tr( "NULL" ), tr( "") )
1832  << HelpExample( tr( "NULL &lt;&gt; NULL" ), tr( "NULL" ), tr( "") )
1833  )
1834  )
1835  );
1836 
1837  gFunctionHelpTexts.insert( "+",
1838  Help( "+", tr( "operator" ), tr( "Addition of two values. If one of the values is NULL the result will be NULL." ),
1840  << HelpVariant( tr( "+" ), tr( "Addition of two values. If one of the values is NULL the result will be NULL." ),
1841  QList<HelpArg>()
1842  << HelpArg( tr( "a" ), tr( "value" ), false, false )
1843  << HelpArg( tr( "b" ), tr( "value" ), false, false ),
1844  /* variableLenArguments */ false,
1846  << HelpExample( tr( "5 + 4" ), tr( "9" ), tr( "") )
1847  << HelpExample( tr( "5 + NULL" ), tr( "NULL" ), tr( "") )
1848  )
1849  )
1850  );
1851 
1852  gFunctionHelpTexts.insert( "overlaps",
1853  Help( "overlaps", tr( "function" ), tr( "Tests whether a geometry overlaps another. Returns true if the geometries share space, are of the same dimension, but are not completely contained by each other." ),
1855  << HelpVariant( tr( "overlaps" ), tr( "Tests whether a geometry overlaps another. Returns true if the geometries share space, are of the same dimension, but are not completely contained by each other." ),
1856  QList<HelpArg>()
1857  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
1858  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
1859  /* variableLenArguments */ false,
1861  << HelpExample( tr( "overlaps( geom_from_wkt( 'LINESTRING(3 5, 4 4, 5 5, 5 3)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "true" ), tr( "") )
1862  << HelpExample( tr( "overlaps( geom_from_wkt( 'LINESTRING(0 0, 1 1)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "false" ), tr( "") )
1863  )
1864  )
1865  );
1866 
1867  gFunctionHelpTexts.insert( "perimeter",
1868  Help( "perimeter", tr( "function" ), tr( "Returns the perimeter of a geometry polygon object. Calculations are in the Spatial Reference System of this geometry." ),
1870  << HelpVariant( tr( "perimeter" ), tr( "Returns the perimeter of a geometry polygon object. Calculations are in the Spatial Reference System of this geometry." ),
1871  QList<HelpArg>()
1872  << HelpArg( tr( "geometry" ), tr( "polygon geometry object" ), false, false ),
1873  /* variableLenArguments */ false,
1875  << HelpExample( tr( "perimeter(geom_from_wkt('POLYGON((0 0, 4 0, 4 2, 0 2, 0 0))'))" ), tr( "12.0" ), tr( "") )
1876  )
1877  )
1878  );
1879 
1880  gFunctionHelpTexts.insert( "pi",
1881  Help( "pi", tr( "function" ), tr( "Returns value of pi for calculations." ),
1883  << HelpVariant( tr( "pi" ), tr( "Returns value of pi for calculations." ),
1884  QList<HelpArg>(),
1885  /* variableLenArguments */ false,
1887  << HelpExample( tr( "pi()" ), tr( "3.14159265358979" ), tr( "") )
1888  )
1889  )
1890  );
1891 
1892  gFunctionHelpTexts.insert( "point_n",
1893  Help( "point_n", tr( "function" ), tr( "Returns a specific node from a geometry." ),
1895  << HelpVariant( tr( "point_n" ), tr( "Returns a specific node from a geometry." ),
1896  QList<HelpArg>()
1897  << HelpArg( tr( "geometry" ), tr( "geometry object" ), false, false )
1898  << HelpArg( tr( "index" ), tr( "index of node to return, where 1 is the first node" ), false, false ),
1899  /* variableLenArguments */ false,
1901  << HelpExample( tr( "geom_to_wkt(point_n(geom_from_wkt('POLYGON((0 0, 4 0, 4 2, 0 2, 0 0))'),2))" ), tr( "'Point (4 0)'" ), tr( "") )
1902  )
1903  )
1904  );
1905 
1906  gFunctionHelpTexts.insert( "project_color",
1907  Help( "project_color", tr( "function" ), tr( "Returns a color from the project's color scheme." ),
1909  << HelpVariant( tr( "project_color" ), tr( "Returns a color from the project's color scheme." ),
1910  QList<HelpArg>()
1911  << HelpArg( tr( "name" ), tr( "a color name" ), false, false ),
1912  /* variableLenArguments */ false,
1914  << HelpExample( tr( "project_color('Logo color')" ), tr( "20,140,50" ), tr( "") )
1915  )
1916  )
1917  );
1918 
1919  gFunctionHelpTexts.insert( "ramp_color",
1920  Help( "ramp_color", tr( "function" ), tr( "Returns a string representing a color from a color ramp." ),
1922  << HelpVariant( tr( "ramp_color" ), tr( "Returns a string representing a color from a color ramp." ),
1923  QList<HelpArg>()
1924  << HelpArg( tr( "ramp_name" ), tr( "the name of the color ramp as a string, for example 'Spectral'" ), false, false )
1925  << HelpArg( tr( "value" ), tr( "the position on the ramp to select the color from as a real number between 0 and 1" ), false, false ),
1926  /* variableLenArguments */ false,
1928  << HelpExample( tr( "ramp_color('Spectral',0.3)" ), tr( "'253,190,115,255'" ), tr( "") ),
1929  tr( "The color ramps available vary between QGIS installations. This function may not give the expected results if you move your QGIS project between installations." )
1930  )
1931  )
1932  );
1933 
1934  gFunctionHelpTexts.insert( "rand",
1935  Help( "rand", tr( "function" ), tr( "Returns a random integer within the range specified by the minimum and maximum argument (inclusive)." ),
1937  << HelpVariant( tr( "rand" ), tr( "Returns a random integer within the range specified by the minimum and maximum argument (inclusive)." ),
1938  QList<HelpArg>()
1939  << HelpArg( tr( "min" ), tr( "an integer representing the smallest possible random number desired" ), false, false )
1940  << HelpArg( tr( "max" ), tr( "an integer representing the largest possible random number desired" ), false, false ),
1941  /* variableLenArguments */ false,
1943  << HelpExample( tr( "rand(1, 10)" ), tr( "8" ), tr( "") )
1944  )
1945  )
1946  );
1947 
1948  gFunctionHelpTexts.insert( "randf",
1949  Help( "randf", tr( "function" ), tr( "Returns a random float within the range specified by the minimum and maximum argument (inclusive)." ),
1951  << HelpVariant( tr( "randf" ), tr( "Returns a random float within the range specified by the minimum and maximum argument (inclusive)." ),
1952  QList<HelpArg>()
1953  << HelpArg( tr( "min" ), tr( "an float representing the smallest possible random number desired" ), false, false )
1954  << HelpArg( tr( "max" ), tr( "an float representing the largest possible random number desired" ), false, false ),
1955  /* variableLenArguments */ false,
1957  << HelpExample( tr( "randf(1, 10)" ), tr( "4.59258286403147" ), tr( "") )
1958  )
1959  )
1960  );
1961 
1962  gFunctionHelpTexts.insert( "regexp_match",
1963  Help( "regexp_match", tr( "function" ), tr( "Returns true if any part of a string matches the supplied regular expression." ),
1965  << HelpVariant( tr( "regexp_match" ), tr( "Returns true if any part of a string matches the supplied regular expression." ),
1966  QList<HelpArg>()
1967  << HelpArg( tr( "input_string" ), tr( "the string to test against the regular expression" ), false, false )
1968  << HelpArg( tr( "regex" ), tr( "The regular expression to test against. Backslash characters must be double escaped (eg \"\\s\" to match a white space character). Non-greedy regular expressions are not supported." ), false, false ),
1969  /* variableLenArguments */ false,
1971  << HelpExample( tr( "regexp_match('QGIS ROCKS','\\sROCKS')" ), tr( "true" ), tr( "") )
1972  )
1973  )
1974  );
1975 
1976  gFunctionHelpTexts.insert( "regexp_replace",
1977  Help( "regexp_replace", tr( "function" ), tr( "Returns a string with the supplied regular expression replaced." ),
1979  << HelpVariant( tr( "regexp_replace" ), tr( "Returns a string with the supplied regular expression replaced." ),
1980  QList<HelpArg>()
1981  << HelpArg( tr( "input_string" ), tr( "the string to replace matches in" ), false, false )
1982  << HelpArg( tr( "regex" ), tr( "The regular expression to replace. Backslash characters must be double escaped (eg \"\\s\" to match a white space character). Non-greedy regular expressions are not supported." ), false, false )
1983  << HelpArg( tr( "replacement" ), tr( "The string that will replace any matching occurrences of the supplied regular expression. Captured groups can be inserted into the replacement string using \\1, \\2, etc." ), false, false ),
1984  /* variableLenArguments */ false,
1986  << HelpExample( tr( "regexp_replace('QGIS SHOULD ROCK','\\sSHOULD\\s',' DOES ')" ), tr( "'QGIS DOES ROCK'" ), tr( "") )
1987  )
1988  )
1989  );
1990 
1991  gFunctionHelpTexts.insert( "regexp_substr",
1992  Help( "regexp_substr", tr( "function" ), tr( "Returns the portion of a string which matches a supplied regular expression." ),
1994  << HelpVariant( tr( "regexp_substr" ), tr( "Returns the portion of a string which matches a supplied regular expression." ),
1995  QList<HelpArg>()
1996  << HelpArg( tr( "input_string" ), tr( "the string to find matches in" ), false, false )
1997  << HelpArg( tr( "regex" ), tr( "The regular expression to match against. Backslash characters must be double escaped (eg \"\\s\" to match a white space character). Non-greedy regular expressions are not supported." ), false, false ),
1998  /* variableLenArguments */ false,
2000  << HelpExample( tr( "regexp_substr('abc123','(\\d+)')" ), tr( "'123'" ), tr( "") )
2001  )
2002  )
2003  );
2004 
2005  gFunctionHelpTexts.insert( "replace",
2006  Help( "replace", tr( "function" ), tr( "Returns a string with the the supplied string replaced." ),
2008  << HelpVariant( tr( "replace" ), tr( "Returns a string with the the supplied string replaced." ),
2009  QList<HelpArg>()
2010  << HelpArg( tr( "string" ), tr( "the input string" ), false, false )
2011  << HelpArg( tr( "before" ), tr( "the string to replace" ), false, false )
2012  << HelpArg( tr( "after" ), tr( "the string to use as a replacement" ), false, false ),
2013  /* variableLenArguments */ false,
2015  << HelpExample( tr( "replace('QGIS SHOULD ROCK','SHOULD','DOES')" ), tr( "'QGIS DOES ROCK'" ), tr( "") )
2016  )
2017  )
2018  );
2019 
2020  gFunctionHelpTexts.insert( "right",
2021  Help( "right", tr( "function" ), tr( "Returns a substring that contains the <i>n</i> rightmost characters of the string." ),
2023  << HelpVariant( tr( "right" ), tr( "Returns a substring that contains the <i>n</i> rightmost characters of the string." ),
2024  QList<HelpArg>()
2025  << HelpArg( tr( "string" ), tr( "a string" ), false, false )
2026  << HelpArg( tr( "length" ), tr( "integer. The number of characters from the right of the string to return." ), false, false ),
2027  /* variableLenArguments */ false,
2029  << HelpExample( tr( "right('Hello World',5)" ), tr( "'World'" ), tr( "") )
2030  )
2031  )
2032  );
2033 
2034  gFunctionHelpTexts.insert( "round",
2035  Help( "round", tr( "function" ), tr( "Rounds a number to number of decimal places." ),
2037  << HelpVariant( tr( "round" ), tr( "Rounds a number to number of decimal places." ),
2038  QList<HelpArg>()
2039  << HelpArg( tr( "decimal" ), tr( "decimal number to be rounded" ), false, false )
2040  << HelpArg( tr( "places" ), tr( "Optional integer representing number of places to round decimals to. Can be negative." ), false, false ),
2041  /* variableLenArguments */ false,
2043  << HelpExample( tr( "round(1234.567, 2)" ), tr( "1234.57" ), tr( "") )
2044  << HelpExample( tr( "round(1234.567)" ), tr( "1235" ), tr( "") )
2045  )
2046  )
2047  );
2048 
2049  gFunctionHelpTexts.insert( "rpad",
2050  Help( "rpad", tr( "function" ), tr( "Returns a string padded to supplied width using a fill character." ),
2052  << HelpVariant( tr( "rpad" ), tr( "Returns a string padded to supplied width using a fill character." ),
2053  QList<HelpArg>()
2054  << HelpArg( tr( "string" ), tr( "string to pad" ), false, false )
2055  << HelpArg( tr( "width" ), tr( "length of new string" ), false, false )
2056  << HelpArg( tr( "fill" ), tr( "character to pad the remaining space with" ), false, false ),
2057  /* variableLenArguments */ false,
2059  << HelpExample( tr( "rpad('Hello', 10, 'x')" ), tr( "'Helloxxxxx'" ), tr( "") )
2060  )
2061  )
2062  );
2063 
2064  gFunctionHelpTexts.insert( "scale_exp",
2065  Help( "scale_exp", tr( "function" ), tr( "Transforms a given value from an input domain to an output range using an exponential curve. This function can be used to ease values in or out of the specified output range." ),
2067  << HelpVariant( tr( "scale_exp" ), tr( "Transforms a given value from an input domain to an output range using an exponential curve. This function can be used to ease values in or out of the specified output range." ),
2068  QList<HelpArg>()
2069  << HelpArg( tr( "val" ), tr( "A value in the input domain. The function will return a corresponding scaled value in the output range." ), false, false )
2070  << HelpArg( tr( "domain_min" ), tr( "Specifies the minimum value in the input domain, the smallest value the input value should take." ), false, false )
2071  << HelpArg( tr( "domain_max" ), tr( "Specifies the maximum value in the input domain, the largest value the input value should take." ), false, false )
2072  << HelpArg( tr( "range_min" ), tr( "Specifies the minimum value in the output range, the smallest value which should be output by the function." ), false, false )
2073  << HelpArg( tr( "range_max" ), tr( "Specifies the maximum value in the output range, the largest value which should be output by the function." ), false, false )
2074  << HelpArg( tr( "exponent" ), tr( "A positive value (greater than 0), which dictates the way input values are mapped to the output range. Large exponents will cause the output values to 'ease in', starting slowly before accelerating as the input values approach the domain maximum. Smaller exponents (less than 1) will cause output values to 'ease out', where the mapping starts quickly but slows as it approaches the domain maximum." ), false, false ),
2075  /* variableLenArguments */ false,
2077  << HelpExample( tr( "scale_exp(5,0,10,0,100,2)" ), tr( "25" ), tr( "easing in, using an exponent of 2") )
2078  << HelpExample( tr( "scale_exp(3,0,10,0,100,0.5)" ), tr( "54.772" ), tr( "easing out, using an exponent of 0.5") )
2079  )
2080  )
2081  );
2082 
2083  gFunctionHelpTexts.insert( "scale_linear",
2084  Help( "scale_linear", tr( "function" ), tr( "Transforms a given value from an input domain to an output range using linear interpolation." ),
2086  << HelpVariant( tr( "scale_linear" ), tr( "Transforms a given value from an input domain to an output range using linear interpolation." ),
2087  QList<HelpArg>()
2088  << HelpArg( tr( "val" ), tr( "A value in the input domain. The function will return a corresponding scaled value in the output range." ), false, false )
2089  << HelpArg( tr( "domain_min" ), tr( "Specifies the minimum value in the input domain, the smallest value the input value should take." ), false, false )
2090  << HelpArg( tr( "domain_max" ), tr( "Specifies the maximum value in the input domain, the largest value the input value should take." ), false, false )
2091  << HelpArg( tr( "range_min" ), tr( "Specifies the minimum value in the output range, the smallest value which should be output by the function." ), false, false )
2092  << HelpArg( tr( "range_max" ), tr( "Specifies the maximum value in the output range, the largest value which should be output by the function." ), false, false ),
2093  /* variableLenArguments */ false,
2095  << HelpExample( tr( "scale_linear(5,0,10,0,100)" ), tr( "72" ), tr( "") )
2096  << HelpExample( tr( "scale_linear(0.2,0,1,0,360)" ), tr( "72" ), tr( "scaling a value between 0 and 1 to an angle between 0 and 360") )
2097  << HelpExample( tr( "scale_linear(1500,1000,10000,9,20)" ), tr( "10.22" ), tr( "scaling a population which varies between 1000 and 10000 to a font size between 9 and 20") )
2098  )
2099  )
2100  );
2101 
2102  gFunctionHelpTexts.insert( "second",
2103  Help( "second", tr( "function" ), tr( "Extract the seconds part from a datetime or time, or the number of seconds from an interval." ),
2105  << HelpVariant( tr( "Time variant" ), tr( "Extract the seconds part from a time or datetime." ),
2106  QList<HelpArg>()
2107  << HelpArg( tr( "datetime" ), tr( "a time or datetime value" ), false, false ),
2108  /* variableLenArguments */ false,
2110  << HelpExample( tr( "second('2012-07-22T13:24:57')" ), tr( "57" ), tr( "") )
2111  )
2112  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in seconds of an interval." ),
2113  QList<HelpArg>()
2114  << HelpArg( tr( "interval" ), tr( "interval value to return number of seconds from" ), false, false ),
2115  /* variableLenArguments */ false,
2117  << HelpExample( tr( "second(age('2012-07-22T00:20:00','2012-07-22T00:00:00'))" ), tr( "1200" ), tr( "") )
2118  << HelpExample( tr( "second(age('2012-01-01','2010-01-01'))" ), tr( "63072000" ), tr( "") )
2119  )
2120  )
2121  );
2122 
2123  gFunctionHelpTexts.insert( "set_color_part",
2124  Help( "set_color_part", tr( "function" ), tr( "Sets a specific color component for a color string, eg the red component or alpha component." ),
2126  << HelpVariant( tr( "set_color_part" ), tr( "Sets a specific color component for a color string, eg the red component or alpha component." ),
2127  QList<HelpArg>()
2128  << HelpArg( tr( "color" ), tr( "a color string" ), false, false )
2129  << HelpArg( tr( "component" ), tr( "a string corresponding to the color component to set. Valid options are:<br /><ul><li>red: RGB red component (0-255)</li><li>green: RGB green component (0-255)</li><li>blue: RGB blue component (0-255)</li><li>alpha: alpha (transparency) value (0-255)</li><li>hue: HSV hue (0-360)</li><li>saturation: HSV saturation (0-100)</li><li>value: HSV value (0-100)</li><li>hsl_hue: HSL hue (0-360)</li><li>hsl_saturation: HSL saturation (0-100)</li><li>lightness: HSL lightness (0-100)</li><li>cyan: CMYK cyan component (0-100)</li><li>magenta: CMYK magenta component (0-100)</li><li>yellow: CMYK yellow component (0-100)</li> <li>black: CMYK black component (0-100)</li></ul>" ), false, false )
2130  << HelpArg( tr( "value" ), tr( "new value for color component, respecting the ranges listed above" ), false, false ),
2131  /* variableLenArguments */ false,
2133  << HelpExample( tr( "set_color_part('200,10,30','green',50)" ), tr( "200,50,30" ), tr( "") )
2134  )
2135  )
2136  );
2137 
2138  gFunctionHelpTexts.insert( "sin",
2139  Help( "sin", tr( "function" ), tr( "Returns the sine of an angle." ),
2141  << HelpVariant( tr( "sin" ), tr( "Returns the sine of an angle." ),
2142  QList<HelpArg>()
2143  << HelpArg( tr( "angle" ), tr( "angle in radians" ), false, false ),
2144  /* variableLenArguments */ false,
2146  << HelpExample( tr( "sin(1.571)" ), tr( "0.999999682931835" ), tr( "") )
2147  )
2148  )
2149  );
2150 
2151  gFunctionHelpTexts.insert( "soundex",
2152  Help( "soundex", tr( "function" ), tr( "Returns the Soundex representation of a string. Soundex is a phonetic matching algorithm, so strings with similar sounds should be represented by the same Soundex code." ),
2154  << HelpVariant( tr( "soundex" ), tr( "Returns the Soundex representation of a string. Soundex is a phonetic matching algorithm, so strings with similar sounds should be represented by the same Soundex code." ),
2155  QList<HelpArg>()
2156  << HelpArg( tr( "string" ), tr( "a string" ), false, false ),
2157  /* variableLenArguments */ false,
2159  << HelpExample( tr( "soundex('robert')" ), tr( "'R163'" ), tr( "") )
2160  << HelpExample( tr( "soundex('rupert')" ), tr( "'R163'" ), tr( "") )
2161  << HelpExample( tr( "soundex('rubin')" ), tr( "'R150'" ), tr( "") )
2162  )
2163  )
2164  );
2165 
2166  gFunctionHelpTexts.insert( "sqrt",
2167  Help( "sqrt", tr( "function" ), tr( "Returns square root of a value." ),
2169  << HelpVariant( tr( "sqrt" ), tr( "Returns square root of a value." ),
2170  QList<HelpArg>()
2171  << HelpArg( tr( "value" ), tr( "a number" ), false, false ),
2172  /* variableLenArguments */ false,
2174  << HelpExample( tr( "sqrt(9)" ), tr( "3" ), tr( "") )
2175  )
2176  )
2177  );
2178 
2179  gFunctionHelpTexts.insert( "start_point",
2180  Help( "start_point", tr( "function" ), tr( "Returns the first node from a geometry." ),
2182  << HelpVariant( tr( "start_point" ), tr( "Returns the first node from a geometry." ),
2183  QList<HelpArg>()
2184  << HelpArg( tr( "geometry" ), tr( "geometry object" ), false, false ),
2185  /* variableLenArguments */ false,
2187  << HelpExample( tr( "geom_to_wkt(start_point(geom_from_wkt('LINESTRING(4 0, 4 2, 0 2)')))" ), tr( "'Point (4 0)'" ), tr( "") )
2188  )
2189  )
2190  );
2191 
2192  gFunctionHelpTexts.insert( "strpos",
2193  Help( "strpos", tr( "function" ), tr( "Return the first matching position of a substring within another string, or -1 if the substring is not found." ),
2195  << HelpVariant( tr( "strpos" ), tr( "Return the first matching position of a substring within another string, or -1 if the substring is not found." ),
2196  QList<HelpArg>()
2197  << HelpArg( tr( "haystack" ), tr( "string that is to be searched" ), false, false )
2198  << HelpArg( tr( "needle" ), tr( "string to search for" ), false, false ),
2199  /* variableLenArguments */ false,
2201  << HelpExample( tr( "strpos('HELLO WORLD','WORLD')" ), tr( "6" ), tr( "") )
2202  << HelpExample( tr( "strpos('HELLO WORLD','GOODBYE')" ), tr( "-1" ), tr( "") )
2203  )
2204  )
2205  );
2206 
2207  gFunctionHelpTexts.insert( "substr",
2208  Help( "substr", tr( "function" ), tr( "Returns a part of a string." ),
2210  << HelpVariant( tr( "substr" ), tr( "Returns a part of a string." ),
2211  QList<HelpArg>()
2212  << HelpArg( tr( "input_string" ), tr( "the full input string" ), false, false )
2213  << HelpArg( tr( "startpos" ), tr( "integer representing start position to extract from" ), false, false )
2214  << HelpArg( tr( "length" ), tr( "integer representing length of string to extract" ), false, false ),
2215  /* variableLenArguments */ false,
2217  << HelpExample( tr( "substr('HELLO WORLD',3,5)" ), tr( "'LLO W'" ), tr( "") )
2218  )
2219  )
2220  );
2221 
2222  gFunctionHelpTexts.insert( "sym_difference",
2223  Help( "sym_difference", tr( "function" ), tr( "Returns a geometry that represents the portions of two geometries that do not intersect." ),
2225  << HelpVariant( tr( "sym_difference" ), tr( "Returns a geometry that represents the portions of two geometries that do not intersect." ),
2226  QList<HelpArg>()
2227  << HelpArg( tr( "geometry1" ), tr( "a geometry" ), false, false )
2228  << HelpArg( tr( "geometry2" ), tr( "a geometry" ), false, false ),
2229  /* variableLenArguments */ false,
2231  << HelpExample( tr( "geom_to_wkt( sym_difference( geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ), geom_from_wkt( 'LINESTRING(3 3, 8 8)' ) ) )" ), tr( "LINESTRING(5 5, 8 8)" ), tr( "") )
2232  )
2233  )
2234  );
2235 
2236  gFunctionHelpTexts.insert( "tan",
2237  Help( "tan", tr( "function" ), tr( "Returns the tangent of an angle." ),
2239  << HelpVariant( tr( "tan" ), tr( "Returns the tangent of an angle." ),
2240  QList<HelpArg>()
2241  << HelpArg( tr( "angle" ), tr( "angle in radians" ), false, false ),
2242  /* variableLenArguments */ false,
2244  << HelpExample( tr( "tan(1.0)" ), tr( "1.5574077246549" ), tr( "") )
2245  )
2246  )
2247  );
2248 
2249  gFunctionHelpTexts.insert( "title",
2250  Help( "title", tr( "function" ), tr( "Converts all words of a string to title case (all words lower case with leading capital letter)." ),
2252  << HelpVariant( tr( "title" ), tr( "Converts all words of a string to title case (all words lower case with leading capital letter)." ),
2253  QList<HelpArg>()
2254  << HelpArg( tr( "string" ), tr( "the string to convert to title case" ), false, false ),
2255  /* variableLenArguments */ false,
2257  << HelpExample( tr( "title('hello WOrld')" ), tr( "'Hello World'" ), tr( "") )
2258  )
2259  )
2260  );
2261 
2262  gFunctionHelpTexts.insert( "to_date",
2263  Help( "to_date", tr( "function" ), tr( "Convert a string into a date object." ),
2265  << HelpVariant( tr( "to_date" ), tr( "Convert a string into a date object." ),
2266  QList<HelpArg>()
2267  << HelpArg( tr( "string" ), tr( "string representing a date value" ), false, false ),
2268  /* variableLenArguments */ false,
2270  << HelpExample( tr( "to_date('2012-05-04')" ), tr( "2012-05-04" ), tr( "") )
2271  )
2272  )
2273  );
2274 
2275  gFunctionHelpTexts.insert( "to_datetime",
2276  Help( "to_datetime", tr( "function" ), tr( "Convert a string into a datetime object." ),
2278  << HelpVariant( tr( "to_datetime" ), tr( "Convert a string into a datetime object." ),
2279  QList<HelpArg>()
2280  << HelpArg( tr( "string" ), tr( "string representing a datetime value" ), false, false ),
2281  /* variableLenArguments */ false,
2283  << HelpExample( tr( "to_datetime('2012-05-04 12:50:00')" ), tr( "2012-05-04T12:50:00" ), tr( "") )
2284  )
2285  )
2286  );
2287 
2288  gFunctionHelpTexts.insert( "to_int",
2289  Help( "to_int", tr( "function" ), tr( "Converts a string to integer number. Nothing is returned if a value cannot be converted to integer (e.g '123asd' is invalid)." ),
2291  << HelpVariant( tr( "to_int" ), tr( "Converts a string to integer number. Nothing is returned if a value cannot be converted to integer (e.g '123asd' is invalid)." ),
2292  QList<HelpArg>()
2293  << HelpArg( tr( "string" ), tr( "string to convert to integer number" ), false, false ),
2294  /* variableLenArguments */ false,
2296  << HelpExample( tr( "to_int('123')" ), tr( "123" ), tr( "") )
2297  )
2298  )
2299  );
2300 
2301  gFunctionHelpTexts.insert( "to_interval",
2302  Help( "to_interval", tr( "function" ), tr( "Converts a string to a interval type. Can be used to take days, hours, month, etc of a date." ),
2304  << HelpVariant( tr( "to_interval" ), tr( "Converts a string to a interval type. Can be used to take days, hours, month, etc of a date." ),
2305  QList<HelpArg>()
2306  << HelpArg( tr( "string" ), tr( "a string representing an interval. Allowable formats include {n} days {n} hours {n} months." ), false, false ),
2307  /* variableLenArguments */ false,
2309  << HelpExample( tr( "to_datetime('2012-05-05 12:00:00') - to_interval('1 day 2 hours')" ), tr( "2012-05-04T10:00:00" ), tr( "") )
2310  )
2311  )
2312  );
2313 
2314  gFunctionHelpTexts.insert( "to_real",
2315  Help( "to_real", tr( "function" ), tr( "Converts a string to a real number. Nothing is returned if a value cannot be converted to real (e.g '123.56asd' is invalid). Numbers are rounded after saving changes if the precision is smaller than the result of the conversion." ),
2317  << HelpVariant( tr( "to_real" ), tr( "Converts a string to a real number. Nothing is returned if a value cannot be converted to real (e.g '123.56asd' is invalid). Numbers are rounded after saving changes if the precision is smaller than the result of the conversion." ),
2318  QList<HelpArg>()
2319  << HelpArg( tr( "string" ), tr( "string to convert to real number" ), false, false ),
2320  /* variableLenArguments */ false,
2322  << HelpExample( tr( "to_real('123.45')" ), tr( "123.45" ), tr( "") )
2323  )
2324  )
2325  );
2326 
2327  gFunctionHelpTexts.insert( "to_string",
2328  Help( "to_string", tr( "function" ), tr( "Converts a number to string." ),
2330  << HelpVariant( tr( "to_string" ), tr( "Converts a number to string." ),
2331  QList<HelpArg>()
2332  << HelpArg( tr( "number" ), tr( "Integer or real value. The number to convert to string." ), false, false ),
2333  /* variableLenArguments */ false,
2335  << HelpExample( tr( "to_string(123)" ), tr( "'123'" ), tr( "") )
2336  )
2337  )
2338  );
2339 
2340  gFunctionHelpTexts.insert( "to_time",
2341  Help( "to_time", tr( "function" ), tr( "Convert a string into a time object." ),
2343  << HelpVariant( tr( "to_time" ), tr( "Convert a string into a time object." ),
2344  QList<HelpArg>()
2345  << HelpArg( tr( "string" ), tr( "string representing a time value" ), false, false ),
2346  /* variableLenArguments */ false,
2348  << HelpExample( tr( "to_time('12:30:01')" ), tr( "12:30:01" ), tr( "") )
2349  )
2350  )
2351  );
2352 
2353  gFunctionHelpTexts.insert( "touches",
2354  Help( "touches", tr( "function" ), tr( "Tests whether a geometry touches another. Returns true if the geometries have at least one point in common, but their interiors do not intersect." ),
2356  << HelpVariant( tr( "touches" ), tr( "Tests whether a geometry touches another. Returns true if the geometries have at least one point in common, but their interiors do not intersect." ),
2357  QList<HelpArg>()
2358  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
2359  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
2360  /* variableLenArguments */ false,
2362  << HelpExample( tr( "touches( geom_from_wkt( 'LINESTRING(5 3, 4 4)' ), geom_from_wkt( 'LINESTRING(3 3, 4 4, 5 5)' ) )" ), tr( "true" ), tr( "") )
2363  << HelpExample( tr( "touches( geom_from_wkt( 'POINT(4 4)' ), geom_from_wkt( 'POINT(5 5)' ) )" ), tr( "false" ), tr( "") )
2364  )
2365  )
2366  );
2367 
2368  gFunctionHelpTexts.insert( "transform",
2369  Help( "transform", tr( "function" ), tr( "Returns the geometry transformed from a source CRS to a destination CRS." ),
2371  << HelpVariant( tr( "transform" ), tr( "Returns the geometry transformed from a source CRS to a destination CRS." ),
2372  QList<HelpArg>()
2373  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false )
2374  << HelpArg( tr( "source_auth_id" ), tr( "the source auth CRS ID" ), false, false )
2375  << HelpArg( tr( "dest_auth_id" ), tr( "the destination auth CRS ID" ), false, false ),
2376  /* variableLenArguments */ false,
2378  << HelpExample( tr( "geom_to_wkt( transform( $geometry, 'EPSG:2154', 'EPSG:4326' ) )" ), tr( "POINT(0 51)" ), tr( "") )
2379  )
2380  )
2381  );
2382 
2383  gFunctionHelpTexts.insert( "trim",
2384  Help( "trim", tr( "function" ), tr( "Removes all leading and trailing whitespace (spaces, tabs, etc) from a string." ),
2386  << HelpVariant( tr( "trim" ), tr( "Removes all leading and trailing whitespace (spaces, tabs, etc) from a string." ),
2387  QList<HelpArg>()
2388  << HelpArg( tr( "string" ), tr( "string to trim" ), false, false ),
2389  /* variableLenArguments */ false,
2391  << HelpExample( tr( "trim(' hello world ')" ), tr( "'hello world'" ), tr( "") )
2392  )
2393  )
2394  );
2395 
2396  gFunctionHelpTexts.insert( "union",
2397  Help( "union", tr( "function" ), tr( "Returns a geometry that represents the point set union of the geometries." ),
2399  << HelpVariant( tr( "union" ), tr( "Returns a geometry that represents the point set union of the geometries." ),
2400  QList<HelpArg>()
2401  << HelpArg( tr( "geometry1" ), tr( "a geometry" ), false, false )
2402  << HelpArg( tr( "geometry2" ), tr( "a geometry" ), false, false ),
2403  /* variableLenArguments */ false,
2405  << HelpExample( tr( "geom_to_wkt( union( geom_from_wkt( 'POINT(4 4)' ), geom_from_wkt( 'POINT(5 5)' ) ) )" ), tr( "MULTIPOINT(4 4, 5 5)" ), tr( "") )
2406  )
2407  )
2408  );
2409 
2410  gFunctionHelpTexts.insert( "upper",
2411  Help( "upper", tr( "function" ), tr( "Converts a string to upper case letters." ),
2413  << HelpVariant( tr( "upper" ), tr( "Converts a string to upper case letters." ),
2414  QList<HelpArg>()
2415  << HelpArg( tr( "string" ), tr( "the string to convert to upper case" ), false, false ),
2416  /* variableLenArguments */ false,
2418  << HelpExample( tr( "upper('hello WOrld')" ), tr( "'HELLO WORLD'" ), tr( "") )
2419  )
2420  )
2421  );
2422 
2423  gFunctionHelpTexts.insert( "uuid",
2424  Help( "uuid", tr( "function" ), tr( "Generates a Universally Unique Identifier (UUID) for each row using the Qt <a href='http://qt-project.org/doc/qt-4.8/quuid.html#createUuid'>QUuid::createUuid</a> method. Each UUID is 38 characters long." ),
2426  << HelpVariant( tr( "uuid" ), tr( "Generates a Universally Unique Identifier (UUID) for each row using the Qt <a href='http://qt-project.org/doc/qt-4.8/quuid.html#createUuid'>QUuid::createUuid</a> method. Each UUID is 38 characters long." ),
2427  QList<HelpArg>(),
2428  /* variableLenArguments */ false,
2430  << HelpExample( tr( "uuid()" ), tr( "'{0bd2f60f-f157-4a6d-96af-d4ba4cb366a1}'" ), tr( "") )
2431  )
2432  )
2433  );
2434 
2435  gFunctionHelpTexts.insert( "var",
2436  Help( "var", tr( "function" ), tr( "Returns the value stored within a specified variable." ),
2438  << HelpVariant( tr( "var" ), tr( "Returns the value stored within a specified variable." ),
2439  QList<HelpArg>()
2440  << HelpArg( tr( "name" ), tr( "a variable name" ), false, false ),
2441  /* variableLenArguments */ false,
2443  << HelpExample( tr( "var('qgis_version')" ), tr( "'2.12'" ), tr( "") )
2444  )
2445  )
2446  );
2447 
2448  gFunctionHelpTexts.insert( "week",
2449  Help( "week", tr( "function" ), tr( "Extract the week number from a date, or the number of weeks from an interval." ),
2451  << HelpVariant( tr( "Date variant" ), tr( "Extract the week number from a date or datetime." ),
2452  QList<HelpArg>()
2453  << HelpArg( tr( "date" ), tr( "a date or datetime value" ), false, false ),
2454  /* variableLenArguments */ false,
2456  << HelpExample( tr( "week('2012-05-12')" ), tr( "19" ), tr( "") )
2457  )
2458  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in weeks of an interval." ),
2459  QList<HelpArg>()
2460  << HelpArg( tr( "interval" ), tr( "interval value to return number of months from" ), false, false ),
2461  /* variableLenArguments */ false,
2463  << HelpExample( tr( "week(tointerval('3 weeks'))" ), tr( "3" ), tr( "") )
2464  << HelpExample( tr( "week(age('2012-01-01','2010-01-01'))" ), tr( "104.285" ), tr( "") )
2465  )
2466  )
2467  );
2468 
2469  gFunctionHelpTexts.insert( "within",
2470  Help( "within", tr( "function" ), tr( "Tests whether a geometry is within another. Returns true if the geometry a is completely within geometry b." ),
2472  << HelpVariant( tr( "within" ), tr( "Tests whether a geometry is within another. Returns true if the geometry a is completely within geometry b." ),
2473  QList<HelpArg>()
2474  << HelpArg( tr( "geometry a" ), tr( "a geometry" ), false, false )
2475  << HelpArg( tr( "geometry b" ), tr( "a geometry" ), false, false ),
2476  /* variableLenArguments */ false,
2478  << HelpExample( tr( "within( geom_from_wkt( 'POINT( 0.5 0.5)' ), geom_from_wkt( 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))' ) )" ), tr( "true" ), tr( "") )
2479  << HelpExample( tr( "within( geom_from_wkt( 'POINT( 5 5 )' ), geom_from_wkt( 'POLYGON((0 0, 0 1, 1 1, 1 0, 0 0 ))' ) )" ), tr( "false" ), tr( "") )
2480  )
2481  )
2482  );
2483 
2484  gFunctionHelpTexts.insert( "wordwrap",
2485  Help( "wordwrap", tr( "function" ), tr( "Returns a string wrapped to a maximum/minimum number of characters." ),
2487  << HelpVariant( tr( "wordwrap" ), tr( "Returns a string wrapped to a maximum/minimum number of characters." ),
2488  QList<HelpArg>()
2489  << HelpArg( tr( "string" ), tr( "the string to be wrapped" ), false, false )
2490  << HelpArg( tr( "wrap_length" ), tr( "an integer. If wrap_length is positive the number represents the ideal maximum number of characters to wrap; if negative, the number represents the minimum number of characters to wrap." ), false, false )
2491  << HelpArg( tr( "delimiter_string" ), tr( "the delimiter string to wrap to a new line (optional)." ), false, false ),
2492  /* variableLenArguments */ false,
2494  << HelpExample( tr( "wordwrap('UNIVERSITY OF QGIS',13)" ), tr( "'UNIVERSITY OF\nQGIS'" ), tr( "") )
2495  << HelpExample( tr( "wordwrap('UNIVERSITY OF QGIS',-3)" ), tr( "'UNIVERSITY\nOF QGIS'" ), tr( "") )
2496  )
2497  )
2498  );
2499 
2500  gFunctionHelpTexts.insert( "x",
2501  Help( "x", tr( "function" ), tr( "Returns the x coordinate of a point geometry, or the x-coordinate of the centroid for a non-point geometry." ),
2503  << HelpVariant( tr( "x" ), tr( "Returns the x coordinate of a point geometry, or the x-coordinate of the centroid for a non-point geometry." ),
2504  QList<HelpArg>()
2505  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
2506  /* variableLenArguments */ false,
2508  << HelpExample( tr( "x( geom_from_wkt( 'POINT(2 5)' ) )" ), tr( "2" ), tr( "") )
2509  )
2510  )
2511  );
2512 
2513  gFunctionHelpTexts.insert( "x_max",
2514  Help( "x_max", tr( "function" ), tr( "Returns the maximum x coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2516  << HelpVariant( tr( "x_max" ), tr( "Returns the maximum x coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2517  QList<HelpArg>()
2518  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
2519  /* variableLenArguments */ false,
2521  << HelpExample( tr( "x_max( geom_from_wkt( 'LINESTRING(2 5, 3 6, 4 8)') )" ), tr( "4" ), tr( "") )
2522  )
2523  )
2524  );
2525 
2526  gFunctionHelpTexts.insert( "x_min",
2527  Help( "x_min", tr( "function" ), tr( "Returns the minimum x coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2529  << HelpVariant( tr( "x_min" ), tr( "Returns the minimum x coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2530  QList<HelpArg>()
2531  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
2532  /* variableLenArguments */ false,
2534  << HelpExample( tr( "x_min( geom_from_wkt( 'LINESTRING(2 5, 3 6, 4 8)') )" ), tr( "2" ), tr( "") )
2535  )
2536  )
2537  );
2538 
2539  gFunctionHelpTexts.insert( "y",
2540  Help( "y", tr( "function" ), tr( "Returns the y coordinate of a point geometry, or the y-coordinate of the centroid for a non-point geometry." ),
2542  << HelpVariant( tr( "y" ), tr( "Returns the y coordinate of a point geometry, or the y-coordinate of the centroid for a non-point geometry." ),
2543  QList<HelpArg>()
2544  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
2545  /* variableLenArguments */ false,
2547  << HelpExample( tr( "y( geom_from_wkt( 'POINT(2 5)' ) )" ), tr( "5" ), tr( "") )
2548  )
2549  )
2550  );
2551 
2552  gFunctionHelpTexts.insert( "y_max",
2553  Help( "y_max", tr( "function" ), tr( "Returns the maximum y coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2555  << HelpVariant( tr( "y_max" ), tr( "Returns the maximum y coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2556  QList<HelpArg>()
2557  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
2558  /* variableLenArguments */ false,
2560  << HelpExample( tr( "y_max( geom_from_wkt( 'LINESTRING(2 5, 3 6, 4 8)') )" ), tr( "8" ), tr( "") )
2561  )
2562  )
2563  );
2564 
2565  gFunctionHelpTexts.insert( "y_min",
2566  Help( "y_min", tr( "function" ), tr( "Returns the minimum y coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2568  << HelpVariant( tr( "y_min" ), tr( "Returns the minimum y coordinate of a geometry. Calculations are in the spatial reference system of this geometry." ),
2569  QList<HelpArg>()
2570  << HelpArg( tr( "geom" ), tr( "a geometry" ), false, false ),
2571  /* variableLenArguments */ false,
2573  << HelpExample( tr( "y_min( geom_from_wkt( 'LINESTRING(2 5, 3 6, 4 8)') )" ), tr( "5" ), tr( "") )
2574  )
2575  )
2576  );
2577 
2578  gFunctionHelpTexts.insert( "year",
2579  Help( "year", tr( "function" ), tr( "Extract the year part from a date, or the number of years from an interval." ),
2581  << HelpVariant( tr( "Date variant" ), tr( "Extract the year part from a date or datetime." ),
2582  QList<HelpArg>()
2583  << HelpArg( tr( "date" ), tr( "a date or datetime value" ), false, false ),
2584  /* variableLenArguments */ false,
2586  << HelpExample( tr( "year('2012-05-12')" ), tr( "2012" ), tr( "") )
2587  )
2588  << HelpVariant( tr( "Interval variant" ), tr( "Calculate the length in years of an interval." ),
2589  QList<HelpArg>()
2590  << HelpArg( tr( "interval" ), tr( "interval value to return number of years from" ), false, false ),
2591  /* variableLenArguments */ false,
2593  << HelpExample( tr( "year(to_interval('3 years'))" ), tr( "3" ), tr( "") )
2594  << HelpExample( tr( "year(age('2012-01-01','2010-01-01'))" ), tr( "1.9986" ), tr( "") )
2595  )
2596  )
2597  );
2598 }
static QHash< QString, Help > gFunctionHelpTexts
static void initFunctionHelp()
#define tr(sourceText)