QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsexpression_texts.cpp
Go to the documentation of this file.
1 #include "qgsexpression.h"
2 #include <QCoreApplication>
3 
4 QHash<QString, QString> QgsExpression::gFunctionHelpTexts;
5 
7 {
8  if( !gFunctionHelpTexts.isEmpty() )
9  return;
10 
11  gFunctionHelpTexts.insert( "$area", QCoreApplication::translate( "function_help", "<h3>$area function</h3>\n"
12 "Returns the area size of the current feature.\n"
13 "\n"
14 "<h4>Syntax</h4>\n"
15 "<pre>$area</pre>\n"
16 "\n"
17 "<h4>Arguments</h4>\n"
18 "None\n"
19 "\n"
20 "<h4>Example</h4>\n"
21 "<pre>$area &rarr; 42</pre>\n"
22 "\n"
23 "") );
24  gFunctionHelpTexts.insert( "$atlasfeature", QCoreApplication::translate( "function_help", "<h3>$atlasfeature function</h3>\n"
25 "In atlas generation, returns the current feature that is iterated over on the coverage layer. This can be used with the 'attribute' function\n"
26 "to return attribute values from the current atlas feature.\n"
27 "\n"
28 "<h4>Syntax</h4>\n"
29 "<pre>$atlasfeature</pre>\n"
30 "\n"
31 "<h4>Arguments</h4>\n"
32 "None\n"
33 "\n"
34 "<h4>Example</h4>\n"
35 "<pre>attribute( $atlasfeature, 'name' ) &rarr; returns value stored in 'name' attribute for the current atlas feature</pre>\n"
36 "\n"
37 "") );
38  gFunctionHelpTexts.insert( "$atlasfeatureid", QCoreApplication::translate( "function_help", "<h3>$atlasfeatureid function</h3>\n"
39 "Returns the feature id of the current row while using atlas.\n"
40 "This enables you to use features of atlas in rules \n"
41 "and for example show or hide features based on their id.\n"
42 "\n"
43 "<h4>Syntax</h4>\n"
44 "<pre>$atlasfeatureid</pre>\n"
45 "\n"
46 "<h4>Arguments</h4>\n"
47 "None\n"
48 "\n"
49 "<h4>Example</h4>\n"
50 "<pre>$atlasfeatureid = $id</pre>\n"
51 "\n"
52 "") );
53  gFunctionHelpTexts.insert( "$atlasgeometry", QCoreApplication::translate( "function_help", "<h3>$atlasgeometry function</h3>\n"
54 "Returns the geometry of the current feature iterated in atlas.\n"
55 "Can be used for rule based display of geometry when using atlas.\n"
56 "For example to only show geometries of other layers when their geometry \n"
57 "intersects the iterated geometry of features using atlas.\n"
58 "\n"
59 "<h4>Syntax</h4>\n"
60 "<pre>$atlasgeometry</pre>\n"
61 "\n"
62 "<h4>Arguments</h4>\n"
63 "None\n"
64 "\n"
65 "<h4>Example</h4>\n"
66 "<pre> intersects( $atlasgeometry, $geometry ) </pre>\n"
67 "\n"
68 "") );
69  gFunctionHelpTexts.insert( "$currentfeature", QCoreApplication::translate( "function_help", "<h3>$currentfeature function</h3>\n"
70 "Returns the current feature being evaluated. This can be used with the 'attribute' function\n"
71 "to evaluate attribute values from the current feature.\n"
72 "\n"
73 "<h4>Syntax</h4>\n"
74 "<pre>$currentfeature</pre>\n"
75 "\n"
76 "<h4>Arguments</h4>\n"
77 "None\n"
78 "\n"
79 "<h4>Example</h4>\n"
80 "<pre>attribute( $currentfeature, 'name' ) &rarr; returns value stored in 'name' attribute for the current feature</pre>\n"
81 "\n"
82 "") );
83  gFunctionHelpTexts.insert( "$feature", QCoreApplication::translate( "function_help", "<h3>$feature function</h3>\n"
84 "In atlas generation, returns the current feature number that is iterated over on the coverage layer.\n"
85 "\n"
86 "<h4>Syntax</h4>\n"
87 "<pre>$feature</pre>\n"
88 "\n"
89 "<h4>Arguments</h4>\n"
90 "None\n"
91 "\n"
92 "<h4>Example</h4>\n"
93 "<pre>$feature &rarr; 2</pre>\n"
94 "\n"
95 "") );
96  gFunctionHelpTexts.insert( "$geometry", QCoreApplication::translate( "function_help", "<h3>$geometry function</h3>\n"
97 "Returns the geometry of the current feature. Can be used for processing with other functions.\n"
98 "\n"
99 "<h4>Syntax</h4>\n"
100 "<pre>$geometry</pre>\n"
101 "\n"
102 "<h4>Arguments</h4>\n"
103 "None\n"
104 "\n"
105 "<h4>Example</h4>\n"
106 "<pre> geomToWKT( $geometry ) &rarr; POINT(6 50)</pre>\n"
107 "\n"
108 "") );
109  gFunctionHelpTexts.insert( "$id", QCoreApplication::translate( "function_help", "<h3>$id function</h3>\n"
110 "Returns the feature id of the current row.\n"
111 "\n"
112 "<h4>Syntax</h4>\n"
113 "<pre>$id</pre>\n"
114 "\n"
115 "<h4>Arguments</h4>\n"
116 "None\n"
117 "\n"
118 "<h4>Example</h4>\n"
119 "<pre>$id &rarr; 42</pre>\n"
120 "\n"
121 "") );
122  gFunctionHelpTexts.insert( "$length", QCoreApplication::translate( "function_help", "<h3>$length function</h3>\n"
123 "Returns the length of the current feature.\n"
124 "\n"
125 "<h4>Syntax</h4>\n"
126 "<pre>$length</pre>\n"
127 "\n"
128 "<h4>Arguments</h4>\n"
129 "None\n"
130 "\n"
131 "<h4>Example</h4>\n"
132 "<pre>$length &rarr; 42.4711</pre>\n"
133 "") );
134  gFunctionHelpTexts.insert( "$map", QCoreApplication::translate( "function_help", "<h3>$map function</h3>\n"
135 "Returns the id of the current map item if the map is being drawn in a composition, or \"canvas\" if the map is being\n"
136 "drawn within the main QGIS window.\n"
137 "\n"
138 "<h4>Syntax</h4>\n"
139 "<pre>$map</pre>\n"
140 "\n"
141 "<h4>Arguments</h4>\n"
142 "None\n"
143 "\n"
144 "<h4>Example</h4>\n"
145 "<!-- Show example of function.-->\n"
146 "<pre>$map &rarr; \"overview_map\" (within a composer item)<br />\n"
147 "$map &rarr; \"canvas\" (within the main QGIS main canvas)</pre>\n"
148 "\n"
149 "\n"
150 "") );
151  gFunctionHelpTexts.insert( "$now", QCoreApplication::translate( "function_help", "<h3>$now function</h3>\n"
152 "Returns the current date and time\n"
153 "\n"
154 "<h4>Syntax</h4>\n"
155 "<pre>$now</pre>\n"
156 "\n"
157 "<h4>Arguments</h4>\n"
158 "None\n"
159 "\n"
160 "<h4>Example</h4>\n"
161 "<pre>$now &rarr; 2012-07-22T13:24:57</pre>\n"
162 "\n"
163 "") );
164  gFunctionHelpTexts.insert( "$numfeatures", QCoreApplication::translate( "function_help", "<h3>$numfeatures function</h3>\n"
165 "In atlas generation, returns the total number of features within the coverage layer.\n"
166 "\n"
167 "<h4>Syntax</h4>\n"
168 "<pre>$numfeatures</pre>\n"
169 "\n"
170 "<h4>Arguments</h4>\n"
171 "None\n"
172 "\n"
173 "<h4>Example</h4>\n"
174 "<pre>$numfeatures &rarr; 42</pre>\n"
175 "\n"
176 "") );
177  gFunctionHelpTexts.insert( "$numpages", QCoreApplication::translate( "function_help", "<h3>$numpages function</h3>\n"
178 "Returns the total number of pages in the composition.\n"
179 "\n"
180 "<h4>Syntax</h4>\n"
181 "<pre>$numpages</pre>\n"
182 "\n"
183 "<h4>Arguments</h4>\n"
184 "None\n"
185 "\n"
186 "<h4>Example</h4>\n"
187 "<pre>$numpages &rarr; 42</pre>\n"
188 "\n"
189 "") );
190  gFunctionHelpTexts.insert( "$page", QCoreApplication::translate( "function_help", "<h3>$page function</h3>\n"
191 "Returns the current page number within a composition.\n"
192 "\n"
193 "<h4>Syntax</h4>\n"
194 "<pre>$page</pre>\n"
195 "\n"
196 "<h4>Arguments</h4>\n"
197 "None\n"
198 "\n"
199 "<h4>Example</h4>\n"
200 "<pre>$page &rarr; 2</pre>\n"
201 "\n"
202 "") );
203  gFunctionHelpTexts.insert( "$perimeter", QCoreApplication::translate( "function_help", "<h3>$perimeter function</h3>\n"
204 "Returns the perimeter length of the current feature.\n"
205 "\n"
206 "<h4>Syntax</h4>\n"
207 "<pre>$perimeter</pre>\n"
208 "\n"
209 "<h4>Arguments</h4>\n"
210 "None\n"
211 "\n"
212 "<h4>Example</h4>\n"
213 "<pre>$perimeter &rarr; 42</pre>\n"
214 "\n"
215 "") );
216  gFunctionHelpTexts.insert( "$pi", QCoreApplication::translate( "function_help", "<h3>$pi constant</h3>\n"
217 "Returns pi as value for calculations\n"
218 "\n"
219 "<h4>Syntax</h4>\n"
220 "<pre>$pi</pre>\n"
221 "\n"
222 "<h4>Arguments</h4>\n"
223 "None\n"
224 "\n"
225 "<h4>Example</h4>\n"
226 "<pre>$pi &rarr; 3.14159265358979</pre>\n"
227 "") );
228  gFunctionHelpTexts.insert( "$rownum", QCoreApplication::translate( "function_help", "<h3>$rownum function</h3>\n"
229 "Returns the number of the current row.\n"
230 "\n"
231 "<h4>Syntax</h4>\n"
232 "<pre>$rownum</pre>\n"
233 "\n"
234 "<h4>Arguments</h4>\n"
235 "None\n"
236 "\n"
237 "<h4>Example</h4>\n"
238 "<pre>$rownum &rarr; 4711</pre>\n"
239 "\n"
240 "") );
241  gFunctionHelpTexts.insert( "$scale", QCoreApplication::translate( "function_help", "<h3>$scale function</h3>\n"
242 "Returns the current scale of the map canvas.\n"
243 "<br>\n"
244 "Note: This function is only available in some contexts and will be 0 otherwise. \n"
245 "<h4>Syntax</h4>\n"
246 "<code>$scale</code><br>\n"
247 "\n"
248 "<h4>Example</h4>\n"
249 "<!-- Show example of function.-->\n"
250 "<code>$scale &rarr; 10000</code><br>\n"
251 "\n"
252 "\n"
253 "") );
254  gFunctionHelpTexts.insert( "$uuid", QCoreApplication::translate( "function_help", "<h3>$uuid function</h3>\n"
255 "Generates a Universally Unique Identifier (UUID) for each row using the Qt\n"
256 "<a href='http://qt-project.org/doc/qt-4.8/quuid.html#createUuid'>QUuid::createUuid</a>\n"
257 "method. Each UUID is 38 characters long.\n"
258 "\n"
259 "<h4>Syntax</h4>\n"
260 "<pre>$uuid</pre>\n"
261 "\n"
262 "<h4>Arguments</h4>\n"
263 "None\n"
264 "\n"
265 "<h4>Example</h4>\n"
266 "<pre>$uuid &rarr; {0bd2f60f-f157-4a6d-96af-d4ba4cb366a1}</pre>\n"
267 "") );
268  gFunctionHelpTexts.insert( "$x", QCoreApplication::translate( "function_help", "<h3>$x function</h3>\n"
269 "Returns the x coordinate of the current feature.\n"
270 "\n"
271 "<h4>Syntax</h4>\n"
272 "<pre>$x</pre>\n"
273 "\n"
274 "<h4>Arguments</h4>\n"
275 "None\n"
276 "\n"
277 "<h4>Example</h4>\n"
278 "<pre>$x &rarr; 42</pre>\n"
279 "\n"
280 "") );
281  gFunctionHelpTexts.insert( "$y", QCoreApplication::translate( "function_help", "<h3>$y function</h3>\n"
282 "Returns the y coordinate of the current feature.\n"
283 "\n"
284 "<h4>Syntax</h4>\n"
285 "<pre>$y</pre>\n"
286 "\n"
287 "<h4>Arguments</h4>\n"
288 "None\n"
289 "\n"
290 "<h4>Example</h4>\n"
291 "<pre>$y &rarr; 42</pre>\n"
292 "\n"
293 "") );
294  gFunctionHelpTexts.insert( "AND", QCoreApplication::translate( "function_help", "<h3>AND logical operator</h3>\n"
295 "Returns 1 when condition a and b are true.\n"
296 "\n"
297 "<h4>Syntax</h4>\n"
298 "<pre> condition a AND condition b </pre>\n"
299 "\n"
300 "<h4>Arguments</h4>\n"
301 "None\n"
302 "\n"
303 "<h4>Example</h4>\n"
304 "<pre> 4 = 2+2 AND 1 = 1 &rarr; returns 1 </pre>\n"
305 "<pre> 4 = 2+2 AND 1 = 2 &rarr; returns 0 </pre>\n"
306 "\n"
307 "") );
308  gFunctionHelpTexts.insert( "CASE", QCoreApplication::translate( "function_help", "<h3>CASE expression</h3>\n"
309 "A conditional expression that can be used to evaluate multiple expressions and\n"
310 "return a result.\n"
311 "\n"
312 "<h4>Syntax</h4>\n"
313 "<pre>\n"
314 " CASE\n"
315 " WHEN <i>condition</i> THEN <i>result</i>\n"
316 " [ ...n ]\n"
317 " [ ELSE <i>result</i> ]\n"
318 " END\n"
319 "</pre>\n"
320 "[ ] marks optional components\n"
321 "\n"
322 "<h4>Arguments</h4>\n"
323 "<!-- List args for functions here-->\n"
324 "<i> WHEN condition</i> - The condition expression to evaluate. <br>\n"
325 "<i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br>\n"
326 "<i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br>\n"
327 "\n"
328 "<h4>Example</h4>\n"
329 "<!-- Show example of function.-->\n"
330 "<pre>\n"
331 " CASE\n"
332 " WHEN <i>\"column\" IS NULL</i> THEN <i>'None'</i>\n"
333 " END\n"
334 "</pre>\n"
335 "") );
336  gFunctionHelpTexts.insert( "CASE ELSE", QCoreApplication::translate( "function_help", "<h3>CASE expression</h3>\n"
337 "A conditional expression that can be used to evaluate multiple expressions and\n"
338 "return a result.\n"
339 "\n"
340 "<h4>Syntax</h4>\n"
341 "<pre>\n"
342 " CASE\n"
343 " WHEN <i>condition</i> THEN <i>result</i>\n"
344 " [ ...n ]\n"
345 " [ ELSE <i>result</i> ]\n"
346 " END\n"
347 "</pre>\n"
348 "[ ] marks optional components\n"
349 "\n"
350 "<h4>Arguments</h4>\n"
351 "<!-- List args for functions here-->\n"
352 "<i> WHEN condition</i> - The condition expression to evaluate. <br>\n"
353 "<i> THEN result</i> - If <i>condition</i> evaluates to True then <i>result</i> is evaluated and returned. <br>\n"
354 "<i> ELSE result</i> - If none of the above conditions evaluated to True then <i>result</i> is evaluated and returned. <br>\n"
355 "\n"
356 "<h4>Example</h4>\n"
357 "<!-- Show example of function.-->\n"
358 "<pre>\n"
359 " CASE\n"
360 " WHEN <i>\"column\" IS NULL</i> THEN <i>'None'</i>\n"
361 " ELSE <i>\"column\"</i>\n"
362 " END\n"
363 "</pre>\n"
364 "") );
365  gFunctionHelpTexts.insert( "Color", QCoreApplication::translate( "function_help", "\n"
366 "<h3>Color Group</h3>\n"
367 "This group contains functions for manipulating colors\n"
368 "") );
369  gFunctionHelpTexts.insert( "Conditionals", QCoreApplication::translate( "function_help", "<h3>Conditionals Group</h3>\n"
370 "This group contains functions to handle conditional checks in expressions.\n"
371 "") );
372  gFunctionHelpTexts.insert( "Conditions", QCoreApplication::translate( "function_help", "<h3>Conditions Group</h3>\n"
373 "This group contains functions that operate on condition.\n"
374 "") );
375  gFunctionHelpTexts.insert( "Conversions", QCoreApplication::translate( "function_help", "<h3>Conversions Group</h3>\n"
376 "This group contains functions to convert on data type to another e.g string to integer, integer to string.\n"
377 "") );
378  gFunctionHelpTexts.insert( "Date and Time", QCoreApplication::translate( "function_help", "<h3>Date and Time Group</h3>\n"
379 "This group contains functions for handling date and time data.\n"
380 "") );
381  gFunctionHelpTexts.insert( "Field", QCoreApplication::translate( "function_help", "<h3>Field</h3>\n"
382 "Double click to add field name to expression string.\n"
383 "<br><br>\n"
384 "Right-Click on field name to open context menu sample value loading options.\n"
385 "\n"
386 "<p><h4>Note:</h4>\n"
387 "Loading field values from WFS layers isn't supported, before the layer is\n"
388 "actually inserted, ie. when building queries.\n"
389 "</p>\n"
390 "") );
391  gFunctionHelpTexts.insert( "Fields and Values", QCoreApplication::translate( "function_help", "<h3>Fields and Values</h3>\n"
392 "Contains a list of fields from the layer. Sample values can also be accessed via right-click.\n"
393 "<br><br>\n"
394 "Select the field name from the list then right-click to access context menu with options to load sample values from the selected field.\n"
395 "\n"
396 "<p><h4>Note:</h4>\n"
397 "Loading field values from WFS layers isn't supported, before the layer is\n"
398 "actually inserted, ie. when building queries.\n"
399 "</p>\n"
400 "") );
401  gFunctionHelpTexts.insert( "GeometryGroup", QCoreApplication::translate( "function_help", "<h3>Geometry Group</h3>\n"
402 "This group contains functions that operate on geometry objects e.g length, area.\n"
403 "") );
404  gFunctionHelpTexts.insert( "ILIKE", QCoreApplication::translate( "function_help", "<h3>ILIKE expression</h3>\n"
405 "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.\n"
406 "\n"
407 "<h4>Syntax</h4>\n"
408 "<pre>string/number ILIKE pattern</pre>\n"
409 "\n"
410 "<h4>Arguments</h4>\n"
411 "None\n"
412 "\n"
413 "<h4>Example</h4>\n"
414 "<pre> 'A' ILIKE 'A' &rarr; returns 1 </pre>\n"
415 "<pre> 'A' ILIKE 'a' &rarr; returns 1 </pre>\n"
416 "<pre> 'A' ILIKE 'B' &rarr; returns 0 </pre>\n"
417 "") );
418  gFunctionHelpTexts.insert( "IN", QCoreApplication::translate( "function_help", "<h3>IN expression</h3>\n"
419 "Returns 1 if value is found within a list of values\n"
420 "\n"
421 "<h4>Syntax</h4>\n"
422 "<pre>'a' IN ('a', 'b')</pre>\n"
423 "\n"
424 "<h4>Arguments</h4>\n"
425 "None\n"
426 "\n"
427 "<h4>Example</h4>\n"
428 "<pre> 'A' IN ('A','B\") &rarr; returns 1 </pre>\n"
429 "<pre> 'A' IN ('C','B\") &rarr; returns 0 </pre>\n"
430 "\n"
431 "") );
432  gFunctionHelpTexts.insert( "IS", QCoreApplication::translate( "function_help", "<h3>IS expression</h3>\n"
433 "Returns 1 if a is the same as b.\n"
434 "\n"
435 "<h4>Syntax</h4>\n"
436 "<pre>a IS b</pre>\n"
437 "\n"
438 "<h4>Arguments</h4>\n"
439 "None\n"
440 "\n"
441 "<h4>Example</h4>\n"
442 "<pre> 'A' IS 'A' &rarr; returns 1 </pre>\n"
443 "<pre> 'A' IS 'a' &rarr; returns 0 </pre>\n"
444 "<pre> 4 IS 4 &rarr; returns 1 </pre>\n"
445 "<pre> 4 IS 2+2 &rarr; returns 1 </pre>\n"
446 "<pre> 4 IS 2 &rarr; returns 0 </pre>\n"
447 "<pre> $geometry IS NULL &rarr; returns 0, if your geometry is not NULL</pre>\n"
448 "\n"
449 "") );
450  gFunctionHelpTexts.insert( "LIKE", QCoreApplication::translate( "function_help", "<h3>LIKE expression</h3>\n"
451 "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also.\n"
452 "\n"
453 "<h4>Syntax</h4>\n"
454 "<pre>string/number LIKE pattern</pre>\n"
455 "\n"
456 "<h4>Arguments</h4>\n"
457 "None\n"
458 "\n"
459 "<h4>Example</h4>\n"
460 "<pre> 'A' LIKE 'A' &rarr; returns 1 </pre>\n"
461 "<pre> 'A' LIKE 'a' &rarr; returns 0 </pre>\n"
462 "<pre> 'A' LIKE 'B' &rarr; returns 0 </pre>\n"
463 "") );
464  gFunctionHelpTexts.insert( "Math", QCoreApplication::translate( "function_help", "<h3>Math Group</h3>\n"
465 "This group contains math functions e.g square root, sin and cos\n"
466 "") );
467  gFunctionHelpTexts.insert( "NOT", QCoreApplication::translate( "function_help", "<h3>NOT</h3>\n"
468 "Returns 1 if a is not the same as b.\n"
469 "\n"
470 "<h4>Syntax</h4>\n"
471 "<pre> a NOT b </pre>\n"
472 "\n"
473 "<h4>Arguments</h4>\n"
474 "None\n"
475 "\n"
476 "<h4>Example</h4>\n"
477 "<pre> 'a' IS NOT 'b' &rarr; returns 1 </pre>\n"
478 "<pre> 'a' IS NOT 'a' &rarr; returns 0 </pre>\n"
479 "<pre> 4 IS NOT 2+2 &rarr; returns 0 </pre>\n"
480 "\n"
481 "") );
482  gFunctionHelpTexts.insert( "OR", QCoreApplication::translate( "function_help", "<h3>OR logical operator</h3>\n"
483 "Returns 1 when condition a or b is true.\n"
484 "\n"
485 "<h4>Syntax</h4>\n"
486 "<pre> condition a OR condition b </pre>\n"
487 "\n"
488 "<h4>Arguments</h4>\n"
489 "None\n"
490 "\n"
491 "<h4>Example</h4>\n"
492 "<pre> 4 = 2+2 OR 1 = 1 &rarr; returns 1 </pre>\n"
493 "<pre> 4 = 2+2 OR 1 = 2 &rarr; returns 1 </pre>\n"
494 "<pre> 4 = 2 OR 1 = 2 &rarr; returns 0 </pre>\n"
495 "") );
496  gFunctionHelpTexts.insert( "Operators", QCoreApplication::translate( "function_help", "<h3>Operators Group</h3>\n"
497 "This group contains operators e.g + - * \n"
498 "") );
499  gFunctionHelpTexts.insert( "Record", QCoreApplication::translate( "function_help", "<h3>Record Group</h3>\n"
500 "This group contains functions that operate on record identifiers.\n"
501 "") );
502  gFunctionHelpTexts.insert( "String", QCoreApplication::translate( "function_help", "<h3>String Group</h3>\n"
503 "This group contains functions that operate on strings e.g replace, convert to upper case.\n"
504 "") );
505  gFunctionHelpTexts.insert( "abs", QCoreApplication::translate( "function_help", "<h3>abs() function</h3>\n"
506 "Returns the absolute value of a number.<br>\n"
507 "\n"
508 "\n"
509 "<h4>Syntax</h4>\n"
510 "abs(<i>value</i>)<br>\n"
511 "\n"
512 "<h4>Arguments</h4>\n"
513 "<code>value</code> - a number.<br>\n"
514 "\n"
515 "<h4>Example</h4>\n"
516 "<code>abs(-2) &rarr; 2</code><br>\n"
517 "") );
518  gFunctionHelpTexts.insert( "acos", QCoreApplication::translate( "function_help", "<h3>acos() function</h3>\n"
519 "Returns arcuscosinus of a value in radians.\n"
520 "\n"
521 "\n"
522 "<p><h4>Syntax</h4>\n"
523 " acos(<i>real</i>)</p>\n"
524 "\n"
525 "<p><h4>Arguments</h4>\n"
526 "<i>real</i> &rarr; cos of an angle.</p>\n"
527 "\n"
528 "<p><h4>Example</h4>\n"
529 " acos(0.5) &rarr; 1.0471975511966</p>\n"
530 "") );
531  gFunctionHelpTexts.insert( "age", QCoreApplication::translate( "function_help", "<h3>age() function</h3>\n"
532 "Returns the difference between two dates.\n"
533 "<br><br>\n"
534 "The difference is returned as a <code>Interval</code> \n"
535 "and needs to be used with one of the following functions\n"
536 "in order to extract useful information:\n"
537 "<ul>\n"
538 "<li><code>year</code>\n"
539 "<li><code>month</code>\n"
540 "<li><code>week</code>\n"
541 "<li><code>day</code>\n"
542 "<li><code>hour</code>\n"
543 "<li><code>minute</code>\n"
544 "<li><code>second</code>\n"
545 "</ul>\n"
546 "<h4>Syntax</h4>\n"
547 "<code>age(string,string)</code><br>\n"
548 "<code>age(datetime,datetime)</code><br>\n"
549 "<code>age(string,datetime)</code><br>\n"
550 "<code>age(datetime,string)</code><br>\n"
551 "\n"
552 "<h4>Arguments</h4>\n"
553 "<code>string</code> - is string. A string in date format.\n"
554 "<br>\n"
555 "<code>datetime</code> - is date or datetime. A date or datetime type.\n"
556 "\n"
557 "<h4>Example</h4>\n"
558 "<!-- Show example of function.-->\n"
559 "<code>age('2012-05-12','2012-05-2') &rarr; Interval</code><br>\n"
560 "use <code>day</code> to extract number of days<br>\n"
561 "<code>day(age('2012-05-12','2012-05-2')) &rarr; 10</code><br>\n"
562 "\n"
563 "") );
564  gFunctionHelpTexts.insert( "asin", QCoreApplication::translate( "function_help", "<h3>asin() function</h3>\n"
565 "Returns arcussinus of a value in radians.\n"
566 "\n"
567 "\n"
568 "<p><h4>Syntax</h4>\n"
569 " asin(<i>real</i>)</p>\n"
570 "\n"
571 "<p><h4>Arguments</h4>\n"
572 "<i>real</i> &rarr; sin of an angle.</p>\n"
573 "\n"
574 "<p><h4>Example</h4>\n"
575 " asin(1.0) &rarr; 1.5707963267949</p>\n"
576 "") );
577  gFunctionHelpTexts.insert( "atan", QCoreApplication::translate( "function_help", "<h3>atan() function</h3>\n"
578 "Returns arcustanget of a value in radians.\n"
579 "\n"
580 "\n"
581 "<p><h4>Syntax</h4>\n"
582 " atan(<i>real</i>)</p>\n"
583 "\n"
584 "<p><h4>Arguments</h4>\n"
585 "<i>real</i> &rarr; tan of an angle.</p>\n"
586 "\n"
587 "<p><h4>Example</h4>\n"
588 " atan(0.5) &rarr; 0.463647609000806</p>\n"
589 "") );
590  gFunctionHelpTexts.insert( "atan2", QCoreApplication::translate( "function_help", "<h3>atan2() function</h3>\n"
591 "Returns arcustangens of y/x using the signs of the two \n"
592 "arguments to determine the quadrant of the result\n"
593 "\n"
594 "\n"
595 "\n"
596 "<p><h4>Syntax</h4>\n"
597 " atan2(<i>real</i>, <i>real</i>)</p>\n"
598 "\n"
599 "<p><h4>Arguments</h4>\n"
600 "<i>real</i> &rarr; y coordinate difference<br>\n"
601 "<i>real</i> &rarr; x coordinate difference</p>\n"
602 "\n"
603 "<p><h4>Example</h4>\n"
604 " atan2(1.0, 1.732) &rarr; 0.523611477769969</p>\n"
605 "") );
606  gFunctionHelpTexts.insert( "attribute", QCoreApplication::translate( "function_help", "<h3>attribute function</h3>\n"
607 "Returns the value of a specified attribute from a feature.\n"
608 "\n"
609 "<h4>Syntax</h4>\n"
610 "<pre>attribute( feature, attribute_name )</pre>\n"
611 "\n"
612 "<h4>Arguments</h4>\n"
613 "feature &rarr; a feature<br />\n"
614 "attribute_name &rarr; name of attribute to be returned\n"
615 "\n"
616 "<h4>Example</h4>\n"
617 "<pre>attribute( $currentfeature, 'name' ) &rarr; returns value stored in 'name' attribute for the current feature</pre>\n"
618 "\n"
619 "") );
620  gFunctionHelpTexts.insert( "bbox", QCoreApplication::translate( "function_help", "<h3>bbox function</h3>\n"
621 "Returns 1 if the geometries spatially intersect the bounding box defined and 0 if they don't.\n"
622 "\n"
623 "<h4>Syntax</h4>\n"
624 "<pre>bbox( a, b )</pre>\n"
625 "\n"
626 "<h4>Arguments</h4>\n"
627 "a &rarr; geometry\n"
628 "b &rarr; geometry\n"
629 "\n"
630 "<h4>Example</h4>\n"
631 "<pre>bbox( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
632 "<pre>bbox( geomFromWKT( 'POINT(6 5)' ) , geomFromWKT( 'POLYGON((3 3 , 4 4 , 5 5, 3 3))' )) &rarr; returns 0</pre>\n"
633 "") );
634  gFunctionHelpTexts.insert( "bounds", QCoreApplication::translate( "function_help", "<h3>bounds function</h3>\n"
635 "Returns a geometry which represents the bounding box of an input geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
636 "\n"
637 "<h4>Syntax</h4>\n"
638 "<pre>bounds(geom)</pre>\n"
639 "\n"
640 "<h4>Arguments</h4>\n"
641 "geom &rarr; a geometry\n"
642 "\n"
643 "<h4>Example</h4>\n"
644 "<pre> bounds($geometry) &rarr; returns bounding box of $geometry</pre>\n"
645 "\n"
646 "") );
647  gFunctionHelpTexts.insert( "bounds_height", QCoreApplication::translate( "function_help", "<h3>bounds_height function</h3>\n"
648 "Returns the height of the bounding box of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
649 "\n"
650 "<h4>Syntax</h4>\n"
651 "<pre>bounds_height(geom)</pre>\n"
652 "\n"
653 "<h4>Arguments</h4>\n"
654 "geom &rarr; a geometry\n"
655 "\n"
656 "<h4>Example</h4>\n"
657 "<pre> bounds_height($geometry) &rarr; returns height of bounding box of $geometry</pre>\n"
658 "\n"
659 "") );
660  gFunctionHelpTexts.insert( "bounds_width", QCoreApplication::translate( "function_help", "<h3>bounds_width function</h3>\n"
661 "Returns the width of the bounding box of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
662 "\n"
663 "<h4>Syntax</h4>\n"
664 "<pre>bounds_width(geom)</pre>\n"
665 "\n"
666 "<h4>Arguments</h4>\n"
667 "geom &rarr; a geometry\n"
668 "\n"
669 "<h4>Example</h4>\n"
670 "<pre> bounds_width($geometry) &rarr; returns width of bounding box of $geometry</pre>\n"
671 "\n"
672 "") );
673  gFunctionHelpTexts.insert( "buffer", QCoreApplication::translate( "function_help", "<h3>buffer function</h3>\n"
674 "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. \n"
675 "\n"
676 "<h4>Syntax</h4>\n"
677 "<pre>buffer(a, b)</pre>\n"
678 "\n"
679 "<h4>Arguments</h4>\n"
680 "a &rarr; geometry\n"
681 "b &rarr; distance for the buffer\n"
682 "\n"
683 "<h4>Example</h4>\n"
684 "<pre> buffer($geometry, 10.5 ) &rarr; returns a polygon</pre>\n"
685 "\n"
686 "") );
687  gFunctionHelpTexts.insert( "ceil", QCoreApplication::translate( "function_help", "<h3>ceil() function</h3>\n"
688 "Rounds a number upwards.\n"
689 "\n"
690 "<h4>Syntax</h4>\n"
691 "<code>ceil(value)</code><br>\n"
692 "\n"
693 "<h4>Arguments</h4>\n"
694 "<code>value</code> - a number.\n"
695 "<br>\n"
696 "\n"
697 "<h4>Example</h4>\n"
698 "<!-- Show example of function.-->\n"
699 "<code>ceil(4.9) &rarr; 5</code><br>\n"
700 "<code>ceil(-4.9) &rarr; -4</code><br>\n"
701 "") );
702  gFunctionHelpTexts.insert( "centroid", QCoreApplication::translate( "function_help", "<h3>centroid function</h3>\n"
703 "Returns the geometric center of a geometry.\n"
704 "\n"
705 "<h4>Syntax</h4>\n"
706 "<pre>centroid(a)</pre>\n"
707 "\n"
708 "<h4>Arguments</h4>\n"
709 "b &rarr; geometry\n"
710 "\n"
711 "<h4>Example</h4>\n"
712 "<pre> centroid($geometry) &rarr; returns a point geometry</pre>\n"
713 "\n"
714 "") );
715  gFunctionHelpTexts.insert( "clamp", QCoreApplication::translate( "function_help", "<h3>clamp() function</h3>\n"
716 "Restricts an input value to a specified range.\n"
717 "\n"
718 "<p><h4>Syntax</h4>\n"
719 " clamp(<i>minimum</i>,<i>input</i>,<i>maximum</i>)</p>\n"
720 "\n"
721 "<p><h4>Arguments</h4>\n"
722 "<!-- List args for functions here-->\n"
723 "<i> minimum</i> &rarr; The smallest value <i>input</i> is allowed to take.<br>\n"
724 "<i> input</i> &rarr; a value which will be restricted to the range specified by <i>minimum</i> and <i>maximum</i>.<br>\n"
725 "<i> maximum</i> &rarr; The largest value <i>input</i> is allowed to take.<br>\n"
726 "\n"
727 "<h4>Example</h4>\n"
728 "<!-- Show example of function.-->\n"
729 " clamp(1,5,10) &rarr; 5 (<i>input</i> is between 1 and 10 so is returned unchanged)<br>\n"
730 " clamp(1,0,10) &rarr; 1 (<i>input</i> is less than minimum value of 1, so function returns 1)<br>\n"
731 " clamp(1,11,10) &rarr; 10 (<i>input</i> is greater than maximum value of 10, so function returns 10)<br>\n"
732 " \n"
733 " \n"
734 "") );
735  gFunctionHelpTexts.insert( "coalesce", QCoreApplication::translate( "function_help", "<h3>coalesce() function</h3>\n"
736 "Returns the first non-NULL value from the expression list.\n"
737 "<br>\n"
738 "This function can take any number of arguments.\n"
739 "<h4>Syntax</h4>\n"
740 "<code>coalesce(expression1, expression2 ...)</code><br>\n"
741 "\n"
742 "<h4>Arguments</h4>\n"
743 "<code>expression</code> - any valid expression or value, irregardless of type.\n"
744 "<br>\n"
745 "\n"
746 "<h4>Example</h4>\n"
747 "<!-- Show example of function.-->\n"
748 "<code>coalesce(NULL, 2) &rarr; 2</code><br>\n"
749 "<code>coalesce(NULL, 2, 3) &rarr; 2</code><br>\n"
750 "<code>coalesce(7, NULL, 3*2) &rarr; 7</code><br><br>\n"
751 "<code>coalesce(\"fieldA\", \"fallbackField\", 'ERROR') &rarr; value of fieldA if it is non-NULL\n"
752 " else the value of \"fallbackField\" or the string 'ERROR' if both are NULL</code><br>\n"
753 "\n"
754 "") );
755  gFunctionHelpTexts.insert( "color_cmyk", QCoreApplication::translate( "function_help", "\n"
756 "<h3>color_cmyk() function</h3>\n"
757 "Returns a string representation of a color based on its cyan, magenta, yellow and black components\n"
758 "\n"
759 "<p><h4>Syntax</h4>\n"
760 " color_cmyk(<i>cyan, magenta, yellow, black</i>)</p>\n"
761 "\n"
762 "<p><h4>Arguments</h4>\n"
763 "<!-- List args for functions here-->\n"
764 "<i> cyan</i> &rarr; the cyan component of the color, as a percentage integer value from 0 to 100.<br>\n"
765 "<i> magenta</i> &rarr; the magenta component of the color, as a percentage integer value from 0 to 100.<br>\n"
766 "<i> yellow</i> &rarr; the yellow component of the color, as a percentage integer value from 0 to 100.<br>\n"
767 "<i> black</i> &rarr; the black component of the color, as a percentage integer value from 0 to 100.<br>\n"
768 "\n"
769 "<p><h4>Example</h4>\n"
770 "<!-- Show example of function.-->\n"
771 " color_cmyk(100,50,0,10) &rarr; '0,115,230'</p>\n"
772 "") );
773  gFunctionHelpTexts.insert( "color_cmyka", QCoreApplication::translate( "function_help", "\n"
774 "<h3>color_cmyka() function</h3>\n"
775 "Returns a string representation of a color based on its cyan, magenta, yellow, black and alpha (transparency) components\n"
776 "\n"
777 "<p><h4>Syntax</h4>\n"
778 " color_cmyka(<i>cyan, magenta, yellow, black, alpha</i>)</p>\n"
779 "\n"
780 "<p><h4>Arguments</h4>\n"
781 "<!-- List args for functions here-->\n"
782 "<i> cyan</i> &rarr; the cyan component of the color, as a percentage integer value from 0 to 100.<br>\n"
783 "<i> magenta</i> &rarr; the magenta component of the color, as a percentage integer value from 0 to 100.<br>\n"
784 "<i> yellow</i> &rarr; the yellow component of the color, as a percentage integer value from 0 to 100.<br>\n"
785 "<i> black</i> &rarr; the black component of the color, as a percentage integer value from 0 to 100.<br>\n"
786 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
787 "\n"
788 "<p><h4>Example</h4>\n"
789 "<!-- Show example of function.-->\n"
790 " color_cmyka(100,50,0,10,200) &rarr; '0,115,230,200'</p>\n"
791 "") );
792  gFunctionHelpTexts.insert( "color_hsl", QCoreApplication::translate( "function_help", "<h3>color_hsl() function</h3>\n"
793 "Returns a string representation of a color based on its hue, saturation, and lightness attributes\n"
794 "\n"
795 "<p><h4>Syntax</h4>\n"
796 " color_hsl(<i>hue, saturation, lightness</i>)</p>\n"
797 "\n"
798 "<p><h4>Arguments</h4>\n"
799 "<!-- List args for functions here-->\n"
800 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
801 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
802 "<i> lightness</i> &rarr; the lightness percentage of the color as an integer value from 0 to 100.<br>\n"
803 "\n"
804 "<p><h4>Example</h4>\n"
805 "<!-- Show example of function.-->\n"
806 " color_hsl(100,50,70) &rarr; '166,217,140'</p>\n"
807 "") );
808  gFunctionHelpTexts.insert( "color_hsla", QCoreApplication::translate( "function_help", "<h3>color_hsla() function</h3>\n"
809 "Returns a string representation of a color based on its hue, saturation, lightness and alpha (transparency) attributes\n"
810 "\n"
811 "<p><h4>Syntax</h4>\n"
812 " color_hsla(<i>hue, saturation, lightness, alpha</i>)</p>\n"
813 "\n"
814 "<p><h4>Arguments</h4>\n"
815 "<!-- List args for functions here-->\n"
816 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
817 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
818 "<i> lightness</i> &rarr; the lightness percentage of the color as an integer value from 0 to 100.<br>\n"
819 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
820 "\n"
821 "<p><h4>Example</h4>\n"
822 "<!-- Show example of function.-->\n"
823 " color_hsla(100,50,70,200) &rarr; '166,217,140,200'</p>\n"
824 "") );
825  gFunctionHelpTexts.insert( "color_hsv", QCoreApplication::translate( "function_help", "<h3>color_hsv() function</h3>\n"
826 "Returns a string representation of a color based on its hue, saturation, and value attributes\n"
827 "\n"
828 "<p><h4>Syntax</h4>\n"
829 " color_hsv(<i>hue, saturation, value</i>)</p>\n"
830 "\n"
831 "<p><h4>Arguments</h4>\n"
832 "<!-- List args for functions here-->\n"
833 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
834 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
835 "<i> value</i> &rarr; the value percentage of the color as an integer from 0 to 100.<br>\n"
836 "\n"
837 "<p><h4>Example</h4>\n"
838 "<!-- Show example of function.-->\n"
839 " color_hsv(40,100,100) &rarr; '255,170,0'</p>\n"
840 "") );
841  gFunctionHelpTexts.insert( "color_hsva", QCoreApplication::translate( "function_help", "<h3>color_hsva() function</h3>\n"
842 "Returns a string representation of a color based on its hue, saturation, value and alpha (transparency) attributes\n"
843 "\n"
844 "<p><h4>Syntax</h4>\n"
845 " color_hsva(<i>hue, saturation, value, alpha</i>)</p>\n"
846 "\n"
847 "<p><h4>Arguments</h4>\n"
848 "<!-- List args for functions here-->\n"
849 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
850 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
851 "<i> value</i> &rarr; the value percentage of the color as an integer from 0 to 100.<br>\n"
852 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
853 "\n"
854 "<p><h4>Example</h4>\n"
855 "<!-- Show example of function.-->\n"
856 " color_hsva(40,100,100,200) &rarr; '255,170,0,200'</p>\n"
857 "") );
858  gFunctionHelpTexts.insert( "color_rgb", QCoreApplication::translate( "function_help", "\n"
859 "<h3>color_rgb() function</h3>\n"
860 "Returns a string representation of a color based on its red, green, and blue components\n"
861 "\n"
862 "<p><h4>Syntax</h4>\n"
863 " color_rgb(<i>red, green, blue</i>)</p>\n"
864 "\n"
865 "<p><h4>Arguments</h4>\n"
866 "<!-- List args for functions here-->\n"
867 "<i> red</i> &rarr; the red component as an integer value from 0 to 255.<br>\n"
868 "<i> green</i> &rarr; the green component as an integer value from 0 to 255.<br>\n"
869 "<i> blue</i> &rarr; the blue component as an integer value from 0 to 255.<br>\n"
870 "\n"
871 "<p><h4>Example</h4>\n"
872 "<!-- Show example of function.-->\n"
873 " color_rgb(255,127,0) &rarr; '255,127,0'</p>\n"
874 "") );
875  gFunctionHelpTexts.insert( "color_rgba", QCoreApplication::translate( "function_help", "\n"
876 "<h3>color_rgba() function</h3>\n"
877 "Returns a string representation of a color based on its red, green, blue, and alpha (transparency) components\n"
878 "\n"
879 "<p><h4>Syntax</h4>\n"
880 " color_rgba(<i>red, green, blue, alpha</i>)</p>\n"
881 "\n"
882 "<p><h4>Arguments</h4>\n"
883 "<!-- List args for functions here-->\n"
884 "<i> red</i> &rarr; the red component as an integer value from 0 to 255.<br>\n"
885 "<i> green</i> &rarr; the green component as an integer value from 0 to 255.<br>\n"
886 "<i> blue</i> &rarr; the blue component as an integer value from 0 to 255.<br>\n"
887 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
888 "\n"
889 "<p><h4>Example</h4>\n"
890 "<!-- Show example of function.-->\n"
891 " color_rgba(255,127,0,200) &rarr; '255,127,0,200'</p>\n"
892 "") );
893  gFunctionHelpTexts.insert( "combine", QCoreApplication::translate( "function_help", "<h3>combine function</h3>\n"
894 "Returns the combination of geometry a and geometry b.\n"
895 "\n"
896 "<h4>Syntax</h4>\n"
897 "<pre>combine( geometry a , geometry b)</pre>\n"
898 "\n"
899 "<h4>Arguments</h4>\n"
900 "geometry &rarr; geometry\n"
901 "geometry &rarr; geometry\n"
902 "\n"
903 "<h4>Example</h4>\n"
904 "<pre> geomToWKT( combine( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5 )' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4, 2 1 )' )) ) &rarr; returns MULTILINESTRING((4 4, 2 1), (3 3, 4 4), (4 4, 5 5)) </pre>\n"
905 "<pre> geomToWKT( combine( geomFromWKT( 'LINESTRING(3 3 , 4 4 )' ) , geomFromWKT( 'LINESTRING(3 3 , 6 6, 2 1 )' )) ) &rarr; returns LINESTRING(3 3, 4 4, 6 6, 2 1) </pre>\n"
906 "") );
907  gFunctionHelpTexts.insert( "concat", QCoreApplication::translate( "function_help", "<h3>concat() function</h3>\n"
908 "Concatenates several strings to one.\n"
909 "\n"
910 "<h4>Syntax</h4>\n"
911 " concat(<i>string<i>[,<i>string</i>...])\n"
912 "\n"
913 "<h4>Arguments</h4>\n"
914 "<!-- List args for functions here-->\n"
915 "<i> string</i> &rarr; is string. a string.<br>\n"
916 "\n"
917 "<h4>Example</h4>\n"
918 "<!-- Show example of function.-->\n"
919 " concat('a','b','c','d','e') &rarr; 'abcde'\n"
920 "") );
921  gFunctionHelpTexts.insert( "contains", QCoreApplication::translate( "function_help", "<h3>contains function</h3>\n"
922 "Returns true if and only if no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a. \n"
923 "\n"
924 "<h4>Syntax</h4>\n"
925 "<pre>contains( geometry a , geometry b)</pre>\n"
926 "\n"
927 "<h4>Arguments</h4>\n"
928 "geometry &rarr; geometry\n"
929 "geometry &rarr; geometry\n"
930 "\n"
931 "<h4>Example</h4>\n"
932 "<pre> contains( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'POINT( 0.5 0.5 )' )) &rarr; returns 1</pre>\n"
933 "<pre> contains( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 0</pre>\n"
934 "") );
935  gFunctionHelpTexts.insert( "convexHull", QCoreApplication::translate( "function_help", "<h3>convexHull function</h3>\n"
936 "Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set.\n"
937 "\n"
938 "<h4>Syntax</h4>\n"
939 "<pre>convexHull( a, b )</pre>\n"
940 "\n"
941 "<h4>Arguments</h4>\n"
942 "a &rarr; geometry\n"
943 "a &rarr; geometry\n"
944 "\n"
945 "<h4>Example</h4>\n"
946 "<pre> geomToWKT( convexHull( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 4 10)' )) ) &rarr; returns POLYGON((3 3,4 10,4 4,3 3)) </pre>\n"
947 "") );
948  gFunctionHelpTexts.insert( "cos", QCoreApplication::translate( "function_help", "<h3>cos() function</h3>\n"
949 "Returns cosinus of an angle.\n"
950 "\n"
951 "\n"
952 "<p><h4>Syntax</h4>\n"
953 " cos(<i>real</i>)</p>\n"
954 "\n"
955 "<p><h4>Arguments</h4>\n"
956 "<i>real</i> &rarr; angle in radians.</p>\n"
957 "\n"
958 "<p><h4>Example</h4>\n"
959 " cos(1.571) &rarr; 0.000796326710733263</p>\n"
960 "") );
961  gFunctionHelpTexts.insert( "crosses", QCoreApplication::translate( "function_help", "<h3>crosses function</h3>\n"
962 "Returns 1 if the supplied geometries have some, but not all, interior points in common.\n"
963 "\n"
964 "<h4>Syntax</h4>\n"
965 "<pre>crosses( $geometry , $geometry)</pre>\n"
966 "\n"
967 "<h4>Arguments</h4>\n"
968 "geometry &rarr; geometry\n"
969 "geometry &rarr; geometry\n"
970 "\n"
971 "<h4>Example</h4>\n"
972 "<pre> crosses( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
973 "<pre> crosses( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 0</pre>\n"
974 "") );
975  gFunctionHelpTexts.insert( "day", QCoreApplication::translate( "function_help", "<h3>day() function</h3>\n"
976 "Extract the day from a date, or the number of days\n"
977 "from a <code>Interval</code>\n"
978 "\n"
979 "<h4>Syntax</h4>\n"
980 "<code>day(date)</code><br>\n"
981 "<code>day(Interval)</code><br>\n"
982 "\n"
983 "<h4>Arguments</h4>\n"
984 "<code>date</code> - is date or datetime. The date to extract the day from.\n"
985 "<br>\n"
986 "<code>Interval</code> - is Interval. The Interval to return the number of days from.\n"
987 "\n"
988 "<h4>Example</h4>\n"
989 "<!-- Show example of function.-->\n"
990 "<code>day('2012-05-12') &rarr; 12</code><br>\n"
991 "<code>day(tointerval('3 days')) &rarr; 3</code><br>\n"
992 "<code>day(age('2012-01-01','2010-01-01')) &rarr; 730</code><br>\n"
993 "\n"
994 "") );
995  gFunctionHelpTexts.insert( "difference", QCoreApplication::translate( "function_help", "<h3>difference function</h3>\n"
996 "Returns a geometry that represents that part of geometry a that does not intersect with geometry b.\n"
997 "\n"
998 "<h4>Syntax</h4>\n"
999 "<pre>difference( a, b )</pre>\n"
1000 "\n"
1001 "<h4>Arguments</h4>\n"
1002 "geometry &rarr; geometry\n"
1003 "geometry &rarr; geometry\n"
1004 "\n"
1005 "<h4>Example</h4>\n"
1006 "<pre> geomToWKT( difference( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4)' )) ) &rarr; returns LINESTRING(4 4, 5 5)</pre>\n"
1007 "") );
1008  gFunctionHelpTexts.insert( "disjoint", QCoreApplication::translate( "function_help", "<h3>disjoint function</h3>\n"
1009 "Returns 1 if the geometries do not \"spatially intersect\" - if they do not share any space together. \n"
1010 "\n"
1011 "<h4>Syntax</h4>\n"
1012 "<pre>disjoint( a, b )</pre>\n"
1013 "\n"
1014 "<h4>Arguments</h4>\n"
1015 "a &rarr; geometry\n"
1016 "b &rarr; geometry\n"
1017 "\n"
1018 "<h4>Example</h4>\n"
1019 "<pre> disjoint( geomFromWKT( 'POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
1020 "<pre> disjoint( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'POINT(4 4)' )) &rarr; returns 0</pre>\n"
1021 "") );
1022  gFunctionHelpTexts.insert( "distance", QCoreApplication::translate( "function_help", "<h3>distance function</h3>\n"
1023 " Returns the minimum distance (based on spatial ref) between two geometries in projected units.\n"
1024 "\n"
1025 "<h4>Syntax</h4>\n"
1026 "<pre>distance( a, b )</pre>\n"
1027 "\n"
1028 "<h4>Arguments</h4>\n"
1029 "a &rarr; geometry\n"
1030 "b &rarr; geometry\n"
1031 "\n"
1032 "<h4>Example</h4>\n"
1033 "<pre> distance( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(4 8)' )) &rarr; returns 4</pre>\n"
1034 "") );
1035  gFunctionHelpTexts.insert( "exp", QCoreApplication::translate( "function_help", "<h3>exp() function</h3>\n"
1036 "Returns exponential of an value.\n"
1037 "\n"
1038 "\n"
1039 "<p><h4>Syntax</h4>\n"
1040 " exp(<i>real</i>)</p>\n"
1041 "\n"
1042 "<p><h4>Arguments</h4>\n"
1043 "<i>real</i> &rarr; number.</p>\n"
1044 "\n"
1045 "<p><h4>Example</h4>\n"
1046 " exp(1.0) &rarr; 2.71828182845905</p>\n"
1047 "") );
1048  gFunctionHelpTexts.insert( "floor", QCoreApplication::translate( "function_help", "<h3>floor() function</h3>\n"
1049 "Rounds a number downwards.\n"
1050 "\n"
1051 "<h4>Syntax</h4>\n"
1052 "<code>floor(value)</code><br>\n"
1053 "\n"
1054 "<h4>Arguments</h4>\n"
1055 "<code>value</code> - a number.\n"
1056 "<br>\n"
1057 "\n"
1058 "<h4>Example</h4>\n"
1059 "<!-- Show example of function.-->\n"
1060 "<code>floor(4.9) &rarr; 4</code><br>\n"
1061 "<code>floor(-4.9) &rarr; -5</code><br>\n"
1062 "") );
1063  gFunctionHelpTexts.insert( "format", QCoreApplication::translate( "function_help", "<h3>format() function</h3>\n"
1064 "Format a string using supplied arguments. \n"
1065 "\n"
1066 "<h4>Syntax</h4>\n"
1067 "<code>format('string', arg, [arg...n])</code><br>\n"
1068 "\n"
1069 "<h4>Arguments</h4>\n"
1070 "<code>string</code> - is string. String with Qt QString place holders. Use %1, %2, etc for placeholders. Placeholders can be repeated. \n"
1071 "<br>\n"
1072 "<code>arg [arg...n]</code> - any type. Any number of args. \n"
1073 "\n"
1074 "<h4>Example</h4>\n"
1075 "<!-- Show example of function.-->\n"
1076 "<code>format('This %1 a %2','is', 'test') &rarr; This is a test</code><br>") );
1077  gFunctionHelpTexts.insert( "format_date", QCoreApplication::translate( "function_help", "<h3>format_date() function</h3>\n"
1078 "Format a date type or string into a custom string format. Uses Qt data time format strings. See <a href='http://qt-project.org/doc/qt-4.8/qdatetime.html#toString'>QDateTime::toString</a>\n"
1079 "\n"
1080 "<h4>Syntax</h4>\n"
1081 "<code>format_date('string', 'format_string')</code><br>\n"
1082 "\n"
1083 "<h4>Arguments</h4>\n"
1084 "<code>string</code> - is string. Date/Time/DateTime string.\n"
1085 "<br>\n"
1086 "<code>format_string</code> - is string. String template used to format the string.\n"
1087 "\n"
1088 " <table>\n"
1089 " <thead>\n"
1090 " <tr>\n"
1091 " <th>Expression</th>\n"
1092 "\n"
1093 " <th>Output</th>\n"
1094 " </tr>\n"
1095 " </thead>\n"
1096 "\n"
1097 " <tr valign=\"top\">\n"
1098 " <td>d</td>\n"
1099 "\n"
1100 " <td>the day as number without a leading zero (1 to 31)</td>\n"
1101 " </tr>\n"
1102 "\n"
1103 " <tr valign=\"top\">\n"
1104 " <td>dd</td>\n"
1105 "\n"
1106 " <td>the day as number with a leading zero (01 to 31)</td>\n"
1107 " </tr>\n"
1108 "\n"
1109 " <tr valign=\"top\">\n"
1110 " <td>ddd</td>\n"
1111 "\n"
1112 " <td>the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses <a href=\n"
1113 " \"qdate.html#shortDayName\">QDate::shortDayName</a>().</td>\n"
1114 " </tr>\n"
1115 "\n"
1116 " <tr valign=\"top\">\n"
1117 " <td>dddd</td>\n"
1118 "\n"
1119 " <td>the long localized day name (e.g. 'Monday' to 'Sunday'). Uses <a href=\n"
1120 " \"qdate.html#longDayName\">QDate::longDayName</a>().</td>\n"
1121 " </tr>\n"
1122 "\n"
1123 " <tr valign=\"top\">\n"
1124 " <td>M</td>\n"
1125 "\n"
1126 " <td>the month as number without a leading zero (1-12)</td>\n"
1127 " </tr>\n"
1128 "\n"
1129 " <tr valign=\"top\">\n"
1130 " <td>MM</td>\n"
1131 "\n"
1132 " <td>the month as number with a leading zero (01-12)</td>\n"
1133 " </tr>\n"
1134 "\n"
1135 " <tr valign=\"top\">\n"
1136 " <td>MMM</td>\n"
1137 "\n"
1138 " <td>the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses <a href=\n"
1139 " \"qdate.html#shortMonthName\">QDate::shortMonthName</a>().</td>\n"
1140 " </tr>\n"
1141 "\n"
1142 " <tr valign=\"top\">\n"
1143 " <td>MMMM</td>\n"
1144 "\n"
1145 " <td>the long localized month name (e.g. 'January' to 'December'). Uses <a href=\n"
1146 " \"qdate.html#longMonthName\">QDate::longMonthName</a>().</td>\n"
1147 " </tr>\n"
1148 "\n"
1149 " <tr valign=\"top\">\n"
1150 " <td>yy</td>\n"
1151 "\n"
1152 " <td>the year as two digit number (00-99)</td>\n"
1153 " </tr>\n"
1154 "\n"
1155 " <tr valign=\"top\">\n"
1156 " <td>yyyy</td>\n"
1157 "\n"
1158 " <td>the year as four digit number</td>\n"
1159 " </tr>\n"
1160 " </table>\n"
1161 "\n"
1162 " <p>These expressions may be used for the time part of the format string:</p>\n"
1163 "\n"
1164 " <table>\n"
1165 " <thead>\n"
1166 " <tr>\n"
1167 " <th>Expression</th>\n"
1168 "\n"
1169 " <th>Output</th>\n"
1170 " </tr>\n"
1171 " </thead>\n"
1172 "\n"
1173 " <tr valign=\"top\">\n"
1174 " <td>h</td>\n"
1175 "\n"
1176 " <td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td>\n"
1177 " </tr>\n"
1178 "\n"
1179 " <tr valign=\"top\">\n"
1180 " <td>hh</td>\n"
1181 "\n"
1182 " <td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td>\n"
1183 " </tr>\n"
1184 "\n"
1185 " <tr valign=\"top\">\n"
1186 " <td>H</td>\n"
1187 "\n"
1188 " <td>the hour without a leading zero (0 to 23, even with AM/PM display)</td>\n"
1189 " </tr>\n"
1190 "\n"
1191 " <tr valign=\"top\">\n"
1192 " <td>HH</td>\n"
1193 "\n"
1194 " <td>the hour with a leading zero (00 to 23, even with AM/PM display)</td>\n"
1195 " </tr>\n"
1196 "\n"
1197 " <tr valign=\"top\">\n"
1198 " <td>m</td>\n"
1199 "\n"
1200 " <td>the minute without a leading zero (0 to 59)</td>\n"
1201 " </tr>\n"
1202 "\n"
1203 " <tr valign=\"top\">\n"
1204 " <td>mm</td>\n"
1205 "\n"
1206 " <td>the minute with a leading zero (00 to 59)</td>\n"
1207 " </tr>\n"
1208 "\n"
1209 " <tr valign=\"top\">\n"
1210 " <td>s</td>\n"
1211 "\n"
1212 " <td>the second without a leading zero (0 to 59)</td>\n"
1213 " </tr>\n"
1214 "\n"
1215 " <tr valign=\"top\">\n"
1216 " <td>ss</td>\n"
1217 "\n"
1218 " <td>the second with a leading zero (00 to 59)</td>\n"
1219 " </tr>\n"
1220 "\n"
1221 " <tr valign=\"top\">\n"
1222 " <td>z</td>\n"
1223 "\n"
1224 " <td>the milliseconds without leading zeroes (0 to 999)</td>\n"
1225 " </tr>\n"
1226 "\n"
1227 " <tr valign=\"top\">\n"
1228 " <td>zzz</td>\n"
1229 "\n"
1230 " <td>the milliseconds with leading zeroes (000 to 999)</td>\n"
1231 " </tr>\n"
1232 "\n"
1233 " <tr valign=\"top\">\n"
1234 " <td>AP or A</td>\n"
1235 "\n"
1236 " <td>interpret as an AM/PM time. <i>AP</i> must be either \"AM\" or \"PM\".</td>\n"
1237 " </tr>\n"
1238 "\n"
1239 " <tr valign=\"top\">\n"
1240 " <td>ap or a</td>\n"
1241 "\n"
1242 " <td>Interpret as an AM/PM time. <i>ap</i> must be either \"am\" or \"pm\".</td>\n"
1243 " </tr>\n"
1244 " </table>\n"
1245 "\n"
1246 "<br>\n"
1247 "\n"
1248 "<h4>Example</h4>\n"
1249 "<!-- Show example of function.-->\n"
1250 "<code>format_date('2012-05-15','dd.MM.yyyy') &rarr; 15.05.2012</code><br>\n"
1251 "") );
1252  gFunctionHelpTexts.insert( "format_number", QCoreApplication::translate( "function_help", "<h3>format_number() function</h3>\n"
1253 "Returns a number formatted with the locale separator for thousands. \n"
1254 "Also truncates the number to the number of supplied places. \n"
1255 "<h4>Syntax</h4>\n"
1256 "<code>format_number(number,places)</code><br>\n"
1257 "\n"
1258 "<h4>Arguments</h4>\n"
1259 "<code>number</code> - is number. The number to be formatted.\n"
1260 "<br>\n"
1261 "<code>places</code> - is int. The number of decimal places to truncate the string\n"
1262 "to.\n"
1263 "\n"
1264 "<h4>Example</h4>\n"
1265 "<!-- Show example of function.-->\n"
1266 "<code>format_number(10000000.332,2) &rarr; 10,000,000.33</code>\n"
1267 "\n"
1268 "") );
1269  gFunctionHelpTexts.insert( "geomFromGML", QCoreApplication::translate( "function_help", "<h3>geomFromGML function</h3>\n"
1270 "Returns a geometry from a GML representation of geometry\n"
1271 "\n"
1272 "<h4>Syntax</h4>\n"
1273 "<pre>geomFromGML(text)</pre>\n"
1274 "\n"
1275 "<h4>Arguments</h4>\n"
1276 "text &rarr; GML representation of a geometry\n"
1277 "\n"
1278 "<h4>Example</h4>\n"
1279 "<pre> geomFromGML( '<gml:LineString srsName=\"EPSG:4326\"><gml:coordinates>4,4 5,5 6,6</gml:coordinates></gml:LineString>') &rarr; returns a geometry</pre>\n"
1280 "\n"
1281 "") );
1282  gFunctionHelpTexts.insert( "geomFromWKT", QCoreApplication::translate( "function_help", "<h3>geomFromWKT function</h3>\n"
1283 "Returns a geometry created from a Well-Known Text (WKT) representation.\n"
1284 "\n"
1285 "<h4>Syntax</h4>\n"
1286 "<pre>geomFromWKT(text)</pre>\n"
1287 "\n"
1288 "<h4>Arguments</h4>\n"
1289 "text &rarr; Well-Known Text (WKT) representation of a geometry\n"
1290 "\n"
1291 "<h4>Example</h4>\n"
1292 "<pre> geomFromWKT( 'POINT(4 5)' ) &rarr; returns a geometry</pre>\n"
1293 "\n"
1294 "") );
1295  gFunctionHelpTexts.insert( "geomToWKT", QCoreApplication::translate( "function_help", "<h3>geomToWKT function</h3>\n"
1296 "Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata.\n"
1297 "\n"
1298 "<h4>Syntax</h4>\n"
1299 "<pre>geomToWKT(a)</pre>\n"
1300 "\n"
1301 "<h4>Arguments</h4>\n"
1302 "a &rarr; geometry\n"
1303 "\n"
1304 "<h4>Example</h4>\n"
1305 "<pre> geomToWKT( $geometry ) &rarr; POINT(6 50)</pre>\n"
1306 "") );
1307  gFunctionHelpTexts.insert( "geometry", QCoreApplication::translate( "function_help", "<h3>geometry function</h3>\n"
1308 "Returns the feature's geometry\n"
1309 "\n"
1310 "<h4>Syntax</h4>\n"
1311 "<pre>geometry( f )</pre>\n"
1312 "\n"
1313 "<h4>Arguments</h4>\n"
1314 "f &rarr; QgsFeature\n"
1315 "\n"
1316 "<h4>Example</h4>\n"
1317 "<pre> geomToWKT( geometry( getFeature( layer, attributeField, value ) ) ) &rarr; POINT(6 50)</pre>\n"
1318 "<pre> intersects( $geometry, geometry( getFeature( layer, attributeField, value ) ) ) &rarr; 1</pre>\n"
1319 "") );
1320  gFunctionHelpTexts.insert( "getFeature", QCoreApplication::translate( "function_help", "<h3>getFeature function</h3>\n"
1321 "Returns the first feature of a layer matching a given attribute value\n"
1322 "\n"
1323 "<h4>Syntax</h4>\n"
1324 "<pre>getFeature( layer, attributeField, value )</pre>\n"
1325 "\n"
1326 "") );
1327  gFunctionHelpTexts.insert( "hour", QCoreApplication::translate( "function_help", "<h3>hour() function</h3>\n"
1328 "Extract the hour from a datetime or time, or the number of hours\n"
1329 "from a <code>Interval</code>\n"
1330 "\n"
1331 "<h4>Syntax</h4>\n"
1332 "<code>hour(datetime)</code><br>\n"
1333 "<code>hour(Interval)</code><br>\n"
1334 "\n"
1335 "<h4>Arguments</h4>\n"
1336 "<code>date</code> - is datetime or time. The date to extract the hour from.\n"
1337 "<br>\n"
1338 "<code>Interval</code> - is Interval. The Interval to return the number of hours from.\n"
1339 "\n"
1340 "<h4>Example</h4>\n"
1341 "<!-- Show example of function.-->\n"
1342 "<code>hour('2012-07-22T13:24:57') &rarr; 13</code><br>\n"
1343 "<code>hour(tointerval('3 hours')) &rarr; 3</code><br>\n"
1344 "<code>hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00')) &rarr; 3</code><br>\n"
1345 "<code>hour(age('2012-01-01','2010-01-01')) &rarr; 17520</code><br>\n"
1346 "\n"
1347 "") );
1348  gFunctionHelpTexts.insert( "intersection", QCoreApplication::translate( "function_help", "<h3>intersection function</h3>\n"
1349 "Returns a geometry that represents the shared portion of geometry a and geometry b.\n"
1350 "\n"
1351 "<h4>Syntax</h4>\n"
1352 "<pre>intersection( geometry a , geometry b)</pre>\n"
1353 "\n"
1354 "<h4>Arguments</h4>\n"
1355 "geometry &rarr; geometry\n"
1356 "geometry &rarr; geometry\n"
1357 "\n"
1358 "<h4>Example</h4>\n"
1359 "<pre> geomToWKT( intersection( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 )' )) ) &rarr; returns LINESTRING(3 3, 4 4)</pre>\n"
1360 "") );
1361  gFunctionHelpTexts.insert( "intersects", QCoreApplication::translate( "function_help", "<h3>intersects function</h3>\n"
1362 "Returns 1 if the geometries spatially intersect (share any portion of space) and 0 if they don't.\n"
1363 "\n"
1364 "<h4>Syntax</h4>\n"
1365 "<pre>intersects( a, b )</pre>\n"
1366 "\n"
1367 "<h4>Arguments</h4>\n"
1368 "a &rarr; geometry\n"
1369 "b &rarr; geometry\n"
1370 "\n"
1371 "<h4>Example</h4>\n"
1372 "<pre> intersects( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
1373 "<pre> intersects( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'POINT(5 5)' )) &rarr; returns 0</pre>\n"
1374 "") );
1375  gFunctionHelpTexts.insert( "left", QCoreApplication::translate( "function_help", "<h3>left() function</h3>\n"
1376 "Returns a substring that contains the <i>n</i> leftmost characters of the string.\n"
1377 "\n"
1378 "<h4>Syntax</h4>\n"
1379 "<code>left(string, length)</code><br>\n"
1380 "\n"
1381 "<h4>Arguments</h4>\n"
1382 "<code>string</code> - is string. The string.\n"
1383 "<br>\n"
1384 "<code>length</code> - is int. The number of characters from the left to return.\n"
1385 "\n"
1386 "<h4>Example</h4>\n"
1387 "<!-- Show example of function.-->\n"
1388 "<code>left('Hello World',5) &rarr; 'Hello'</code><br>\n"
1389 "\n"
1390 "") );
1391  gFunctionHelpTexts.insert( "length", QCoreApplication::translate( "function_help", "<h3>length() function</h3>\n"
1392 "Returns the length of a string.\n"
1393 "\n"
1394 "<p><h4>Syntax</h4>\n"
1395 " length(<i>string</i>)</p>\n"
1396 "\n"
1397 "<p><h4>Arguments</h4>\n"
1398 "<!-- List args for functions here-->\n"
1399 "<i> string</i> &rarr; is string. The String to count the length of.</p>\n"
1400 "\n"
1401 "<p><h4>Example</h4>\n"
1402 "<!-- Show example of function.-->\n"
1403 " length('HELLO') &rarr; 5</p>\n"
1404 "") );
1405  gFunctionHelpTexts.insert( "ln", QCoreApplication::translate( "function_help", "<h3>ln() function</h3>\n"
1406 "Returns the value of the natural logarithm of the passed expression.\n"
1407 "<br>\n"
1408 "This function takes one argument.\n"
1409 "<h4>Syntax</h4>\n"
1410 "<code>ln(value)</code><br>\n"
1411 "\n"
1412 "<h4>Arguments</h4>\n"
1413 "<code>value</code> - any positive number.\n"
1414 "<br>\n"
1415 "\n"
1416 "<h4>Example</h4>\n"
1417 "<!-- Show example of function.-->\n"
1418 "<code>ln(1) &rarr; 0</code><br>\n"
1419 "<code>ln(2.7182818284590452354) &rarr; 1</code><br>\n"
1420 "") );
1421  gFunctionHelpTexts.insert( "log", QCoreApplication::translate( "function_help", "<h3>log() function</h3>\n"
1422 "Returns the value of the logarithm of the passed value and base.\n"
1423 "<br>\n"
1424 "This function takes two arguments.\n"
1425 "<h4>Syntax</h4>\n"
1426 "<code>log(base, value)</code><br>\n"
1427 "\n"
1428 "<h4>Arguments</h4>\n"
1429 "<code>base</code> - any positive number.<br>\n"
1430 "<code>value</code> - any positive number.\n"
1431 "<br>\n"
1432 "\n"
1433 "<h4>Example</h4>\n"
1434 "<!-- Show example of function.-->\n"
1435 "<code>log(2, 32) &rarr; 5</code><br>\n"
1436 "<code>log(0.5, 32) &rarr; -5</code><br>\n"
1437 "") );
1438  gFunctionHelpTexts.insert( "log10", QCoreApplication::translate( "function_help", "<h3>log10() function</h3>\n"
1439 "Returns the value of the base 10 logarithm of the passed expression.\n"
1440 "<br>\n"
1441 "This function takes one argument.\n"
1442 "<h4>Syntax</h4>\n"
1443 "<code>log10(value)</code><br>\n"
1444 "\n"
1445 "<h4>Arguments</h4>\n"
1446 "<code>value</code> - any positive number.\n"
1447 "<br>\n"
1448 "\n"
1449 "<h4>Example</h4>\n"
1450 "<!-- Show example of function.-->\n"
1451 "<code>log10(1) &rarr; 0</code><br>\n"
1452 "<code>log10(100) &rarr; 2</code><br>\n"
1453 "") );
1454  gFunctionHelpTexts.insert( "lower", QCoreApplication::translate( "function_help", "<h3>lower() function</h3>\n"
1455 "Converts a string to lower case letters.\n"
1456 "\n"
1457 "<p><h4> Syntax</h4>\n"
1458 " lower(<i>string</i>)</p>\n"
1459 "\n"
1460 "<p><h4> Arguments</h4>\n"
1461 "<i> string</i> &rarr; is string. The String to convert to lower case.</p>\n"
1462 "\n"
1463 "<p><h4> Example</h4>\n"
1464 " lower('HELLO World') &rarr; 'hello world'</p>\n"
1465 "") );
1466  gFunctionHelpTexts.insert( "lpad", QCoreApplication::translate( "function_help", "<h3>lpad() function</h3>\n"
1467 "Returns a string with supplied width padded\n"
1468 "using the fill character.\n"
1469 "\n"
1470 "<h4>Syntax</h4>\n"
1471 "<code>lpad(string, length, fill)</code><br>\n"
1472 "\n"
1473 "<h4>Arguments</h4>\n"
1474 "<code>string</code> - is string. The string.\n"
1475 "<br>\n"
1476 "<code>length</code> - is int. The length of the new string.\n"
1477 "<br>\n"
1478 "<code>fill</code> - is char. The character to padd the remaining space with. \n"
1479 "\n"
1480 "<h4>Example</h4>\n"
1481 "<!-- Show example of function.-->\n"
1482 "<code>lpad('Hello', 10, 'x') &rarr; 'Helloxxxxx'</code><br>\n"
1483 "") );
1484  gFunctionHelpTexts.insert( "max", QCoreApplication::translate( "function_help", "<h3>max() function</h3>\n"
1485 "Returns the largest value in a set of values.\n"
1486 "\n"
1487 "<h4>Syntax</h4>\n"
1488 " max(<i>value<i>[,<i>value</i>...])\n"
1489 "\n"
1490 "<h4>Arguments</h4>\n"
1491 "<!-- List args for functions here-->\n"
1492 "<i> value</i> &rarr; a number.<br>\n"
1493 "\n"
1494 "<h4>Example</h4>\n"
1495 "<!-- Show example of function.-->\n"
1496 " max(2,10.2,5.5) &rarr; 10.2\n"
1497 "") );
1498  gFunctionHelpTexts.insert( "min", QCoreApplication::translate( "function_help", "<h3>min() function</h3>\n"
1499 "Returns the smallest value in a set of values.\n"
1500 "\n"
1501 "<h4>Syntax</h4>\n"
1502 " min(<i>value<i>[,<i>value</i>...])\n"
1503 "\n"
1504 "<h4>Arguments</h4>\n"
1505 "<!-- List args for functions here-->\n"
1506 "<i> value</i> &rarr; a number.<br>\n"
1507 "\n"
1508 "<h4>Example</h4>\n"
1509 "<!-- Show example of function.-->\n"
1510 " min(20.5,10,6.2) &rarr; 6.2\n"
1511 "") );
1512  gFunctionHelpTexts.insert( "minute", QCoreApplication::translate( "function_help", "<h3>minute() function</h3>\n"
1513 "Extract the minute from a datetime or time, or the number of minutes\n"
1514 "from a <code>Interval</code>\n"
1515 "\n"
1516 "<h4>Syntax</h4>\n"
1517 "<code>minute(datetime)</code><br>\n"
1518 "<code>minute(Interval)</code><br>\n"
1519 "\n"
1520 "<h4>Arguments</h4>\n"
1521 "<code>date</code> - is datetime or time. The date to extract the minute from.\n"
1522 "<br>\n"
1523 "<code>Interval</code> - is Interval. The Interval to return the number of minutes from.\n"
1524 "\n"
1525 "<h4>Example</h4>\n"
1526 "<!-- Show example of function.-->\n"
1527 "<code>minute('2012-07-22T13:24:57') &rarr; 24</code><br>\n"
1528 "<code>minute(tointerval('3 minutes')) &rarr; 3</code><br>\n"
1529 "<code>minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) &rarr; 20</code><br>\n"
1530 "<code>minute(age('2012-01-01','2010-01-01')) &rarr; 1051200</code><br>\n"
1531 "\n"
1532 "") );
1533  gFunctionHelpTexts.insert( "month", QCoreApplication::translate( "function_help", "<h3>month() function</h3>\n"
1534 "Extract the month part from a date, or the number of months\n"
1535 "from a <code>Interval</code>\n"
1536 "\n"
1537 "<h4>Syntax</h4>\n"
1538 "<code>month(date)</code><br>\n"
1539 "<code>month(Interval)</code><br>\n"
1540 "\n"
1541 "<h4>Arguments</h4>\n"
1542 "<code>date</code> - is date or datetime. The date to extract the month from.\n"
1543 "<br>\n"
1544 "<code>Interval</code> - is Interval. The Interval to return the number of months from.\n"
1545 "\n"
1546 "<h4>Example</h4>\n"
1547 "<!-- Show example of function.-->\n"
1548 "<code>month('2012-05-12') &rarr; 05</code><br>\n"
1549 "<code>month(tointerval('3 months')) &rarr; 3</code><br>\n"
1550 "<code>month(age('2012-01-01','2010-01-01')) &rarr; 4.033...</code><br>\n"
1551 "\n"
1552 "") );
1553  gFunctionHelpTexts.insert( "overlaps", QCoreApplication::translate( "function_help", "<h3>overlaps function</h3>\n"
1554 "Returns 1 if the geometries share space, are of the same dimension, but are not completely contained by each other.\n"
1555 "\n"
1556 "<h4>Syntax</h4>\n"
1557 "<pre>overlaps( a, b )</pre>\n"
1558 "\n"
1559 "<h4>Arguments</h4>\n"
1560 "a &rarr; geometry\n"
1561 "b &rarr; geometry\n"
1562 "\n"
1563 "<h4>Example</h4>\n"
1564 "<pre> overlaps( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 5 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
1565 "<pre> overlaps( geomFromWKT( 'LINESTRING(0 0 , 1 1)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 0</pre>\n"
1566 "") );
1567  gFunctionHelpTexts.insert( "ramp_color", QCoreApplication::translate( "function_help", "\n"
1568 "<h3>ramp_color() function</h3>\n"
1569 "Returns a string representing a color from a color ramp. \n"
1570 "\n"
1571 "<p><h4>Syntax</h4>\n"
1572 " ramp_color(<i>ramp_name,value</i>)</p>\n"
1573 "\n"
1574 "<p><h4>Arguments</h4>\n"
1575 "<!-- List args for functions here-->\n"
1576 "<i> ramp_name</i> &rarr; the name of the color ramp as a string, for example 'Spectral'.<br>\n"
1577 "<i> value</i> &rarr; the position on the ramp to select the color from as a real number between 0 and 1.<br>\n"
1578 "\n"
1579 "<p><h4>Example</h4>\n"
1580 "<!-- Show example of function.-->\n"
1581 " ramp_color('Spectral',0.3) &rarr; '253,190,115,255'</p>\n"
1582 "\n"
1583 "<p><h4>Note:</h4>\n"
1584 "The color ramps available vary between QGIS installations. This function\n"
1585 "may not give the expected results if you move your Quantum project.\n"
1586 "</p>\n"
1587 "") );
1588  gFunctionHelpTexts.insert( "rand", QCoreApplication::translate( "function_help", "<h3>rand() function</h3>\n"
1589 "Returns a random integer within the range specified by the minimum and \n"
1590 "maximum argument (inclusive).\n"
1591 "<br>\n"
1592 "This function takes two arguments.\n"
1593 "<h4>Syntax</h4>\n"
1594 "<code>rand(min, max)</code><br>\n"
1595 "\n"
1596 "<h4>Arguments</h4>\n"
1597 "<code>min</code> - an integer representing the smallest possible random number desired.<br>\n"
1598 "<code>max</code> - an integer representing the largest possible random number desired.\n"
1599 "<br>\n"
1600 "\n"
1601 "<h4>Example</h4>\n"
1602 "<!-- Show example of function.-->\n"
1603 "<code>rand(1, 10) &rarr; 8</code><br>\n"
1604 "") );
1605  gFunctionHelpTexts.insert( "randf", QCoreApplication::translate( "function_help", "<h3>randf() function</h3>\n"
1606 "Returns a random float within the range specified by the minimum and \n"
1607 "maximum argument (inclusive).\n"
1608 "<br>\n"
1609 "This function takes two arguments.\n"
1610 "<h4>Syntax</h4>\n"
1611 "<code>randf(min, max)</code><br>\n"
1612 "\n"
1613 "<h4>Arguments</h4>\n"
1614 "<code>min</code> - a float representing the smallest possible random number desired.<br>\n"
1615 "<code>max</code> - a float representing the largest possible random number desired.\n"
1616 "<br>\n"
1617 "\n"
1618 "<h4>Example</h4>\n"
1619 "<!-- Show example of function.-->\n"
1620 "<code>randf(1, 10) &rarr; 4.59258286403147</code><br>\n"
1621 "") );
1622  gFunctionHelpTexts.insert( "regexp_match", QCoreApplication::translate( "function_help", "<h3>regexp_match() function</h3>\n"
1623 "Returns true if any part of a string matches the supplied regular expression.\n"
1624 "\n"
1625 "<p><h4>Syntax</h4>\n"
1626 " regexp_match(<i>string,regex</i>)</p>\n"
1627 "\n"
1628 "<p><h4>Arguments</h4>\n"
1629 "<!-- List args for functions here-->\n"
1630 "<i> string</i> &rarr; is string. The string to test against the regular expression.<br>\n"
1631 "<i> regex</i> &rarr; is string. The regular expression to test against. Backslash characters must be double escaped (eg \"&#92;&#92;s\" to match a white space character). Non-greedy regular expressions are not supported.<br>\n"
1632 "\n"
1633 "<p><h4>Example</h4>\n"
1634 "<!-- Show example of function.-->\n"
1635 " regexp_match('QGIS ROCKS','&#92;&#92;sROCKS') &rarr; 1</p>\n"
1636 "") );
1637  gFunctionHelpTexts.insert( "regexp_replace", QCoreApplication::translate( "function_help", "<h3>regexp_replace() function</h3>\n"
1638 "Returns a string with the supplied regular expression replaced.\n"
1639 "\n"
1640 "<p><h4>Syntax</h4>\n"
1641 " regexp_replace(<i>string,regex,after</i>)</p>\n"
1642 "\n"
1643 "<p><h4>Arguments</h4>\n"
1644 "<!-- List args for functions here-->\n"
1645 "<i> string</i> &rarr; is string. The start string.<br>\n"
1646 "<i> regex</i> &rarr; is string. The regular expression to replace. Backslash characters must be double escaped (eg \"&#92;&#92;s\" to match a white space character). Non-greedy regular expressions are not supported.<br>\n"
1647 "<i> after</i> &rarr; is string. The string that will replace any matching occurences of the supplied regular expression. Captured groups can be inserted into the replacement string using &#92;&#92;1, &#92;&#92;2, etc. <br></p>\n"
1648 "\n"
1649 "<p><h4>Example</h4>\n"
1650 "<!-- Show example of function.-->\n"
1651 " regexp_replace('QGIS SHOULD ROCK','&#92;&#92;sSHOULD&#92;&#92;s',' DOES ') &rarr; 'QGIS DOES ROCK'</p>\n"
1652 "") );
1653  gFunctionHelpTexts.insert( "regexp_substr", QCoreApplication::translate( "function_help", "<h3>regexp_substr() function</h3>\n"
1654 "Returns the portion of a string which matches a supplied regular expression.\n"
1655 "\n"
1656 "<p><h4>Syntax</h4>\n"
1657 " regexp_substr(<i>string,regex</i>)</p>\n"
1658 "\n"
1659 "<p><h4>Arguments</h4>\n"
1660 "<!-- List args for functions here-->\n"
1661 "<i> string</i> &rarr; is string. The input string.<br>\n"
1662 "<i> regex</i> &rarr; is string. The regular expression to match against. Backslash characters must be double escaped (eg \"&#92;&#92;s\" to match a white space character). Non-greedy regular expressions are not supported.<br>\n"
1663 "\n"
1664 "<p><h4>Example</h4>\n"
1665 "<!-- Show example of function.-->\n"
1666 " regexp_substr('abc123','(&#92;&#92;d+)') &rarr; '123'</p>\n"
1667 "") );
1668  gFunctionHelpTexts.insert( "replace", QCoreApplication::translate( "function_help", "<h3>replace() function</h3>\n"
1669 "Returns a string with the the supplied string replaced.\n"
1670 "\n"
1671 "<p><h4>Syntax</h4>\n"
1672 " replace(<i>string,before,after</i>)</p>\n"
1673 "\n"
1674 "<p><h4>Arguments</h4>\n"
1675 "<!-- List args for functions here-->\n"
1676 "<i> string</i> &rarr; is string. The start string.<br>\n"
1677 "<i> before</i> &rarr; is string. The string to replace.<br>\n"
1678 "<i> after</i> &rarr; is string. The string that will replace <i>before</i><br></p>\n"
1679 "\n"
1680 "<p><h4>Example</h4>\n"
1681 "<!-- Show example of function.-->\n"
1682 " replace('QGIS SHOULD ROCK','SHOULD','DOES') &rarr; 'QGIS DOES ROCK'</p>\n"
1683 "") );
1684  gFunctionHelpTexts.insert( "right", QCoreApplication::translate( "function_help", "<h3>right() function</h3>\n"
1685 "Returns a substring that contains the <i>n</i> rightmost characters of the string.\n"
1686 "\n"
1687 "<h4>Syntax</h4>\n"
1688 "<code>right(string, pos)</code><br>\n"
1689 "\n"
1690 "<h4>Arguments</h4>\n"
1691 "<code>string</code> - is string. The string.\n"
1692 "<br>\n"
1693 "<code>length</code> - is int. The number of characters from the right to return.\n"
1694 "\n"
1695 "<h4>Example</h4>\n"
1696 "<!-- Show example of function.-->\n"
1697 "<code>right('Hello World',5) &rarr; 'World'</code><br>\n"
1698 "\n"
1699 "") );
1700  gFunctionHelpTexts.insert( "round", QCoreApplication::translate( "function_help", "<h3>round() function</h3>\n"
1701 "Rounds a number to number of decimal places.\n"
1702 "<br>\n"
1703 "This function can take one or two arguments depending on what is needed.\n"
1704 "<h4>Syntax</h4>\n"
1705 "<code>round(decimal,places)</code><br>\n"
1706 "<code>round(decimal)</code><br>\n"
1707 "\n"
1708 "<h4>Arguments</h4>\n"
1709 "<code>decimal</code> - is decimal. The decimal number to be rounded.\n"
1710 "<br>\n"
1711 "<code>places</code> - is int. The number of places to round decimal too. Can be negative.\n"
1712 "\n"
1713 "<h4>Example</h4>\n"
1714 "<!-- Show example of function.-->\n"
1715 "<code>round(1234.567, 2 ) &rarr; 1234.57</code><br>\n"
1716 "use <code>round(decimal)</code> to round to the nearest integer<br>\n"
1717 "<code>round(1234.567) &rarr; 1235</code><br>\n"
1718 "\n"
1719 "\n"
1720 "") );
1721  gFunctionHelpTexts.insert( "rpad", QCoreApplication::translate( "function_help", "<h3>rpad() function</h3>\n"
1722 "Returns a string with supplied width padded\n"
1723 "using the fill character.\n"
1724 "\n"
1725 "<h4>Syntax</h4>\n"
1726 "<code>rpad(string, width, fill)</code><br>\n"
1727 "\n"
1728 "<h4>Arguments</h4>\n"
1729 "<code>string</code> - is string. The string.\n"
1730 "<br>\n"
1731 "<code>width</code> - is int. The length of the new string.\n"
1732 "<br>\n"
1733 "<code>fill</code> - is char. The character to padd the remaining space with. \n"
1734 "\n"
1735 "<h4>Example</h4>\n"
1736 "<!-- Show example of function.-->\n"
1737 "<code>rpad('Hello', 10, 'x') &rarr; 'xxxxxHello'</code><br>\n"
1738 "\n"
1739 "") );
1740  gFunctionHelpTexts.insert( "scale_exp", QCoreApplication::translate( "function_help", "<h3>scale_exp() function</h3>\n"
1741 "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 \n"
1742 "of the specified output range. \n"
1743 "\n"
1744 "<p><h4>Syntax</h4>\n"
1745 " scale_exp(<i>val</i>,<i>domain_min</i>,<i>domain_max</i>,<i>range_min</i>,<i>range_max</i>,<i>exponent</i>)</p>\n"
1746 "\n"
1747 "<p><h4>Arguments</h4>\n"
1748 "<!-- List args for functions here-->\n"
1749 "<i> val</i> &rarr; is a value in the input domain. The function will return a corresponding scaled value in the output range.<br>\n"
1750 "<i> domain_min, domain_max</i> &rarr; specify the input domain, the smallest and largest values the input <i>val</i> should take.<br>\n"
1751 "<i> range_min, range_max</i> &rarr; specify the output range, the smallest and largest values which should be output by the function.<br>\n"
1752 "<i> exponent</i> &rarr; 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\n"
1753 "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.<br>\n"
1754 "\n"
1755 "<h4>Example</h4>\n"
1756 "<!-- Show example of function.-->\n"
1757 "<b>Easing in, using an exponent of 2:</b><br>\n"
1758 " scale_exp(5,0,10,0,100,2) &rarr; 25<br>\n"
1759 " scale_exp(7.5,0,10,0,100,2) &rarr; 56.25<br>\n"
1760 " scale_exp(9.5,0,10,0,100,2) &rarr; 90.25<br> \n"
1761 " <br>\n"
1762 "<b>Easing out, using an exponent of 0.5:</b><br> \n"
1763 " scale_exp(3,0,10,0,100,0.5) &rarr; 54.772<br>\n"
1764 " scale_exp(6,0,10,0,100,0.5) &rarr; 77.459<br>\n"
1765 " scale_exp(9,0,10,0,100,0.5) &rarr; 94.868<br> \n"
1766 " \n"
1767 " \n"
1768 "") );
1769  gFunctionHelpTexts.insert( "scale_linear", QCoreApplication::translate( "function_help", "<h3>scale_linear() function</h3>\n"
1770 "Transforms a given value from an input domain to an output range using linear interpolation. \n"
1771 "\n"
1772 "<p><h4>Syntax</h4>\n"
1773 " scale_linear(<i>val</i>,<i>domain_min</i>,<i>domain_max</i>,<i>range_min</i>,<i>range_max</i>)</p>\n"
1774 "\n"
1775 "<p><h4>Arguments</h4>\n"
1776 "<!-- List args for functions here-->\n"
1777 "<i> val</i> &rarr; is a value in the input domain. The function will return a corresponding scaled value in the output range.<br>\n"
1778 "<i> domain_min, domain_max</i> &rarr; specify the input domain, the smallest and largest values the input <i>val</i> should take.<br>\n"
1779 "<i> range_min, range_max</i> &rarr; specify the output range, the smallest and largest values which should be output by the function.<br>\n"
1780 "\n"
1781 "<h4>Example</h4>\n"
1782 "<!-- Show example of function.-->\n"
1783 " scale_linear(5,0,10,0,100) &rarr; 50<br>\n"
1784 " scale_linear(0.2,0,1,0,360) &rarr; 72 <i>(eg, scaling a value between 0 and 1 to an angle between 0 and 360)</i><br>\n"
1785 " scale_linear(1500,1000,10000,9,20) &rarr; 10.22 <i>(eg, scaling a population which varies between 1000 and 10000 to a font size between 9 and 20)</i><br>\n"
1786 " \n"
1787 " \n"
1788 "") );
1789  gFunctionHelpTexts.insert( "second", QCoreApplication::translate( "function_help", "<h3>second() function</h3>\n"
1790 "Extract the seconds from a datetime or time, or the number of seconds\n"
1791 "from a <code>Interval</code>\n"
1792 "\n"
1793 "<h4>Syntax</h4>\n"
1794 "<code>second(datetime)</code><br>\n"
1795 "<code>second(Interval)</code><br>\n"
1796 "\n"
1797 "<h4>Arguments</h4>\n"
1798 "<code>date</code> - is datetime or time. The date to extract the second from.\n"
1799 "<br>\n"
1800 "<code>Interval</code> - is Interval. The Interval to return the number of seconds from.\n"
1801 "\n"
1802 "<h4>Example</h4>\n"
1803 "<!-- Show example of function.-->\n"
1804 "<code>second('2012-07-22T13:24:57') &rarr; 57</code><br>\n"
1805 "<code>second(tointerval('3 seconds')) &rarr; 3</code><br>\n"
1806 "<code>second(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) &rarr; 1200</code><br>\n"
1807 "<code>second(age('2012-01-01','2010-01-01')) &rarr; 63072000</code><br>\n"
1808 "\n"
1809 "") );
1810  gFunctionHelpTexts.insert( "sin", QCoreApplication::translate( "function_help", "<h3>sin() function</h3>\n"
1811 "Returns sinus of an angle.\n"
1812 "\n"
1813 "\n"
1814 "<p><h4>Syntax</h4>\n"
1815 " sin(<i>real</i>)</p>\n"
1816 "\n"
1817 "<p><h4>Arguments</h4>\n"
1818 "<i>real</i> &rarr; angle in radians.</p>\n"
1819 "\n"
1820 "<p><h4>Example</h4>\n"
1821 " sin(1.571) &rarr; 0.999999682931835</p>\n"
1822 "") );
1823  gFunctionHelpTexts.insert( "sqrt", QCoreApplication::translate( "function_help", "<h3>sqrt() function</h3>\n"
1824 "Returns square root of a value\n"
1825 "\n"
1826 "\n"
1827 "<p><h4>Syntax</h4>\n"
1828 " sqrt(<i>real</i>)</p>\n"
1829 "\n"
1830 "<p><h4>Arguments</h4>\n"
1831 "<i>real</i> &rarr; number.</p>\n"
1832 "\n"
1833 "<p><h4>Example</h4>\n"
1834 " sqrt(9) &rarr; 3</p>\n"
1835 "") );
1836  gFunctionHelpTexts.insert( "strpos", QCoreApplication::translate( "function_help", "<h3>strpos() function</h3>\n"
1837 "Return the index of a regular expression in a string.\n"
1838 "\n"
1839 "<h4>Syntax</h4>\n"
1840 " strpos(<i>haystack</i>, <i>needle</i>)\n"
1841 "<br><br>\n"
1842 "Returns -1 if the expression isn't found.\n"
1843 "\n"
1844 "<p><h4>Arguments</h4>\n"
1845 "<!-- List args for functions here-->\n"
1846 "<i> haystack</i> &rarr; is string. The string that is to be searched.<br>\n"
1847 "<i> needle</i> &rarr; is string. The regular expression to look for.<br>\n"
1848 "\n"
1849 "<h4>Example</h4>\n"
1850 "<!-- Show example of function.-->\n"
1851 " strpos('HELLO WORLD','WORLD') &rarr; 6<br>\n"
1852 " strpos('HELLO WORLD','GOODBYE') &rarr; -1<br>\n"
1853 "") );
1854  gFunctionHelpTexts.insert( "substr", QCoreApplication::translate( "function_help", "<h3>substr() function</h3>\n"
1855 "Return a part of a string\n"
1856 "\n"
1857 "<p><h4>Syntax</h4>\n"
1858 " substr(<i>string,startpos,length</i>)</p>\n"
1859 "\n"
1860 "<p><h4>Arguments</h4>\n"
1861 "<!-- List args for functions here-->\n"
1862 "<i> string</i> &rarr; is string. The full string.<br>\n"
1863 "<i> startpos</i> &rarr; is number. The start position to extract from.<br>\n"
1864 "<i> length</i> &rarr; is number. The length of the string to extract.<br></p>\n"
1865 "\n"
1866 "<p><h4>Example</h4>\n"
1867 "<!-- Show example of function.-->\n"
1868 " substr('HELLO WORLD',3,5) &rarr; 'LLO W'</p>\n"
1869 "") );
1870  gFunctionHelpTexts.insert( "symDifference", QCoreApplication::translate( "function_help", "<h3>symDifference function</h3>\n"
1871 "Returns a geometry that represents the portions of a and b that do not intersect.\n"
1872 "\n"
1873 "<h4>Syntax</h4>\n"
1874 "<pre>symDifference( geometry a, geometry b)</pre>\n"
1875 "\n"
1876 "<h4>Arguments</h4>\n"
1877 "geometry &rarr; geometry\n"
1878 "geometry &rarr; geometry\n"
1879 "\n"
1880 "<h4>Example</h4>\n"
1881 "<pre> geomToWKT( symDifference( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 8 8)' )) ) &rarr; returns LINESTRING(5 5, 8 8)</pre>\n"
1882 "") );
1883  gFunctionHelpTexts.insert( "tan", QCoreApplication::translate( "function_help", "<h3>tan() function</h3>\n"
1884 "Returns tangent of an angle.\n"
1885 "\n"
1886 "\n"
1887 "<p><h4>Syntax</h4>\n"
1888 " tan(<i>real</i>)</p>\n"
1889 "\n"
1890 "<p><h4>Arguments</h4>\n"
1891 "<i>real</i> &rarr; angle in radians.</p>\n"
1892 "\n"
1893 "<p><h4>Example</h4>\n"
1894 " tan(1.0) &rarr; 1.5574077246549</p>\n"
1895 "") );
1896  gFunctionHelpTexts.insert( "title", QCoreApplication::translate( "function_help", "<h3>title() function</h3>\n"
1897 "Converts all words of a string to title case (all words lower case with leading\n"
1898 "capital letter).\n"
1899 "\n"
1900 "<p><h4>Syntax</h4>\n"
1901 " title(<i>string</i>)</p>\n"
1902 "\n"
1903 "<p><h4>Arguments</h4>\n"
1904 "<!-- List args for functions here-->\n"
1905 "<i> string</i> &rarr; is string. The string to convert to title case.</p>\n"
1906 "\n"
1907 "<p><h4>Example</h4>\n"
1908 "<!-- Show example of function.-->\n"
1909 " upper('hello WOrld') &rarr; 'Hello World'</p>\n"
1910 "") );
1911  gFunctionHelpTexts.insert( "todate", QCoreApplication::translate( "function_help", "<h3>todate() function</h3>\n"
1912 "Convert a string into Qt data type.\n"
1913 "\n"
1914 "<h4>Syntax</h4>\n"
1915 "<code>todate('string')</code><br>\n"
1916 "\n"
1917 "<h4>Arguments</h4>\n"
1918 "<code>string</code> - is string in Qt date format.\n"
1919 "<br>\n"
1920 "\n"
1921 "<h4>Example</h4>\n"
1922 "<!-- Show example of function.-->\n"
1923 "<code>todate('2012-05-04') &rarr; 2012-05-04</code><br>") );
1924  gFunctionHelpTexts.insert( "todatetime", QCoreApplication::translate( "function_help", "<h3>todatetime() function</h3>\n"
1925 "Convert a string into Qt data time type.\n"
1926 "\n"
1927 "<h4>Syntax</h4>\n"
1928 "<code>todatetime('string')</code><br>\n"
1929 "\n"
1930 "<h4>Arguments</h4>\n"
1931 "<code>string</code> - is string in Qt date time format.\n"
1932 "<br>\n"
1933 "\n"
1934 "<h4>Example</h4>\n"
1935 "<!-- Show example of function.-->\n"
1936 "<code>todatetime('2012-05-04 12:50:00') &rarr; 2012-05-04T12:50:00</code><br>") );
1937  gFunctionHelpTexts.insert( "toint", QCoreApplication::translate( "function_help", "<h3>toint() function</h3>\n"
1938 "Converts a string to integer number. Nothing changed if a value cannot be converted to integer (e.g '123asd' is invalid).\n"
1939 "\n"
1940 "<p><h4>Syntax</h4>\n"
1941 " toint(<i>string</i>)</p>\n"
1942 "\n"
1943 "<p><h4>Arguments</h4>\n"
1944 "<!-- List args for functions here-->\n"
1945 "<i> string</i> &rarr; is string. The String to convert to integer number.</p>\n"
1946 "\n"
1947 "<p><h4>Example</h4>\n"
1948 "<!-- Show example of function.-->\n"
1949 " toint('123') &rarr; 123</p>\n"
1950 "") );
1951  gFunctionHelpTexts.insert( "tointerval", QCoreApplication::translate( "function_help", "<h3>tointerval() function</h3>\n"
1952 "Converts a string to a interval type. Can be used to take days, hours, month, etc off a date. \n"
1953 "\n"
1954 "<h4>Syntax</h4>\n"
1955 "<code>tointerval('string')</code><br>\n"
1956 "\n"
1957 "<h4>Arguments</h4>\n"
1958 "<code>string</code> - is string. Format {n} days {n} hours {n} months\n"
1959 "<br>\n"
1960 "\n"
1961 "<h4>Example</h4>\n"
1962 "<!-- Show example of function.-->\n"
1963 "<code>todatetime('2012-05-05 12:00:00') - tointerval('1 day 2 hours') &rarr; 2012-05-04T10:00:00</code><br>") );
1964  gFunctionHelpTexts.insert( "toreal", QCoreApplication::translate( "function_help", "<h3>toreal() function</h3>\n"
1965 "Converts a string to real number. Nothing changed 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.\n"
1966 "\n"
1967 "<p><h4>Syntax</h4>\n"
1968 " toreal(<i>string</i>)</p>\n"
1969 "\n"
1970 "<p><h4>Arguments</h4>\n"
1971 "<!-- List args for functions here-->\n"
1972 "<i> string</i> &rarr; is string. The String to convert to real number.</p>\n"
1973 "\n"
1974 "<p><h4>Example</h4>\n"
1975 "<!-- Show example of function.-->\n"
1976 " toreal('123.45') &rarr; 123.45</p>\n"
1977 "") );
1978  gFunctionHelpTexts.insert( "tostring", QCoreApplication::translate( "function_help", "<h3>tostring() function</h3>\n"
1979 "Converts a number to string.\n"
1980 "\n"
1981 "<p><h4>Syntax</h4>\n"
1982 " tostring(<i>number</i>)</p>\n"
1983 "\n"
1984 "<p><h4>Arguments</h4>\n"
1985 "<!-- List args for functions here-->\n"
1986 "<i>number</i> &rarr; is integer or real. The number to convert to string.</p>\n"
1987 "\n"
1988 "<p><h4>Example</h4>\n"
1989 "<!-- Show example of function.-->\n"
1990 " tostring(123) &rarr; '123'</p>\n"
1991 "") );
1992  gFunctionHelpTexts.insert( "totime", QCoreApplication::translate( "function_help", "<h3>totime() function</h3>\n"
1993 "Convert a string into Qt time type.\n"
1994 "\n"
1995 "<h4>Syntax</h4>\n"
1996 "<code>totime('string')</code><br>\n"
1997 "\n"
1998 "<h4>Arguments</h4>\n"
1999 "<code>string</code> - is string in Qt time format.\n"
2000 "<br>\n"
2001 "\n"
2002 "<h4>Example</h4>\n"
2003 "<!-- Show example of function.-->\n"
2004 "<code>totime('12:30:01') &rarr; 12:30:01</code><br>") );
2005  gFunctionHelpTexts.insert( "touches", QCoreApplication::translate( "function_help", "<h3>touches function</h3>\n"
2006 "Returns 1 if the geometries have at least one point in common, but their interiors do not intersect.\n"
2007 "\n"
2008 "<h4>Syntax</h4>\n"
2009 "<pre>touches( a, b )</pre>\n"
2010 "\n"
2011 "<h4>Arguments</h4>\n"
2012 "a &rarr; geometry\n"
2013 "b &rarr; geometry\n"
2014 "\n"
2015 "<h4>Example</h4>\n"
2016 "<pre> touches( geomFromWKT( 'LINESTRING(5 3 , 4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
2017 "<pre> touches( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) &rarr; returns 0</pre>\n"
2018 "") );
2019  gFunctionHelpTexts.insert( "transform", QCoreApplication::translate( "function_help", "<h3>transform function</h3>\n"
2020 "Returns the geometry transformed from the source CRS to the dest CRS.\n"
2021 "\n"
2022 "<h4>Syntax</h4>\n"
2023 "<pre>transform( geom, sAuthId, dAuthId )</pre>\n"
2024 "\n"
2025 "<h4>Arguments</h4>\n"
2026 "geom &rarr; QgsGeometry\n"
2027 "\n"
2028 "sCrsId &rarr; the Source Auth CRS Id\n"
2029 "\n"
2030 "dCrsId &rarr; the Dest Auth CRS Id\n"
2031 "\n"
2032 "<h4>Example</h4>\n"
2033 "<pre> geomToWKT( transform( $geometry, 'EPSG:2154', 'EPSG:4326' ) ) &rarr; POINT(0 51)</pre>\n"
2034 "") );
2035  gFunctionHelpTexts.insert( "trim", QCoreApplication::translate( "function_help", "<h3>trim() function</h3>\n"
2036 "Removes all leading and trailing whitespace (spaces, tabs, etc) from a string.\n"
2037 "\n"
2038 "<p><h4>Syntax</h4>\n"
2039 " trim(<i>string</i>)</p>\n"
2040 "\n"
2041 "<p><h4>Arguments</h4>\n"
2042 "<!-- List args for functions here-->\n"
2043 "<i> string</i> &rarr; is string. The string to trim.</p>\n"
2044 "\n"
2045 "<p><h4>Example</h4>\n"
2046 "<!-- Show example of function.-->\n"
2047 " trim(' hello world ') &rarr; 'hello world'</p>\n"
2048 "") );
2049  gFunctionHelpTexts.insert( "union", QCoreApplication::translate( "function_help", "<h3>union function</h3>\n"
2050 "Returns a geometry that represents the point set union of the geometries.\n"
2051 "\n"
2052 "<h4>Syntax</h4>\n"
2053 "<pre>union( a, b )</pre>\n"
2054 "\n"
2055 "<h4>Arguments</h4>\n"
2056 "a &rarr; geometry\n"
2057 "b &rarr; geometry\n"
2058 "\n"
2059 "<h4>Example</h4>\n"
2060 "<pre> geomToWKT( union( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) ) &rarr; returns MULTIPOINT(4 4, 5 5)</pre>\n"
2061 "") );
2062  gFunctionHelpTexts.insert( "upper", QCoreApplication::translate( "function_help", "<h3>upper() function</h3>\n"
2063 "Converts a string to upper case letters.\n"
2064 "\n"
2065 "<p><h4>Syntax</h4>\n"
2066 " upper(<i>string</i>)</p>\n"
2067 "\n"
2068 "<p><h4>Arguments</h4>\n"
2069 "<!-- List args for functions here-->\n"
2070 "<i> string</i> &rarr; is string. The String to convert to upper case.</p>\n"
2071 "\n"
2072 "<p><h4>Example</h4>\n"
2073 "<!-- Show example of function.-->\n"
2074 " upper('hello WOrld') &rarr; 'HELLO WORLD'</p>\n"
2075 "") );
2076  gFunctionHelpTexts.insert( "week", QCoreApplication::translate( "function_help", "<h3>week() function</h3>\n"
2077 "Extract the week number from a date, or the number of weeks\n"
2078 "from a <code>Interval</code>\n"
2079 "\n"
2080 "<h4>Syntax</h4>\n"
2081 "<code>week(date)</code><br>\n"
2082 "<code>week(Interval)</code><br>\n"
2083 "\n"
2084 "<h4>Arguments</h4>\n"
2085 "<code>date</code> - is date or datetime. The date to extract the week from.\n"
2086 "<br>\n"
2087 "<code>Interval</code> - is Interval. The Interval to return the number of weeks from.\n"
2088 "\n"
2089 "<h4>Example</h4>\n"
2090 "<!-- Show example of function.-->\n"
2091 "<code>week('2012-05-12') &rarr; 19</code><br>\n"
2092 "<code>week(tointerval('3 weeks')) &rarr; 3</code><br>\n"
2093 "<code>week(age('2012-01-01','2010-01-01')) &rarr; 104.285...</code><br>\n"
2094 "\n"
2095 "") );
2096  gFunctionHelpTexts.insert( "within", QCoreApplication::translate( "function_help", "<h3>within function</h3>\n"
2097 "Returns 1 if the geometry a is completely inside geometry b\n"
2098 "\n"
2099 "<h4>Syntax</h4>\n"
2100 "<pre>within( geometry a , geometry b)</pre>\n"
2101 "\n"
2102 "<h4>Arguments</h4>\n"
2103 "geometry &rarr; geometry\n"
2104 "geometry &rarr; geometry\n"
2105 "\n"
2106 "<h4>Example</h4>\n"
2107 "<pre> within( geomFromWKT( 'POINT( 0.5 0.5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) &rarr; returns 1</pre>\n"
2108 "<pre> within( geomFromWKT( 'POINT( 5 5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) &rarr; returns 0</pre>\n"
2109 "") );
2110  gFunctionHelpTexts.insert( "wordwrap", QCoreApplication::translate( "function_help", "<h3>wordwrap() function</h3>\n"
2111 "Returns a string wrapped to a maximum/minimum number of characters.\n"
2112 "\n"
2113 "<p><h4>Syntax</h4>\n"
2114 " wordwrap(<i>string,wrap_length[,delimiter_string]</i>)</p>\n"
2115 "\n"
2116 "<p><h4>Arguments</h4>\n"
2117 "<!-- List args for functions here-->\n"
2118 "<i> string</i> &rarr; is string. The string to be wrapped.<br>\n"
2119 "<i> wrap_length</i> &rarr; is number. If positive, the number represents the ideal maximum number of characters to wrap; if negative, the number represents the minimum number of characters to wrap.<br>\n"
2120 "<i> delimiter_string</i> &rarr; is string. The delimiter string to wrap to a new line (<u>optional</u>).<br></p>\n"
2121 "\n"
2122 "<p><h4>Example</h4>\n"
2123 "<!-- Show example of function.-->\n"
2124 " wordwrap('UNIVERSITY OF QGIS',13) &rarr; 'UNIVERSITY OF&#92;nQGIS'<br>\n"
2125 " wordwrap('UNIVERSITY OF QGIS',-3) &rarr; 'UNIVERSITY&#92;nOF QGIS'</p>\n"
2126 "") );
2127  gFunctionHelpTexts.insert( "xat", QCoreApplication::translate( "function_help", "<h3>xat() function</h3>\n"
2128 "Retrieves a x coordinate of the current feature\n"
2129 "\n"
2130 "<h4>Syntax</h4>\n"
2131 "<code>xat(i)</code>\n"
2132 "\n"
2133 "<h4>Arguments</h4>\n"
2134 "<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index).\n"
2135 "\n"
2136 "<h4>Example</h4>\n"
2137 "<pre>xat(1) &rarr; 5</pre>\n"
2138 "") );
2139  gFunctionHelpTexts.insert( "xmax", QCoreApplication::translate( "function_help", "<h3>xmax function</h3>\n"
2140 "Returns the maximum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2141 "\n"
2142 "<h4>Syntax</h4>\n"
2143 "<pre>xmax(geom)</pre>\n"
2144 "\n"
2145 "<h4>Arguments</h4>\n"
2146 "geom &rarr; a geometry\n"
2147 "\n"
2148 "<h4>Example</h4>\n"
2149 "<pre> xmax($geometry) &rarr; returns maximum x coordinate of $geometry</pre>\n"
2150 "\n"
2151 "") );
2152  gFunctionHelpTexts.insert( "xmin", QCoreApplication::translate( "function_help", "<h3>xmin function</h3>\n"
2153 "Returns the minimum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2154 "\n"
2155 "<h4>Syntax</h4>\n"
2156 "<pre>xmin(geom)</pre>\n"
2157 "\n"
2158 "<h4>Arguments</h4>\n"
2159 "geom &rarr; a geometry\n"
2160 "\n"
2161 "<h4>Example</h4>\n"
2162 "<pre> xmin($geometry) &rarr; returns minimum x coordinate of $geometry</pre>\n"
2163 "\n"
2164 "") );
2165  gFunctionHelpTexts.insert( "yat", QCoreApplication::translate( "function_help", "<h3>yat() function</h3>\n"
2166 "Retrieves a y coordinate of the current feature\n"
2167 "\n"
2168 "<h4>Syntax</h4>\n"
2169 "<code>yat(i)</code>\n"
2170 "\n"
2171 "<h4>Arguments</h4>\n"
2172 "<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index).\n"
2173 "\n"
2174 "<h4>Example</h4>\n"
2175 "<pre>yat(1) &rarr; 5</pre>\n"
2176 "") );
2177  gFunctionHelpTexts.insert( "year", QCoreApplication::translate( "function_help", "<h3>year() function</h3>\n"
2178 "Extract the year part from a date, or the number of years\n"
2179 "from a <code>Interval</code>\n"
2180 "\n"
2181 "<h4>Syntax</h4>\n"
2182 "<code>year(date)</code><br>\n"
2183 "<code>year(Interval)</code><br>\n"
2184 "\n"
2185 "<h4>Arguments</h4>\n"
2186 "<code>date</code> - is date or datetime. The date to extract the year from.\n"
2187 "<br>\n"
2188 "<code>Interval</code> - is Interval. The Interval to return the number of years from.\n"
2189 "\n"
2190 "<h4>Example</h4>\n"
2191 "<!-- Show example of function.-->\n"
2192 "<code>year('2012-05-12') &rarr; 2012</code><br>\n"
2193 "<code>year(tointerval('3 Years')) &rarr; 3</code><br>\n"
2194 "<code>year(age('2012-01-01','2010-01-01')) &rarr; 1.9986..</code><br>\n"
2195 "\n"
2196 "") );
2197  gFunctionHelpTexts.insert( "ymax", QCoreApplication::translate( "function_help", "<h3>ymax function</h3>\n"
2198 "Returns the maximum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2199 "\n"
2200 "<h4>Syntax</h4>\n"
2201 "<pre>ymax(geom)</pre>\n"
2202 "\n"
2203 "<h4>Arguments</h4>\n"
2204 "geom &rarr; a geometry\n"
2205 "\n"
2206 "<h4>Example</h4>\n"
2207 "<pre> ymax($geometry) &rarr; returns maximum y coordinate of $geometry</pre>\n"
2208 "\n"
2209 "") );
2210  gFunctionHelpTexts.insert( "ymin", QCoreApplication::translate( "function_help", "<h3>ymin function</h3>\n"
2211 "Returns the minimum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2212 "\n"
2213 "<h4>Syntax</h4>\n"
2214 "<pre>ymin(geom)</pre>\n"
2215 "\n"
2216 "<h4>Arguments</h4>\n"
2217 "geom &rarr; a geometry\n"
2218 "\n"
2219 "<h4>Example</h4>\n"
2220 "<pre> ymin($geometry) &rarr; returns minimum y coordinate of $geometry</pre>\n"
2221 "\n"
2222 "") );
2223 }