QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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( "Geometry", 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( "IS", QCoreApplication::translate( "function_help", "<h3>IS expression</h3>\n"
419 "Returns 1 if a is the same as b.\n"
420 "\n"
421 "<h4>Syntax</h4>\n"
422 "<pre>a IS b</pre>\n"
423 "\n"
424 "<h4>Arguments</h4>\n"
425 "None\n"
426 "\n"
427 "<h4>Example</h4>\n"
428 "<pre> 'A' IS 'A' &rarr; returns 1 </pre>\n"
429 "<pre> 'A' IS 'a' &rarr; returns 0 </pre>\n"
430 "<pre> 4 IS 4 &rarr; returns 1 </pre>\n"
431 "<pre> 4 IS 2+2 &rarr; returns 1 </pre>\n"
432 "<pre> 4 IS 2 &rarr; returns 0 </pre>\n"
433 "<pre> $geometry IS NULL &rarr; returns 0, if your geometry is not NULL</pre>\n"
434 "\n"
435 "") );
436  gFunctionHelpTexts.insert( "LIKE", QCoreApplication::translate( "function_help", "<h3>LIKE expression</h3>\n"
437 "Returns 1 if the first parameter matches the supplied pattern. Works with numbers also.\n"
438 "\n"
439 "<h4>Syntax</h4>\n"
440 "<pre>string/number LIKE pattern</pre>\n"
441 "\n"
442 "<h4>Arguments</h4>\n"
443 "None\n"
444 "\n"
445 "<h4>Example</h4>\n"
446 "<pre> 'A' LIKE 'A' &rarr; returns 1 </pre>\n"
447 "<pre> 'A' LIKE 'a' &rarr; returns 0 </pre>\n"
448 "<pre> 'A' LIKE 'B' &rarr; returns 0 </pre>\n"
449 "") );
450  gFunctionHelpTexts.insert( "Math", QCoreApplication::translate( "function_help", "<h3>Math Group</h3>\n"
451 "This group contains math functions e.g square root, sin and cos\n"
452 "") );
453  gFunctionHelpTexts.insert( "NOT", QCoreApplication::translate( "function_help", "<h3>NOT</h3>\n"
454 "Returns 1 if a is not the same as b.\n"
455 "\n"
456 "<h4>Syntax</h4>\n"
457 "<pre> a NOT b </pre>\n"
458 "\n"
459 "<h4>Arguments</h4>\n"
460 "None\n"
461 "\n"
462 "<h4>Example</h4>\n"
463 "<pre> 'a' IS NOT 'b' &rarr; returns 1 </pre>\n"
464 "<pre> 'a' IS NOT 'a' &rarr; returns 0 </pre>\n"
465 "<pre> 4 IS NOT 2+2 &rarr; returns 0 </pre>\n"
466 "\n"
467 "") );
468  gFunctionHelpTexts.insert( "OR", QCoreApplication::translate( "function_help", "<h3>OR logical operator</h3>\n"
469 "Returns 1 when condition a or b is true.\n"
470 "\n"
471 "<h4>Syntax</h4>\n"
472 "<pre> condition a OR condition b </pre>\n"
473 "\n"
474 "<h4>Arguments</h4>\n"
475 "None\n"
476 "\n"
477 "<h4>Example</h4>\n"
478 "<pre> 4 = 2+2 OR 1 = 1 &rarr; returns 1 </pre>\n"
479 "<pre> 4 = 2+2 OR 1 = 2 &rarr; returns 1 </pre>\n"
480 "<pre> 4 = 2 OR 1 = 2 &rarr; returns 0 </pre>\n"
481 "") );
482  gFunctionHelpTexts.insert( "Operators", QCoreApplication::translate( "function_help", "<h3>Operators Group</h3>\n"
483 "This group contains operators e.g + - * \n"
484 "") );
485  gFunctionHelpTexts.insert( "Record", QCoreApplication::translate( "function_help", "<h3>Record Group</h3>\n"
486 "This group contains functions that operate on record identifiers.\n"
487 "") );
488  gFunctionHelpTexts.insert( "String", QCoreApplication::translate( "function_help", "<h3>String Group</h3>\n"
489 "This group contains functions that operate on strings e.g replace, convert to upper case.\n"
490 "") );
491  gFunctionHelpTexts.insert( "abs", QCoreApplication::translate( "function_help", "<h3>abs() function</h3>\n"
492 "Returns the absolute value of a number.<br>\n"
493 "\n"
494 "\n"
495 "<h4>Syntax</h4>\n"
496 "abs(<i>value</i>)<br>\n"
497 "\n"
498 "<h4>Arguments</h4>\n"
499 "<code>value</code> - a number.<br>\n"
500 "\n"
501 "<h4>Example</h4>\n"
502 "<code>abs(-2) &rarr; 2</code><br>\n"
503 "") );
504  gFunctionHelpTexts.insert( "acos", QCoreApplication::translate( "function_help", "<h3>acos() function</h3>\n"
505 "Returns arcuscosinus of a value in radians.\n"
506 "\n"
507 "\n"
508 "<p><h4>Syntax</h4>\n"
509 " acos(<i>real</i>)</p>\n"
510 "\n"
511 "<p><h4>Arguments</h4>\n"
512 "<i>real</i> &rarr; cos of an angle.</p>\n"
513 "\n"
514 "<p><h4>Example</h4>\n"
515 " acos(0.5) &rarr; 1.0471975511966</p>\n"
516 "") );
517  gFunctionHelpTexts.insert( "age", QCoreApplication::translate( "function_help", "<h3>age() function</h3>\n"
518 "Returns the difference between two dates.\n"
519 "<br><br>\n"
520 "The difference is returned as a <code>Interval</code> \n"
521 "and needs to be used with one of the following functions\n"
522 "in order to extract useful information:\n"
523 "<ul>\n"
524 "<li><code>year</code>\n"
525 "<li><code>month</code>\n"
526 "<li><code>week</code>\n"
527 "<li><code>day</code>\n"
528 "<li><code>hour</code>\n"
529 "<li><code>minute</code>\n"
530 "<li><code>second</code>\n"
531 "</ul>\n"
532 "<h4>Syntax</h4>\n"
533 "<code>age(string,string)</code><br>\n"
534 "<code>age(datetime,datetime)</code><br>\n"
535 "<code>age(string,datetime)</code><br>\n"
536 "<code>age(datetime,string)</code><br>\n"
537 "\n"
538 "<h4>Arguments</h4>\n"
539 "<code>string</code> - is string. A string in date format.\n"
540 "<br>\n"
541 "<code>datetime</code> - is date or datetime. A date or datetime type.\n"
542 "\n"
543 "<h4>Example</h4>\n"
544 "<!-- Show example of function.-->\n"
545 "<code>age('2012-05-12','2012-05-2') &rarr; Interval</code><br>\n"
546 "use <code>day</code> to extract number of days<br>\n"
547 "<code>day(age('2012-05-12','2012-05-2')) &rarr; 10</code><br>\n"
548 "\n"
549 "") );
550  gFunctionHelpTexts.insert( "asin", QCoreApplication::translate( "function_help", "<h3>asin() function</h3>\n"
551 "Returns arcussinus of a value in radians.\n"
552 "\n"
553 "\n"
554 "<p><h4>Syntax</h4>\n"
555 " asin(<i>real</i>)</p>\n"
556 "\n"
557 "<p><h4>Arguments</h4>\n"
558 "<i>real</i> &rarr; sin of an angle.</p>\n"
559 "\n"
560 "<p><h4>Example</h4>\n"
561 " asin(1.0) &rarr; 1.5707963267949</p>\n"
562 "") );
563  gFunctionHelpTexts.insert( "atan", QCoreApplication::translate( "function_help", "<h3>atan() function</h3>\n"
564 "Returns arcustanget of a value in radians.\n"
565 "\n"
566 "\n"
567 "<p><h4>Syntax</h4>\n"
568 " atan(<i>real</i>)</p>\n"
569 "\n"
570 "<p><h4>Arguments</h4>\n"
571 "<i>real</i> &rarr; tan of an angle.</p>\n"
572 "\n"
573 "<p><h4>Example</h4>\n"
574 " atan(0.5) &rarr; 0.463647609000806</p>\n"
575 "") );
576  gFunctionHelpTexts.insert( "atan2", QCoreApplication::translate( "function_help", "<h3>atan2() function</h3>\n"
577 "Returns arcustangens of y/x using the signs of the two \n"
578 "arguments to determine the quadrant of the result\n"
579 "\n"
580 "\n"
581 "\n"
582 "<p><h4>Syntax</h4>\n"
583 " atan2(<i>real</i>, <i>real</i>)</p>\n"
584 "\n"
585 "<p><h4>Arguments</h4>\n"
586 "<i>real</i> &rarr; y coordinate difference<br>\n"
587 "<i>real</i> &rarr; x coordinate difference</p>\n"
588 "\n"
589 "<p><h4>Example</h4>\n"
590 " atan2(1.0, 1.732) &rarr; 0.523611477769969</p>\n"
591 "") );
592  gFunctionHelpTexts.insert( "attribute", QCoreApplication::translate( "function_help", "<h3>attribute function</h3>\n"
593 "Returns the value of a specified attribute from a feature.\n"
594 "\n"
595 "<h4>Syntax</h4>\n"
596 "<pre>attribute( feature, attribute_name )</pre>\n"
597 "\n"
598 "<h4>Arguments</h4>\n"
599 "feature &rarr; a feature<br />\n"
600 "attribute_name &rarr; name of attribute to be returned\n"
601 "\n"
602 "<h4>Example</h4>\n"
603 "<pre>attribute( $currentfeature, 'name' ) &rarr; returns value stored in 'name' attribute for the current feature</pre>\n"
604 "\n"
605 "") );
606  gFunctionHelpTexts.insert( "bbox", QCoreApplication::translate( "function_help", "<h3>bbox function</h3>\n"
607 "Returns 1 if the geometries spatially intersect the bounding box defined and 0 if they don't.\n"
608 "\n"
609 "<h4>Syntax</h4>\n"
610 "<pre>bbox( a, b )</pre>\n"
611 "\n"
612 "<h4>Arguments</h4>\n"
613 "a &rarr; geometry\n"
614 "b &rarr; geometry\n"
615 "\n"
616 "<h4>Example</h4>\n"
617 "<pre>bbox( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
618 "<pre>bbox( geomFromWKT( 'POINT(6 5)' ) , geomFromWKT( 'POLYGON((3 3 , 4 4 , 5 5, 3 3))' )) &rarr; returns 0</pre>\n"
619 "") );
620  gFunctionHelpTexts.insert( "bounds", QCoreApplication::translate( "function_help", "<h3>bounds function</h3>\n"
621 "Returns a geometry which represents the bounding box of an input geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
622 "\n"
623 "<h4>Syntax</h4>\n"
624 "<pre>bounds(geom)</pre>\n"
625 "\n"
626 "<h4>Arguments</h4>\n"
627 "geom &rarr; a geometry\n"
628 "\n"
629 "<h4>Example</h4>\n"
630 "<pre> bounds($geometry) &rarr; returns bounding box of $geometry</pre>\n"
631 "\n"
632 "") );
633  gFunctionHelpTexts.insert( "bounds_height", QCoreApplication::translate( "function_help", "<h3>bounds_height function</h3>\n"
634 "Returns the height of the bounding box of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
635 "\n"
636 "<h4>Syntax</h4>\n"
637 "<pre>bounds_height(geom)</pre>\n"
638 "\n"
639 "<h4>Arguments</h4>\n"
640 "geom &rarr; a geometry\n"
641 "\n"
642 "<h4>Example</h4>\n"
643 "<pre> bounds_height($geometry) &rarr; returns height of bounding box of $geometry</pre>\n"
644 "\n"
645 "") );
646  gFunctionHelpTexts.insert( "bounds_width", QCoreApplication::translate( "function_help", "<h3>bounds_width function</h3>\n"
647 "Returns the width of the bounding box of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
648 "\n"
649 "<h4>Syntax</h4>\n"
650 "<pre>bounds_width(geom)</pre>\n"
651 "\n"
652 "<h4>Arguments</h4>\n"
653 "geom &rarr; a geometry\n"
654 "\n"
655 "<h4>Example</h4>\n"
656 "<pre> bounds_width($geometry) &rarr; returns width of bounding box of $geometry</pre>\n"
657 "\n"
658 "") );
659  gFunctionHelpTexts.insert( "buffer", QCoreApplication::translate( "function_help", "<h3>buffer function</h3>\n"
660 "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"
661 "\n"
662 "<h4>Syntax</h4>\n"
663 "<pre>buffer(a, b)</pre>\n"
664 "\n"
665 "<h4>Arguments</h4>\n"
666 "a &rarr; geometry\n"
667 "b &rarr; distance for the buffer\n"
668 "\n"
669 "<h4>Example</h4>\n"
670 "<pre> buffer($geometry, 10.5 ) &rarr; returns a polygon</pre>\n"
671 "\n"
672 "") );
673  gFunctionHelpTexts.insert( "ceil", QCoreApplication::translate( "function_help", "<h3>ceil() function</h3>\n"
674 "Rounds a number upwards.\n"
675 "\n"
676 "<h4>Syntax</h4>\n"
677 "<code>ceil(value)</code><br>\n"
678 "\n"
679 "<h4>Arguments</h4>\n"
680 "<code>value</code> - a number.\n"
681 "<br>\n"
682 "\n"
683 "<h4>Example</h4>\n"
684 "<!-- Show example of function.-->\n"
685 "<code>ceil(4.9) &rarr; 5</code><br>\n"
686 "<code>ceil(-4.9) &rarr; -4</code><br>\n"
687 "") );
688  gFunctionHelpTexts.insert( "centroid", QCoreApplication::translate( "function_help", "<h3>centroid function</h3>\n"
689 "Returns the geometric center of a geometry.\n"
690 "\n"
691 "<h4>Syntax</h4>\n"
692 "<pre>centroid(a)</pre>\n"
693 "\n"
694 "<h4>Arguments</h4>\n"
695 "b &rarr; geometry\n"
696 "\n"
697 "<h4>Example</h4>\n"
698 "<pre> centroid($geometry) &rarr; returns a point geometry</pre>\n"
699 "\n"
700 "") );
701  gFunctionHelpTexts.insert( "clamp", QCoreApplication::translate( "function_help", "<h3>clamp() function</h3>\n"
702 "Restricts an input value to a specified range.\n"
703 "\n"
704 "<p><h4>Syntax</h4>\n"
705 " clamp(<i>minimum</i>,<i>input</i>,<i>maximum</i>)</p>\n"
706 "\n"
707 "<p><h4>Arguments</h4>\n"
708 "<!-- List args for functions here-->\n"
709 "<i> minimum</i> &rarr; The smallest value <i>input</i> is allowed to take.<br>\n"
710 "<i> input</i> &rarr; a value which will be restricted to the range specified by <i>minimum</i> and <i>maximum</i>.<br>\n"
711 "<i> maximum</i> &rarr; The largest value <i>input</i> is allowed to take.<br>\n"
712 "\n"
713 "<h4>Example</h4>\n"
714 "<!-- Show example of function.-->\n"
715 " clamp(1,5,10) &rarr; 5 (<i>input</i> is between 1 and 10 so is returned unchanged)<br>\n"
716 " clamp(1,0,10) &rarr; 1 (<i>input</i> is less than minimum value of 1, so function returns 1)<br>\n"
717 " clamp(1,11,10) &rarr; 10 (<i>input</i> is greater than maximum value of 10, so function returns 10)<br>\n"
718 " \n"
719 " \n"
720 "") );
721  gFunctionHelpTexts.insert( "coalesce", QCoreApplication::translate( "function_help", "<h3>coalesce() function</h3>\n"
722 "Returns the first non-NULL value from the expression list.\n"
723 "<br>\n"
724 "This function can take any number of arguments.\n"
725 "<h4>Syntax</h4>\n"
726 "<code>coalesce(expression1, expression2 ...)</code><br>\n"
727 "\n"
728 "<h4>Arguments</h4>\n"
729 "<code>expression</code> - any valid expression or value, irregardless of type.\n"
730 "<br>\n"
731 "\n"
732 "<h4>Example</h4>\n"
733 "<!-- Show example of function.-->\n"
734 "<code>coalesce(NULL, 2) &rarr; 2</code><br>\n"
735 "<code>coalesce(NULL, 2, 3) &rarr; 2</code><br>\n"
736 "<code>coalesce(7, NULL, 3*2) &rarr; 7</code><br><br>\n"
737 "<code>coalesce(\"fieldA\", \"fallbackField\", 'ERROR') &rarr; value of fieldA if it is non-NULL\n"
738 " else the value of \"fallbackField\" or the string 'ERROR' if both are NULL</code><br>\n"
739 "\n"
740 "") );
741  gFunctionHelpTexts.insert( "color_cmyk", QCoreApplication::translate( "function_help", "\n"
742 "<h3>color_cmyk() function</h3>\n"
743 "Returns a string representation of a color based on its cyan, magenta, yellow and black components\n"
744 "\n"
745 "<p><h4>Syntax</h4>\n"
746 " color_cmyk(<i>cyan, magenta, yellow, black</i>)</p>\n"
747 "\n"
748 "<p><h4>Arguments</h4>\n"
749 "<!-- List args for functions here-->\n"
750 "<i> cyan</i> &rarr; the cyan component of the color, as a percentage integer value from 0 to 100.<br>\n"
751 "<i> magenta</i> &rarr; the magenta component of the color, as a percentage integer value from 0 to 100.<br>\n"
752 "<i> yellow</i> &rarr; the yellow component of the color, as a percentage integer value from 0 to 100.<br>\n"
753 "<i> black</i> &rarr; the black component of the color, as a percentage integer value from 0 to 100.<br>\n"
754 "\n"
755 "<p><h4>Example</h4>\n"
756 "<!-- Show example of function.-->\n"
757 " color_cmyk(100,50,0,10) &rarr; '0,115,230'</p>\n"
758 "") );
759  gFunctionHelpTexts.insert( "color_cmyka", QCoreApplication::translate( "function_help", "\n"
760 "<h3>color_cmyka() function</h3>\n"
761 "Returns a string representation of a color based on its cyan, magenta, yellow, black and alpha (transparency) components\n"
762 "\n"
763 "<p><h4>Syntax</h4>\n"
764 " color_cmyka(<i>cyan, magenta, yellow, black, alpha</i>)</p>\n"
765 "\n"
766 "<p><h4>Arguments</h4>\n"
767 "<!-- List args for functions here-->\n"
768 "<i> cyan</i> &rarr; the cyan component of the color, as a percentage integer value from 0 to 100.<br>\n"
769 "<i> magenta</i> &rarr; the magenta component of the color, as a percentage integer value from 0 to 100.<br>\n"
770 "<i> yellow</i> &rarr; the yellow component of the color, as a percentage integer value from 0 to 100.<br>\n"
771 "<i> black</i> &rarr; the black component of the color, as a percentage integer value from 0 to 100.<br>\n"
772 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
773 "\n"
774 "<p><h4>Example</h4>\n"
775 "<!-- Show example of function.-->\n"
776 " color_cmyka(100,50,0,10,200) &rarr; '0,115,230,200'</p>\n"
777 "") );
778  gFunctionHelpTexts.insert( "color_hsl", QCoreApplication::translate( "function_help", "<h3>color_hsl() function</h3>\n"
779 "Returns a string representation of a color based on its hue, saturation, and lightness attributes\n"
780 "\n"
781 "<p><h4>Syntax</h4>\n"
782 " color_hsl(<i>hue, saturation, lightness</i>)</p>\n"
783 "\n"
784 "<p><h4>Arguments</h4>\n"
785 "<!-- List args for functions here-->\n"
786 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
787 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
788 "<i> lightness</i> &rarr; the lightness percentage of the color as an integer value from 0 to 100.<br>\n"
789 "\n"
790 "<p><h4>Example</h4>\n"
791 "<!-- Show example of function.-->\n"
792 " color_hsl(100,50,70) &rarr; '166,217,140'</p>\n"
793 "") );
794  gFunctionHelpTexts.insert( "color_hsla", QCoreApplication::translate( "function_help", "<h3>color_hsla() function</h3>\n"
795 "Returns a string representation of a color based on its hue, saturation, lightness and alpha (transparency) attributes\n"
796 "\n"
797 "<p><h4>Syntax</h4>\n"
798 " color_hsla(<i>hue, saturation, lightness, alpha</i>)</p>\n"
799 "\n"
800 "<p><h4>Arguments</h4>\n"
801 "<!-- List args for functions here-->\n"
802 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
803 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
804 "<i> lightness</i> &rarr; the lightness percentage of the color as an integer value from 0 to 100.<br>\n"
805 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
806 "\n"
807 "<p><h4>Example</h4>\n"
808 "<!-- Show example of function.-->\n"
809 " color_hsla(100,50,70,200) &rarr; '166,217,140,200'</p>\n"
810 "") );
811  gFunctionHelpTexts.insert( "color_hsv", QCoreApplication::translate( "function_help", "<h3>color_hsv() function</h3>\n"
812 "Returns a string representation of a color based on its hue, saturation, and value attributes\n"
813 "\n"
814 "<p><h4>Syntax</h4>\n"
815 " color_hsv(<i>hue, saturation, value</i>)</p>\n"
816 "\n"
817 "<p><h4>Arguments</h4>\n"
818 "<!-- List args for functions here-->\n"
819 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
820 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
821 "<i> value</i> &rarr; the value percentage of the color as an integer from 0 to 100.<br>\n"
822 "\n"
823 "<p><h4>Example</h4>\n"
824 "<!-- Show example of function.-->\n"
825 " color_hsv(40,100,100) &rarr; '255,170,0'</p>\n"
826 "") );
827  gFunctionHelpTexts.insert( "color_hsva", QCoreApplication::translate( "function_help", "<h3>color_hsva() function</h3>\n"
828 "Returns a string representation of a color based on its hue, saturation, value and alpha (transparency) attributes\n"
829 "\n"
830 "<p><h4>Syntax</h4>\n"
831 " color_hsva(<i>hue, saturation, value, alpha</i>)</p>\n"
832 "\n"
833 "<p><h4>Arguments</h4>\n"
834 "<!-- List args for functions here-->\n"
835 "<i> hue</i> &rarr; the hue of the color, as an integer value from 0 to 360.<br>\n"
836 "<i> saturation</i> &rarr; the saturation percentage of the color as an integer value from 0 to 100.<br>\n"
837 "<i> value</i> &rarr; the value percentage of the color as an integer from 0 to 100.<br>\n"
838 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
839 "\n"
840 "<p><h4>Example</h4>\n"
841 "<!-- Show example of function.-->\n"
842 " color_hsva(40,100,100,200) &rarr; '255,170,0,200'</p>\n"
843 "") );
844  gFunctionHelpTexts.insert( "color_rgb", QCoreApplication::translate( "function_help", "\n"
845 "<h3>color_rgb() function</h3>\n"
846 "Returns a string representation of a color based on its red, green, and blue components\n"
847 "\n"
848 "<p><h4>Syntax</h4>\n"
849 " color_rgb(<i>red, green, blue</i>)</p>\n"
850 "\n"
851 "<p><h4>Arguments</h4>\n"
852 "<!-- List args for functions here-->\n"
853 "<i> red</i> &rarr; the red component as an integer value from 0 to 255.<br>\n"
854 "<i> green</i> &rarr; the green component as an integer value from 0 to 255.<br>\n"
855 "<i> blue</i> &rarr; the blue component as an integer value from 0 to 255.<br>\n"
856 "\n"
857 "<p><h4>Example</h4>\n"
858 "<!-- Show example of function.-->\n"
859 " color_rgb(255,127,0) &rarr; '255,127,0'</p>\n"
860 "") );
861  gFunctionHelpTexts.insert( "color_rgba", QCoreApplication::translate( "function_help", "\n"
862 "<h3>color_rgba() function</h3>\n"
863 "Returns a string representation of a color based on its red, green, blue, and alpha (transparency) components\n"
864 "\n"
865 "<p><h4>Syntax</h4>\n"
866 " color_rgba(<i>red, green, blue, alpha</i>)</p>\n"
867 "\n"
868 "<p><h4>Arguments</h4>\n"
869 "<!-- List args for functions here-->\n"
870 "<i> red</i> &rarr; the red component as an integer value from 0 to 255.<br>\n"
871 "<i> green</i> &rarr; the green component as an integer value from 0 to 255.<br>\n"
872 "<i> blue</i> &rarr; the blue component as an integer value from 0 to 255.<br>\n"
873 "<i> alpha</i> &rarr; the alpha component as an integer value from 0 (completely transparent) to 255 (opaque).<br>\n"
874 "\n"
875 "<p><h4>Example</h4>\n"
876 "<!-- Show example of function.-->\n"
877 " color_rgba(255,127,0,200) &rarr; '255,127,0,200'</p>\n"
878 "") );
879  gFunctionHelpTexts.insert( "combine", QCoreApplication::translate( "function_help", "<h3>combine function</h3>\n"
880 "Returns the combination of geometry a and geometry b.\n"
881 "\n"
882 "<h4>Syntax</h4>\n"
883 "<pre>combine( geometry a , geometry b)</pre>\n"
884 "\n"
885 "<h4>Arguments</h4>\n"
886 "geometry &rarr; geometry\n"
887 "geometry &rarr; geometry\n"
888 "\n"
889 "<h4>Example</h4>\n"
890 "<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"
891 "<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"
892 "") );
893  gFunctionHelpTexts.insert( "concat", QCoreApplication::translate( "function_help", "<h3>concat() function</h3>\n"
894 "Concatenates several strings to one.\n"
895 "\n"
896 "<h4>Syntax</h4>\n"
897 " concat(<i>string<i>[,<i>string</i>...])\n"
898 "\n"
899 "<h4>Arguments</h4>\n"
900 "<!-- List args for functions here-->\n"
901 "<i> string</i> &rarr; is string. a string.<br>\n"
902 "\n"
903 "<h4>Example</h4>\n"
904 "<!-- Show example of function.-->\n"
905 " concat('a','b','c','d','e') &rarr; 'abcde'\n"
906 "") );
907  gFunctionHelpTexts.insert( "contains", QCoreApplication::translate( "function_help", "<h3>contains function</h3>\n"
908 "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"
909 "\n"
910 "<h4>Syntax</h4>\n"
911 "<pre>contains( geometry a , geometry b)</pre>\n"
912 "\n"
913 "<h4>Arguments</h4>\n"
914 "geometry &rarr; geometry\n"
915 "geometry &rarr; geometry\n"
916 "\n"
917 "<h4>Example</h4>\n"
918 "<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"
919 "<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"
920 "") );
921  gFunctionHelpTexts.insert( "convexHull", QCoreApplication::translate( "function_help", "<h3>convexHull function</h3>\n"
922 "Returns the convex hull of a geometry. It represents the minimum convex geometry that encloses all geometries within the set.\n"
923 "\n"
924 "<h4>Syntax</h4>\n"
925 "<pre>convexHull( a, b )</pre>\n"
926 "\n"
927 "<h4>Arguments</h4>\n"
928 "a &rarr; geometry\n"
929 "a &rarr; geometry\n"
930 "\n"
931 "<h4>Example</h4>\n"
932 "<pre> geomToWKT( convexHull( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 4 10)' )) ) &rarr; returns POLYGON((3 3,4 10,4 4,3 3)) </pre>\n"
933 "") );
934  gFunctionHelpTexts.insert( "cos", QCoreApplication::translate( "function_help", "<h3>cos() function</h3>\n"
935 "Returns cosinus of an angle.\n"
936 "\n"
937 "\n"
938 "<p><h4>Syntax</h4>\n"
939 " cos(<i>real</i>)</p>\n"
940 "\n"
941 "<p><h4>Arguments</h4>\n"
942 "<i>real</i> &rarr; angle in radians.</p>\n"
943 "\n"
944 "<p><h4>Example</h4>\n"
945 " cos(1.571) &rarr; 0.000796326710733263</p>\n"
946 "") );
947  gFunctionHelpTexts.insert( "crosses", QCoreApplication::translate( "function_help", "<h3>crosses function</h3>\n"
948 "Returns 1 if the supplied geometries have some, but not all, interior points in common.\n"
949 "\n"
950 "<h4>Syntax</h4>\n"
951 "<pre>crosses( $geometry , $geometry)</pre>\n"
952 "\n"
953 "<h4>Arguments</h4>\n"
954 "geometry &rarr; geometry\n"
955 "geometry &rarr; geometry\n"
956 "\n"
957 "<h4>Example</h4>\n"
958 "<pre> crosses( geomFromWKT( 'LINESTRING(3 5 , 4 4 , 5 3)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
959 "<pre> crosses( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 0</pre>\n"
960 "") );
961  gFunctionHelpTexts.insert( "day", QCoreApplication::translate( "function_help", "<h3>day() function</h3>\n"
962 "Extract the day from a date, or the number of days\n"
963 "from a <code>Interval</code>\n"
964 "\n"
965 "<h4>Syntax</h4>\n"
966 "<code>day(date)</code><br>\n"
967 "<code>day(Interval)</code><br>\n"
968 "\n"
969 "<h4>Arguments</h4>\n"
970 "<code>date</code> - is date or datetime. The date to extract the day from.\n"
971 "<br>\n"
972 "<code>Interval</code> - is Interval. The Interval to return the number of days from.\n"
973 "\n"
974 "<h4>Example</h4>\n"
975 "<!-- Show example of function.-->\n"
976 "<code>day('2012-05-12') &rarr; 12</code><br>\n"
977 "<code>day(tointerval('3 days')) &rarr; 3</code><br>\n"
978 "<code>day(age('2012-01-01','2010-01-01')) &rarr; 730</code><br>\n"
979 "\n"
980 "") );
981  gFunctionHelpTexts.insert( "difference", QCoreApplication::translate( "function_help", "<h3>difference function</h3>\n"
982 "Returns a geometry that represents that part of geometry a that does not intersect with geometry b.\n"
983 "\n"
984 "<h4>Syntax</h4>\n"
985 "<pre>difference( a, b )</pre>\n"
986 "\n"
987 "<h4>Arguments</h4>\n"
988 "geometry &rarr; geometry\n"
989 "geometry &rarr; geometry\n"
990 "\n"
991 "<h4>Example</h4>\n"
992 "<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"
993 "") );
994  gFunctionHelpTexts.insert( "disjoint", QCoreApplication::translate( "function_help", "<h3>disjoint function</h3>\n"
995 "Returns 1 if the geometries do not \"spatially intersect\" - if they do not share any space together. \n"
996 "\n"
997 "<h4>Syntax</h4>\n"
998 "<pre>disjoint( a, b )</pre>\n"
999 "\n"
1000 "<h4>Arguments</h4>\n"
1001 "a &rarr; geometry\n"
1002 "b &rarr; geometry\n"
1003 "\n"
1004 "<h4>Example</h4>\n"
1005 "<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"
1006 "<pre> disjoint( geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ) , geomFromWKT( 'POINT(4 4)' )) &rarr; returns 0</pre>\n"
1007 "") );
1008  gFunctionHelpTexts.insert( "distance", QCoreApplication::translate( "function_help", "<h3>distance function</h3>\n"
1009 " Returns the minimum distance (based on spatial ref) between two geometries in projected units.\n"
1010 "\n"
1011 "<h4>Syntax</h4>\n"
1012 "<pre>distance( 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> distance( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(4 8)' )) &rarr; returns 4</pre>\n"
1020 "") );
1021  gFunctionHelpTexts.insert( "exp", QCoreApplication::translate( "function_help", "<h3>exp() function</h3>\n"
1022 "Returns exponential of an value.\n"
1023 "\n"
1024 "\n"
1025 "<p><h4>Syntax</h4>\n"
1026 " exp(<i>real</i>)</p>\n"
1027 "\n"
1028 "<p><h4>Arguments</h4>\n"
1029 "<i>real</i> &rarr; number.</p>\n"
1030 "\n"
1031 "<p><h4>Example</h4>\n"
1032 " exp(1.0) &rarr; 2.71828182845905</p>\n"
1033 "") );
1034  gFunctionHelpTexts.insert( "floor", QCoreApplication::translate( "function_help", "<h3>floor() function</h3>\n"
1035 "Rounds a number downwards.\n"
1036 "\n"
1037 "<h4>Syntax</h4>\n"
1038 "<code>floor(value)</code><br>\n"
1039 "\n"
1040 "<h4>Arguments</h4>\n"
1041 "<code>value</code> - a number.\n"
1042 "<br>\n"
1043 "\n"
1044 "<h4>Example</h4>\n"
1045 "<!-- Show example of function.-->\n"
1046 "<code>floor(4.9) &rarr; 4</code><br>\n"
1047 "<code>floor(-4.9) &rarr; -5</code><br>\n"
1048 "") );
1049  gFunctionHelpTexts.insert( "format", QCoreApplication::translate( "function_help", "<h3>format() function</h3>\n"
1050 "Format a string using supplied arguments. \n"
1051 "\n"
1052 "<h4>Syntax</h4>\n"
1053 "<code>format('string', arg, [arg...n])</code><br>\n"
1054 "\n"
1055 "<h4>Arguments</h4>\n"
1056 "<code>string</code> - is string. String with Qt QString place holders. Use %1, %2, etc for placeholders. Placeholders can be repeated. \n"
1057 "<br>\n"
1058 "<code>arg [arg...n]</code> - any type. Any number of args. \n"
1059 "\n"
1060 "<h4>Example</h4>\n"
1061 "<!-- Show example of function.-->\n"
1062 "<code>format('This %1 a %2','is', 'test') &rarr; This is a test</code><br>") );
1063  gFunctionHelpTexts.insert( "format_date", QCoreApplication::translate( "function_help", "<h3>format_date() function</h3>\n"
1064 "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"
1065 "\n"
1066 "<h4>Syntax</h4>\n"
1067 "<code>format_date('string', 'format_string')</code><br>\n"
1068 "\n"
1069 "<h4>Arguments</h4>\n"
1070 "<code>string</code> - is string. Date/Time/DateTime string.\n"
1071 "<br>\n"
1072 "<code>format_string</code> - is string. String template used to format the string.\n"
1073 "\n"
1074 " <table>\n"
1075 " <thead>\n"
1076 " <tr>\n"
1077 " <th>Expression</th>\n"
1078 "\n"
1079 " <th>Output</th>\n"
1080 " </tr>\n"
1081 " </thead>\n"
1082 "\n"
1083 " <tr valign=\"top\">\n"
1084 " <td>d</td>\n"
1085 "\n"
1086 " <td>the day as number without a leading zero (1 to 31)</td>\n"
1087 " </tr>\n"
1088 "\n"
1089 " <tr valign=\"top\">\n"
1090 " <td>dd</td>\n"
1091 "\n"
1092 " <td>the day as number with a leading zero (01 to 31)</td>\n"
1093 " </tr>\n"
1094 "\n"
1095 " <tr valign=\"top\">\n"
1096 " <td>ddd</td>\n"
1097 "\n"
1098 " <td>the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses <a href=\n"
1099 " \"qdate.html#shortDayName\">QDate::shortDayName</a>().</td>\n"
1100 " </tr>\n"
1101 "\n"
1102 " <tr valign=\"top\">\n"
1103 " <td>dddd</td>\n"
1104 "\n"
1105 " <td>the long localized day name (e.g. 'Monday' to 'Sunday'). Uses <a href=\n"
1106 " \"qdate.html#longDayName\">QDate::longDayName</a>().</td>\n"
1107 " </tr>\n"
1108 "\n"
1109 " <tr valign=\"top\">\n"
1110 " <td>M</td>\n"
1111 "\n"
1112 " <td>the month as number without a leading zero (1-12)</td>\n"
1113 " </tr>\n"
1114 "\n"
1115 " <tr valign=\"top\">\n"
1116 " <td>MM</td>\n"
1117 "\n"
1118 " <td>the month as number with a leading zero (01-12)</td>\n"
1119 " </tr>\n"
1120 "\n"
1121 " <tr valign=\"top\">\n"
1122 " <td>MMM</td>\n"
1123 "\n"
1124 " <td>the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses <a href=\n"
1125 " \"qdate.html#shortMonthName\">QDate::shortMonthName</a>().</td>\n"
1126 " </tr>\n"
1127 "\n"
1128 " <tr valign=\"top\">\n"
1129 " <td>MMMM</td>\n"
1130 "\n"
1131 " <td>the long localized month name (e.g. 'January' to 'December'). Uses <a href=\n"
1132 " \"qdate.html#longMonthName\">QDate::longMonthName</a>().</td>\n"
1133 " </tr>\n"
1134 "\n"
1135 " <tr valign=\"top\">\n"
1136 " <td>yy</td>\n"
1137 "\n"
1138 " <td>the year as two digit number (00-99)</td>\n"
1139 " </tr>\n"
1140 "\n"
1141 " <tr valign=\"top\">\n"
1142 " <td>yyyy</td>\n"
1143 "\n"
1144 " <td>the year as four digit number</td>\n"
1145 " </tr>\n"
1146 " </table>\n"
1147 "\n"
1148 " <p>These expressions may be used for the time part of the format string:</p>\n"
1149 "\n"
1150 " <table>\n"
1151 " <thead>\n"
1152 " <tr>\n"
1153 " <th>Expression</th>\n"
1154 "\n"
1155 " <th>Output</th>\n"
1156 " </tr>\n"
1157 " </thead>\n"
1158 "\n"
1159 " <tr valign=\"top\">\n"
1160 " <td>h</td>\n"
1161 "\n"
1162 " <td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td>\n"
1163 " </tr>\n"
1164 "\n"
1165 " <tr valign=\"top\">\n"
1166 " <td>hh</td>\n"
1167 "\n"
1168 " <td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td>\n"
1169 " </tr>\n"
1170 "\n"
1171 " <tr valign=\"top\">\n"
1172 " <td>H</td>\n"
1173 "\n"
1174 " <td>the hour without a leading zero (0 to 23, even with AM/PM display)</td>\n"
1175 " </tr>\n"
1176 "\n"
1177 " <tr valign=\"top\">\n"
1178 " <td>HH</td>\n"
1179 "\n"
1180 " <td>the hour with a leading zero (00 to 23, even with AM/PM display)</td>\n"
1181 " </tr>\n"
1182 "\n"
1183 " <tr valign=\"top\">\n"
1184 " <td>m</td>\n"
1185 "\n"
1186 " <td>the minute without a leading zero (0 to 59)</td>\n"
1187 " </tr>\n"
1188 "\n"
1189 " <tr valign=\"top\">\n"
1190 " <td>mm</td>\n"
1191 "\n"
1192 " <td>the minute with a leading zero (00 to 59)</td>\n"
1193 " </tr>\n"
1194 "\n"
1195 " <tr valign=\"top\">\n"
1196 " <td>s</td>\n"
1197 "\n"
1198 " <td>the second without a leading zero (0 to 59)</td>\n"
1199 " </tr>\n"
1200 "\n"
1201 " <tr valign=\"top\">\n"
1202 " <td>ss</td>\n"
1203 "\n"
1204 " <td>the second with a leading zero (00 to 59)</td>\n"
1205 " </tr>\n"
1206 "\n"
1207 " <tr valign=\"top\">\n"
1208 " <td>z</td>\n"
1209 "\n"
1210 " <td>the milliseconds without leading zeroes (0 to 999)</td>\n"
1211 " </tr>\n"
1212 "\n"
1213 " <tr valign=\"top\">\n"
1214 " <td>zzz</td>\n"
1215 "\n"
1216 " <td>the milliseconds with leading zeroes (000 to 999)</td>\n"
1217 " </tr>\n"
1218 "\n"
1219 " <tr valign=\"top\">\n"
1220 " <td>AP or A</td>\n"
1221 "\n"
1222 " <td>interpret as an AM/PM time. <i>AP</i> must be either \"AM\" or \"PM\".</td>\n"
1223 " </tr>\n"
1224 "\n"
1225 " <tr valign=\"top\">\n"
1226 " <td>ap or a</td>\n"
1227 "\n"
1228 " <td>Interpret as an AM/PM time. <i>ap</i> must be either \"am\" or \"pm\".</td>\n"
1229 " </tr>\n"
1230 " </table>\n"
1231 "\n"
1232 "<br>\n"
1233 "\n"
1234 "<h4>Example</h4>\n"
1235 "<!-- Show example of function.-->\n"
1236 "<code>format_date('2012-05-15','dd.mm.yyyy') &rarr; 15.05.2012</code><br>\n"
1237 "") );
1238  gFunctionHelpTexts.insert( "format_number", QCoreApplication::translate( "function_help", "<h3>format_number() function</h3>\n"
1239 "Returns a number formatted with the locale separator for thousands. \n"
1240 "Also truncates the number to the number of supplied places. \n"
1241 "<h4>Syntax</h4>\n"
1242 "<code>format_number(number,places)</code><br>\n"
1243 "\n"
1244 "<h4>Arguments</h4>\n"
1245 "<code>number</code> - is number. The number to be formatted.\n"
1246 "<br>\n"
1247 "<code>places</code> - is int. The number of decimal places to truncate the string\n"
1248 "to.\n"
1249 "\n"
1250 "<h4>Example</h4>\n"
1251 "<!-- Show example of function.-->\n"
1252 "<code>format_number(10000000.332,2) &rarr; 10,000,000.33</code>\n"
1253 "\n"
1254 "") );
1255  gFunctionHelpTexts.insert( "geomFromGML", QCoreApplication::translate( "function_help", "<h3>geomFromGML function</h3>\n"
1256 "Returns a geometry from a GML representation of geometry\n"
1257 "\n"
1258 "<h4>Syntax</h4>\n"
1259 "<pre>geomFromGML(text)</pre>\n"
1260 "\n"
1261 "<h4>Arguments</h4>\n"
1262 "text &rarr; GML representation of a geometry\n"
1263 "\n"
1264 "<h4>Example</h4>\n"
1265 "<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"
1266 "\n"
1267 "") );
1268  gFunctionHelpTexts.insert( "geomFromWKT", QCoreApplication::translate( "function_help", "<h3>geomFromWKT function</h3>\n"
1269 "Returns a geometry created from a Well-Known Text (WKT) representation.\n"
1270 "\n"
1271 "<h4>Syntax</h4>\n"
1272 "<pre>geomFromWKT(text)</pre>\n"
1273 "\n"
1274 "<h4>Arguments</h4>\n"
1275 "text &rarr; Well-Known Text (WKT) representation of a geometry\n"
1276 "\n"
1277 "<h4>Example</h4>\n"
1278 "<pre> geomFromWKT( 'POINT(4 5)' ) &rarr; returns a geometry</pre>\n"
1279 "\n"
1280 "") );
1281  gFunctionHelpTexts.insert( "geomToWKT", QCoreApplication::translate( "function_help", "<h3>geomToWKT function</h3>\n"
1282 "Returns the Well-Known Text (WKT) representation of the geometry without SRID metadata.\n"
1283 "\n"
1284 "<h4>Syntax</h4>\n"
1285 "<pre>geomToWKT(a)</pre>\n"
1286 "\n"
1287 "<h4>Arguments</h4>\n"
1288 "a &rarr; geometry\n"
1289 "\n"
1290 "<h4>Example</h4>\n"
1291 "<pre> geomToWKT( $geometry ) &rarr; POINT(6 50)</pre>\n"
1292 "") );
1293  gFunctionHelpTexts.insert( "hour", QCoreApplication::translate( "function_help", "<h3>hour() function</h3>\n"
1294 "Extract the hour from a datetime or time, or the number of hours\n"
1295 "from a <code>Interval</code>\n"
1296 "\n"
1297 "<h4>Syntax</h4>\n"
1298 "<code>hour(datetime)</code><br>\n"
1299 "<code>hour(Interval)</code><br>\n"
1300 "\n"
1301 "<h4>Arguments</h4>\n"
1302 "<code>date</code> - is datetime or time. The date to extract the hour from.\n"
1303 "<br>\n"
1304 "<code>Interval</code> - is Interval. The Interval to return the number of hours from.\n"
1305 "\n"
1306 "<h4>Example</h4>\n"
1307 "<!-- Show example of function.-->\n"
1308 "<code>hour('2012-07-22T13:24:57') &rarr; 13</code><br>\n"
1309 "<code>hour(tointerval('3 hours')) &rarr; 3</code><br>\n"
1310 "<code>hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00')) &rarr; 3</code><br>\n"
1311 "<code>hour(age('2012-01-01','2010-01-01')) &rarr; 17520</code><br>\n"
1312 "\n"
1313 "") );
1314  gFunctionHelpTexts.insert( "intersection", QCoreApplication::translate( "function_help", "<h3>intersection function</h3>\n"
1315 "Returns a geometry that represents the shared portion of geometry a and geometry b.\n"
1316 "\n"
1317 "<h4>Syntax</h4>\n"
1318 "<pre>intersection( geometry a , geometry b)</pre>\n"
1319 "\n"
1320 "<h4>Arguments</h4>\n"
1321 "geometry &rarr; geometry\n"
1322 "geometry &rarr; geometry\n"
1323 "\n"
1324 "<h4>Example</h4>\n"
1325 "<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"
1326 "") );
1327  gFunctionHelpTexts.insert( "intersects", QCoreApplication::translate( "function_help", "<h3>intersects function</h3>\n"
1328 "Returns 1 if the geometries spatially intersect (share any portion of space) and 0 if they don't.\n"
1329 "\n"
1330 "<h4>Syntax</h4>\n"
1331 "<pre>intersects( a, b )</pre>\n"
1332 "\n"
1333 "<h4>Arguments</h4>\n"
1334 "a &rarr; geometry\n"
1335 "b &rarr; geometry\n"
1336 "\n"
1337 "<h4>Example</h4>\n"
1338 "<pre> intersects( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
1339 "<pre> intersects( geomFromWKT( 'POINT(4 5)' ) , geomFromWKT( 'POINT(5 5)' )) &rarr; returns 0</pre>\n"
1340 "") );
1341  gFunctionHelpTexts.insert( "left", QCoreApplication::translate( "function_help", "<h3>left() function</h3>\n"
1342 "Returns a substring that contains the <i>n</i> leftmost characters of the string.\n"
1343 "\n"
1344 "<h4>Syntax</h4>\n"
1345 "<code>left(string, length)</code><br>\n"
1346 "\n"
1347 "<h4>Arguments</h4>\n"
1348 "<code>string</code> - is string. The string.\n"
1349 "<br>\n"
1350 "<code>length</code> - is int. The number of characters from the left to return.\n"
1351 "\n"
1352 "<h4>Example</h4>\n"
1353 "<!-- Show example of function.-->\n"
1354 "<code>left('Hello World',5) &rarr; 'Hello'</code><br>\n"
1355 "\n"
1356 "") );
1357  gFunctionHelpTexts.insert( "length", QCoreApplication::translate( "function_help", "<h3>length() function</h3>\n"
1358 "Returns the length of a string.\n"
1359 "\n"
1360 "<p><h4>Syntax</h4>\n"
1361 " length(<i>string</i>)</p>\n"
1362 "\n"
1363 "<p><h4>Arguments</h4>\n"
1364 "<!-- List args for functions here-->\n"
1365 "<i> string</i> &rarr; is string. The String to count the length of.</p>\n"
1366 "\n"
1367 "<p><h4>Example</h4>\n"
1368 "<!-- Show example of function.-->\n"
1369 " length('HELLO') &rarr; 5</p>\n"
1370 "") );
1371  gFunctionHelpTexts.insert( "ln", QCoreApplication::translate( "function_help", "<h3>ln() function</h3>\n"
1372 "Returns the value of the natural logarithm of the passed expression.\n"
1373 "<br>\n"
1374 "This function takes one argument.\n"
1375 "<h4>Syntax</h4>\n"
1376 "<code>ln(value)</code><br>\n"
1377 "\n"
1378 "<h4>Arguments</h4>\n"
1379 "<code>value</code> - any positive number.\n"
1380 "<br>\n"
1381 "\n"
1382 "<h4>Example</h4>\n"
1383 "<!-- Show example of function.-->\n"
1384 "<code>ln(1) &rarr; 0</code><br>\n"
1385 "<code>ln(2.7182818284590452354) &rarr; 1</code><br>\n"
1386 "") );
1387  gFunctionHelpTexts.insert( "log", QCoreApplication::translate( "function_help", "<h3>log() function</h3>\n"
1388 "Returns the value of the logarithm of the passed value and base.\n"
1389 "<br>\n"
1390 "This function takes two arguments.\n"
1391 "<h4>Syntax</h4>\n"
1392 "<code>log(base, value)</code><br>\n"
1393 "\n"
1394 "<h4>Arguments</h4>\n"
1395 "<code>base</code> - any positive number.<br>\n"
1396 "<code>value</code> - any positive number.\n"
1397 "<br>\n"
1398 "\n"
1399 "<h4>Example</h4>\n"
1400 "<!-- Show example of function.-->\n"
1401 "<code>log(2, 32) &rarr; 5</code><br>\n"
1402 "<code>log(0.5, 32) &rarr; -5</code><br>\n"
1403 "") );
1404  gFunctionHelpTexts.insert( "log10", QCoreApplication::translate( "function_help", "<h3>log10() function</h3>\n"
1405 "Returns the value of the base 10 logarithm of the passed expression.\n"
1406 "<br>\n"
1407 "This function takes one argument.\n"
1408 "<h4>Syntax</h4>\n"
1409 "<code>log10(value)</code><br>\n"
1410 "\n"
1411 "<h4>Arguments</h4>\n"
1412 "<code>value</code> - any positive number.\n"
1413 "<br>\n"
1414 "\n"
1415 "<h4>Example</h4>\n"
1416 "<!-- Show example of function.-->\n"
1417 "<code>log10(1) &rarr; 0</code><br>\n"
1418 "<code>log10(100) &rarr; 2</code><br>\n"
1419 "") );
1420  gFunctionHelpTexts.insert( "lower", QCoreApplication::translate( "function_help", "<h3>lower() function</h3>\n"
1421 "Converts a string to lower case letters.\n"
1422 "\n"
1423 "<p><h4> Syntax</h4>\n"
1424 " lower(<i>string</i>)</p>\n"
1425 "\n"
1426 "<p><h4> Arguments</h4>\n"
1427 "<i> string</i> &rarr; is string. The String to convert to lower case.</p>\n"
1428 "\n"
1429 "<p><h4> Example</h4>\n"
1430 " lower('HELLO World') &rarr; 'hello world'</p>\n"
1431 "") );
1432  gFunctionHelpTexts.insert( "lpad", QCoreApplication::translate( "function_help", "<h3>lpad() function</h3>\n"
1433 "Returns a string with supplied width padded\n"
1434 "using the fill character.\n"
1435 "\n"
1436 "<h4>Syntax</h4>\n"
1437 "<code>lpad(string, length, fill)</code><br>\n"
1438 "\n"
1439 "<h4>Arguments</h4>\n"
1440 "<code>string</code> - is string. The string.\n"
1441 "<br>\n"
1442 "<code>length</code> - is int. The length of the new string.\n"
1443 "<br>\n"
1444 "<code>fill</code> - is char. The character to padd the remaining space with. \n"
1445 "\n"
1446 "<h4>Example</h4>\n"
1447 "<!-- Show example of function.-->\n"
1448 "<code>lpad('Hello', 10, 'x') &rarr; 'Helloxxxxx'</code><br>\n"
1449 "") );
1450  gFunctionHelpTexts.insert( "max", QCoreApplication::translate( "function_help", "<h3>max() function</h3>\n"
1451 "Returns the largest value in a set of values.\n"
1452 "\n"
1453 "<h4>Syntax</h4>\n"
1454 " max(<i>value<i>[,<i>value</i>...])\n"
1455 "\n"
1456 "<h4>Arguments</h4>\n"
1457 "<!-- List args for functions here-->\n"
1458 "<i> value</i> &rarr; a number.<br>\n"
1459 "\n"
1460 "<h4>Example</h4>\n"
1461 "<!-- Show example of function.-->\n"
1462 " max(2,10.2,5.5) &rarr; 10.2\n"
1463 "") );
1464  gFunctionHelpTexts.insert( "min", QCoreApplication::translate( "function_help", "<h3>min() function</h3>\n"
1465 "Returns the smallest value in a set of values.\n"
1466 "\n"
1467 "<h4>Syntax</h4>\n"
1468 " min(<i>value<i>[,<i>value</i>...])\n"
1469 "\n"
1470 "<h4>Arguments</h4>\n"
1471 "<!-- List args for functions here-->\n"
1472 "<i> value</i> &rarr; a number.<br>\n"
1473 "\n"
1474 "<h4>Example</h4>\n"
1475 "<!-- Show example of function.-->\n"
1476 " min(20.5,10,6.2) &rarr; 6.2\n"
1477 "") );
1478  gFunctionHelpTexts.insert( "minute", QCoreApplication::translate( "function_help", "<h3>minute() function</h3>\n"
1479 "Extract the minute from a datetime or time, or the number of minutes\n"
1480 "from a <code>Interval</code>\n"
1481 "\n"
1482 "<h4>Syntax</h4>\n"
1483 "<code>minute(datetime)</code><br>\n"
1484 "<code>minute(Interval)</code><br>\n"
1485 "\n"
1486 "<h4>Arguments</h4>\n"
1487 "<code>date</code> - is datetime or time. The date to extract the minute from.\n"
1488 "<br>\n"
1489 "<code>Interval</code> - is Interval. The Interval to return the number of minutes from.\n"
1490 "\n"
1491 "<h4>Example</h4>\n"
1492 "<!-- Show example of function.-->\n"
1493 "<code>minute('2012-07-22T13:24:57') &rarr; 24</code><br>\n"
1494 "<code>minute(tointerval('3 minutes')) &rarr; 3</code><br>\n"
1495 "<code>minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) &rarr; 20</code><br>\n"
1496 "<code>minute(age('2012-01-01','2010-01-01')) &rarr; 1051200</code><br>\n"
1497 "\n"
1498 "") );
1499  gFunctionHelpTexts.insert( "month", QCoreApplication::translate( "function_help", "<h3>month() function</h3>\n"
1500 "Extract the month part from a date, or the number of months\n"
1501 "from a <code>Interval</code>\n"
1502 "\n"
1503 "<h4>Syntax</h4>\n"
1504 "<code>month(date)</code><br>\n"
1505 "<code>month(Interval)</code><br>\n"
1506 "\n"
1507 "<h4>Arguments</h4>\n"
1508 "<code>date</code> - is date or datetime. The date to extract the month from.\n"
1509 "<br>\n"
1510 "<code>Interval</code> - is Interval. The Interval to return the number of months from.\n"
1511 "\n"
1512 "<h4>Example</h4>\n"
1513 "<!-- Show example of function.-->\n"
1514 "<code>month('2012-05-12') &rarr; 05</code><br>\n"
1515 "<code>month(tointerval('3 months')) &rarr; 3</code><br>\n"
1516 "<code>month(age('2012-01-01','2010-01-01')) &rarr; 4.033...</code><br>\n"
1517 "\n"
1518 "") );
1519  gFunctionHelpTexts.insert( "overlaps", QCoreApplication::translate( "function_help", "<h3>overlaps function</h3>\n"
1520 "Returns 1 if the geometries share space, are of the same dimension, but are not completely contained by each other.\n"
1521 "\n"
1522 "<h4>Syntax</h4>\n"
1523 "<pre>overlaps( a, b )</pre>\n"
1524 "\n"
1525 "<h4>Arguments</h4>\n"
1526 "a &rarr; geometry\n"
1527 "b &rarr; geometry\n"
1528 "\n"
1529 "<h4>Example</h4>\n"
1530 "<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"
1531 "<pre> overlaps( geomFromWKT( 'LINESTRING(0 0 , 1 1)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 0</pre>\n"
1532 "") );
1533  gFunctionHelpTexts.insert( "ramp_color", QCoreApplication::translate( "function_help", "\n"
1534 "<h3>ramp_color() function</h3>\n"
1535 "Returns a string representing a color from a color ramp. \n"
1536 "\n"
1537 "<p><h4>Syntax</h4>\n"
1538 " ramp_color(<i>ramp_name,value</i>)</p>\n"
1539 "\n"
1540 "<p><h4>Arguments</h4>\n"
1541 "<!-- List args for functions here-->\n"
1542 "<i> ramp_name</i> &rarr; the name of the color ramp as a string, for example 'Spectral'.<br>\n"
1543 "<i> value</i> &rarr; the position on the ramp to select the color from as a real number between 0 and 1.<br>\n"
1544 "\n"
1545 "<p><h4>Example</h4>\n"
1546 "<!-- Show example of function.-->\n"
1547 " ramp_color('Spectral',0.3) &rarr; '253,190,115,255'</p>\n"
1548 "\n"
1549 "<p><h4>Note:</h4>\n"
1550 "The color ramps available vary between QGIS installations. This function\n"
1551 "may not give the expected results if you move your Quantum project.\n"
1552 "</p>\n"
1553 "") );
1554  gFunctionHelpTexts.insert( "rand", QCoreApplication::translate( "function_help", "<h3>rand() function</h3>\n"
1555 "Returns a random integer within the range specified by the minimum and \n"
1556 "maximum argument (inclusive).\n"
1557 "<br>\n"
1558 "This function takes two arguments.\n"
1559 "<h4>Syntax</h4>\n"
1560 "<code>rand(min, max)</code><br>\n"
1561 "\n"
1562 "<h4>Arguments</h4>\n"
1563 "<code>min</code> - an integer representing the smallest possible random number desired.<br>\n"
1564 "<code>max</code> - an integer representing the largest possible random number desired.\n"
1565 "<br>\n"
1566 "\n"
1567 "<h4>Example</h4>\n"
1568 "<!-- Show example of function.-->\n"
1569 "<code>rand(1, 10) &rarr; 8</code><br>\n"
1570 "") );
1571  gFunctionHelpTexts.insert( "randf", QCoreApplication::translate( "function_help", "<h3>randf() function</h3>\n"
1572 "Returns a random float within the range specified by the minimum and \n"
1573 "maximum argument (inclusive).\n"
1574 "<br>\n"
1575 "This function takes two arguments.\n"
1576 "<h4>Syntax</h4>\n"
1577 "<code>randf(min, max)</code><br>\n"
1578 "\n"
1579 "<h4>Arguments</h4>\n"
1580 "<code>min</code> - a float representing the smallest possible random number desired.<br>\n"
1581 "<code>max</code> - a float representing the largest possible random number desired.\n"
1582 "<br>\n"
1583 "\n"
1584 "<h4>Example</h4>\n"
1585 "<!-- Show example of function.-->\n"
1586 "<code>randf(1, 10) &rarr; 4.59258286403147</code><br>\n"
1587 "") );
1588  gFunctionHelpTexts.insert( "regexp_match", QCoreApplication::translate( "function_help", "<h3>regexp_match() function</h3>\n"
1589 "Returns true if any part of a string matches the supplied regular expression.\n"
1590 "\n"
1591 "<p><h4>Syntax</h4>\n"
1592 " regexp_match(<i>string,regex</i>)</p>\n"
1593 "\n"
1594 "<p><h4>Arguments</h4>\n"
1595 "<!-- List args for functions here-->\n"
1596 "<i> string</i> &rarr; is string. The string to test against the regular expression.<br>\n"
1597 "<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"
1598 "\n"
1599 "<p><h4>Example</h4>\n"
1600 "<!-- Show example of function.-->\n"
1601 " regexp_match('QGIS ROCKS','&#92;&#92;sROCKS') &rarr; 1</p>\n"
1602 "") );
1603  gFunctionHelpTexts.insert( "regexp_replace", QCoreApplication::translate( "function_help", "<h3>regexp_replace() function</h3>\n"
1604 "Returns a string with the supplied regular expression replaced.\n"
1605 "\n"
1606 "<p><h4>Syntax</h4>\n"
1607 " regexp_replace(<i>string,regex,after</i>)</p>\n"
1608 "\n"
1609 "<p><h4>Arguments</h4>\n"
1610 "<!-- List args for functions here-->\n"
1611 "<i> string</i> &rarr; is string. The start string.<br>\n"
1612 "<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"
1613 "<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"
1614 "\n"
1615 "<p><h4>Example</h4>\n"
1616 "<!-- Show example of function.-->\n"
1617 " regexp_replace('QGIS SHOULD ROCK','&#92;&#92;sSHOULD&#92;&#92;s',' DOES ') &rarr; 'QGIS DOES ROCK'</p>\n"
1618 "") );
1619  gFunctionHelpTexts.insert( "regexp_substr", QCoreApplication::translate( "function_help", "<h3>regexp_substr() function</h3>\n"
1620 "Returns the portion of a string which matches a supplied regular expression.\n"
1621 "\n"
1622 "<p><h4>Syntax</h4>\n"
1623 " regexp_substr(<i>string,regex</i>)</p>\n"
1624 "\n"
1625 "<p><h4>Arguments</h4>\n"
1626 "<!-- List args for functions here-->\n"
1627 "<i> string</i> &rarr; is string. The input string.<br>\n"
1628 "<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"
1629 "\n"
1630 "<p><h4>Example</h4>\n"
1631 "<!-- Show example of function.-->\n"
1632 " regexp_substr('abc123','(&#92;&#92;d+)') &rarr; '123'</p>\n"
1633 "") );
1634  gFunctionHelpTexts.insert( "replace", QCoreApplication::translate( "function_help", "<h3>replace() function</h3>\n"
1635 "Returns a string with the the supplied string replaced.\n"
1636 "\n"
1637 "<p><h4>Syntax</h4>\n"
1638 " replace(<i>string,before,after</i>)</p>\n"
1639 "\n"
1640 "<p><h4>Arguments</h4>\n"
1641 "<!-- List args for functions here-->\n"
1642 "<i> string</i> &rarr; is string. The start string.<br>\n"
1643 "<i> before</i> &rarr; is string. The string to replace.<br>\n"
1644 "<i> after</i> &rarr; is string. The string that will replace <i>before</i><br></p>\n"
1645 "\n"
1646 "<p><h4>Example</h4>\n"
1647 "<!-- Show example of function.-->\n"
1648 " replace('QGIS SHOULD ROCK','SHOULD','DOES') &rarr; 'QGIS DOES ROCK'</p>\n"
1649 "") );
1650  gFunctionHelpTexts.insert( "right", QCoreApplication::translate( "function_help", "<h3>right() function</h3>\n"
1651 "Returns a substring that contains the <i>n</i> rightmost characters of the string.\n"
1652 "\n"
1653 "<h4>Syntax</h4>\n"
1654 "<code>right(string, pos)</code><br>\n"
1655 "\n"
1656 "<h4>Arguments</h4>\n"
1657 "<code>string</code> - is string. The string.\n"
1658 "<br>\n"
1659 "<code>length</code> - is int. The number of characters from the right to return.\n"
1660 "\n"
1661 "<h4>Example</h4>\n"
1662 "<!-- Show example of function.-->\n"
1663 "<code>right('Hello World',5) &rarr; 'World'</code><br>\n"
1664 "\n"
1665 "") );
1666  gFunctionHelpTexts.insert( "round", QCoreApplication::translate( "function_help", "<h3>round() function</h3>\n"
1667 "Rounds a number to number of decimal places.\n"
1668 "<br>\n"
1669 "This function can take one or two arguments depending on what is needed.\n"
1670 "<h4>Syntax</h4>\n"
1671 "<code>round(decimal,places)</code><br>\n"
1672 "<code>round(decimal)</code><br>\n"
1673 "\n"
1674 "<h4>Arguments</h4>\n"
1675 "<code>decimal</code> - is decimal. The decimal number to be rounded.\n"
1676 "<br>\n"
1677 "<code>places</code> - is int. The number of places to round decimal too. Can be negative.\n"
1678 "\n"
1679 "<h4>Example</h4>\n"
1680 "<!-- Show example of function.-->\n"
1681 "<code>round(1234.567, 2 ) &rarr; 1234.57</code><br>\n"
1682 "use <code>round(decimal)</code> to round to the nearest integer<br>\n"
1683 "<code>round(1234.567) &rarr; 1235</code><br>\n"
1684 "\n"
1685 "\n"
1686 "") );
1687  gFunctionHelpTexts.insert( "rpad", QCoreApplication::translate( "function_help", "<h3>rpad() function</h3>\n"
1688 "Returns a string with supplied width padded\n"
1689 "using the fill character.\n"
1690 "\n"
1691 "<h4>Syntax</h4>\n"
1692 "<code>rpad(string, width, fill)</code><br>\n"
1693 "\n"
1694 "<h4>Arguments</h4>\n"
1695 "<code>string</code> - is string. The string.\n"
1696 "<br>\n"
1697 "<code>width</code> - is int. The length of the new string.\n"
1698 "<br>\n"
1699 "<code>fill</code> - is char. The character to padd the remaining space with. \n"
1700 "\n"
1701 "<h4>Example</h4>\n"
1702 "<!-- Show example of function.-->\n"
1703 "<code>rpad('Hello', 10, 'x') &rarr; 'xxxxxHello'</code><br>\n"
1704 "\n"
1705 "") );
1706  gFunctionHelpTexts.insert( "scale_exp", QCoreApplication::translate( "function_help", "<h3>scale_exp() function</h3>\n"
1707 "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"
1708 "of the specified output range. \n"
1709 "\n"
1710 "<p><h4>Syntax</h4>\n"
1711 " 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"
1712 "\n"
1713 "<p><h4>Arguments</h4>\n"
1714 "<!-- List args for functions here-->\n"
1715 "<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"
1716 "<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"
1717 "<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"
1718 "<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"
1719 "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"
1720 "\n"
1721 "<h4>Example</h4>\n"
1722 "<!-- Show example of function.-->\n"
1723 "<b>Easing in, using an exponent of 2:</b><br>\n"
1724 " scale_exp(5,0,10,0,100,2) &rarr; 25<br>\n"
1725 " scale_exp(7.5,0,10,0,100,2) &rarr; 56.25<br>\n"
1726 " scale_exp(9.5,0,10,0,100,2) &rarr; 90.25<br> \n"
1727 " <br>\n"
1728 "<b>Easing out, using an exponent of 0.5:</b><br> \n"
1729 " scale_exp(3,0,10,0,100,0.5) &rarr; 54.772<br>\n"
1730 " scale_exp(6,0,10,0,100,0.5) &rarr; 77.459<br>\n"
1731 " scale_exp(9,0,10,0,100,0.5) &rarr; 94.868<br> \n"
1732 " \n"
1733 " \n"
1734 "") );
1735  gFunctionHelpTexts.insert( "scale_linear", QCoreApplication::translate( "function_help", "<h3>scale_linear() function</h3>\n"
1736 "Transforms a given value from an input domain to an output range using linear interpolation. \n"
1737 "\n"
1738 "<p><h4>Syntax</h4>\n"
1739 " scale_linear(<i>val</i>,<i>domain_min</i>,<i>domain_max</i>,<i>range_min</i>,<i>range_max</i>)</p>\n"
1740 "\n"
1741 "<p><h4>Arguments</h4>\n"
1742 "<!-- List args for functions here-->\n"
1743 "<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"
1744 "<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"
1745 "<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"
1746 "\n"
1747 "<h4>Example</h4>\n"
1748 "<!-- Show example of function.-->\n"
1749 " scale_linear(5,0,10,0,100) &rarr; 50<br>\n"
1750 " 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"
1751 " 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"
1752 " \n"
1753 " \n"
1754 "") );
1755  gFunctionHelpTexts.insert( "second", QCoreApplication::translate( "function_help", "<h3>second() function</h3>\n"
1756 "Extract the seconds from a datetime or time, or the number of seconds\n"
1757 "from a <code>Interval</code>\n"
1758 "\n"
1759 "<h4>Syntax</h4>\n"
1760 "<code>second(datetime)</code><br>\n"
1761 "<code>second(Interval)</code><br>\n"
1762 "\n"
1763 "<h4>Arguments</h4>\n"
1764 "<code>date</code> - is datetime or time. The date to extract the second from.\n"
1765 "<br>\n"
1766 "<code>Interval</code> - is Interval. The Interval to return the number of seconds from.\n"
1767 "\n"
1768 "<h4>Example</h4>\n"
1769 "<!-- Show example of function.-->\n"
1770 "<code>second('2012-07-22T13:24:57') &rarr; 57</code><br>\n"
1771 "<code>second(tointerval('3 seconds')) &rarr; 3</code><br>\n"
1772 "<code>second(age('2012-07-22T00:20:00','2012-07-22T00:00:00')) &rarr; 1200</code><br>\n"
1773 "<code>second(age('2012-01-01','2010-01-01')) &rarr; 63072000</code><br>\n"
1774 "\n"
1775 "") );
1776  gFunctionHelpTexts.insert( "sin", QCoreApplication::translate( "function_help", "<h3>sin() function</h3>\n"
1777 "Returns sinus of an angle.\n"
1778 "\n"
1779 "\n"
1780 "<p><h4>Syntax</h4>\n"
1781 " sin(<i>real</i>)</p>\n"
1782 "\n"
1783 "<p><h4>Arguments</h4>\n"
1784 "<i>real</i> &rarr; angle in radians.</p>\n"
1785 "\n"
1786 "<p><h4>Example</h4>\n"
1787 " sin(1.571) &rarr; 0.999999682931835</p>\n"
1788 "") );
1789  gFunctionHelpTexts.insert( "sqrt", QCoreApplication::translate( "function_help", "<h3>sqrt() function</h3>\n"
1790 "Returns square root of a value\n"
1791 "\n"
1792 "\n"
1793 "<p><h4>Syntax</h4>\n"
1794 " sqrt(<i>real</i>)</p>\n"
1795 "\n"
1796 "<p><h4>Arguments</h4>\n"
1797 "<i>real</i> &rarr; number.</p>\n"
1798 "\n"
1799 "<p><h4>Example</h4>\n"
1800 " sqrt(9) &rarr; 3</p>\n"
1801 "") );
1802  gFunctionHelpTexts.insert( "strpos", QCoreApplication::translate( "function_help", "<h3>strpos() function</h3>\n"
1803 "Return the index of a regular expression in a string.\n"
1804 "\n"
1805 "<h4>Syntax</h4>\n"
1806 " strpos(<i>haystack</i>, <i>needle</i>)\n"
1807 "<br><br>\n"
1808 "Returns -1 if the expression isn't found.\n"
1809 "\n"
1810 "<p><h4>Arguments</h4>\n"
1811 "<!-- List args for functions here-->\n"
1812 "<i> haystack</i> &rarr; is string. The string that is to be searched.<br>\n"
1813 "<i> needle</i> &rarr; is string. The regular expression to look for.<br>\n"
1814 "\n"
1815 "<h4>Example</h4>\n"
1816 "<!-- Show example of function.-->\n"
1817 " strpos('HELLO WORLD','WORLD') &rarr; 6<br>\n"
1818 " strpos('HELLO WORLD','GOODBYE') &rarr; -1<br>\n"
1819 "") );
1820  gFunctionHelpTexts.insert( "substr", QCoreApplication::translate( "function_help", "<h3>substr() function</h3>\n"
1821 "Return a part of a string\n"
1822 "\n"
1823 "<p><h4>Syntax</h4>\n"
1824 " substr(<i>string,startpos,length</i>)</p>\n"
1825 "\n"
1826 "<p><h4>Arguments</h4>\n"
1827 "<!-- List args for functions here-->\n"
1828 "<i> string</i> &rarr; is string. The full string.<br>\n"
1829 "<i> startpos</i> &rarr; is number. The start position to extract from.<br>\n"
1830 "<i> length</i> &rarr; is number. The length of the string to extract.<br></p>\n"
1831 "\n"
1832 "<p><h4>Example</h4>\n"
1833 "<!-- Show example of function.-->\n"
1834 " substr('HELLO WORLD',3,5) &rarr; 'LLO W'</p>\n"
1835 "") );
1836  gFunctionHelpTexts.insert( "symDifference", QCoreApplication::translate( "function_help", "<h3>symDifference function</h3>\n"
1837 "Returns a geometry that represents the portions of a and b that do not intersect.\n"
1838 "\n"
1839 "<h4>Syntax</h4>\n"
1840 "<pre>symDifference( geometry a, geometry b)</pre>\n"
1841 "\n"
1842 "<h4>Arguments</h4>\n"
1843 "geometry &rarr; geometry\n"
1844 "geometry &rarr; geometry\n"
1845 "\n"
1846 "<h4>Example</h4>\n"
1847 "<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"
1848 "") );
1849  gFunctionHelpTexts.insert( "tan", QCoreApplication::translate( "function_help", "<h3>tan() function</h3>\n"
1850 "Returns tangent of an angle.\n"
1851 "\n"
1852 "\n"
1853 "<p><h4>Syntax</h4>\n"
1854 " tan(<i>real</i>)</p>\n"
1855 "\n"
1856 "<p><h4>Arguments</h4>\n"
1857 "<i>real</i> &rarr; angle in radians.</p>\n"
1858 "\n"
1859 "<p><h4>Example</h4>\n"
1860 " tan(1.0) &rarr; 1.5574077246549</p>\n"
1861 "") );
1862  gFunctionHelpTexts.insert( "title", QCoreApplication::translate( "function_help", "<h3>title() function</h3>\n"
1863 "Converts all words of a string to title case (all words lower case with leading\n"
1864 "capital letter).\n"
1865 "\n"
1866 "<p><h4>Syntax</h4>\n"
1867 " title(<i>string</i>)</p>\n"
1868 "\n"
1869 "<p><h4>Arguments</h4>\n"
1870 "<!-- List args for functions here-->\n"
1871 "<i> string</i> &rarr; is string. The string to convert to title case.</p>\n"
1872 "\n"
1873 "<p><h4>Example</h4>\n"
1874 "<!-- Show example of function.-->\n"
1875 " upper('hello WOrld') &rarr; 'Hello World'</p>\n"
1876 "") );
1877  gFunctionHelpTexts.insert( "todate", QCoreApplication::translate( "function_help", "<h3>todate() function</h3>\n"
1878 "Convert a string into Qt data type.\n"
1879 "\n"
1880 "<h4>Syntax</h4>\n"
1881 "<code>todate('string')</code><br>\n"
1882 "\n"
1883 "<h4>Arguments</h4>\n"
1884 "<code>string</code> - is string in Qt date format.\n"
1885 "<br>\n"
1886 "\n"
1887 "<h4>Example</h4>\n"
1888 "<!-- Show example of function.-->\n"
1889 "<code>todate('2012-05-04') &rarr; 2012-05-04</code><br>") );
1890  gFunctionHelpTexts.insert( "todatetime", QCoreApplication::translate( "function_help", "<h3>todatetime() function</h3>\n"
1891 "Convert a string into Qt data time type.\n"
1892 "\n"
1893 "<h4>Syntax</h4>\n"
1894 "<code>todatetime('string')</code><br>\n"
1895 "\n"
1896 "<h4>Arguments</h4>\n"
1897 "<code>string</code> - is string in Qt date time format.\n"
1898 "<br>\n"
1899 "\n"
1900 "<h4>Example</h4>\n"
1901 "<!-- Show example of function.-->\n"
1902 "<code>todatetime('2012-05-04 12:50:00') &rarr; 2012-05-04T12:50:00</code><br>") );
1903  gFunctionHelpTexts.insert( "toint", QCoreApplication::translate( "function_help", "<h3>toint() function</h3>\n"
1904 "Converts a string to integer number. Nothing changed if a value cannot be converted to integer (e.g '123asd' is invalid).\n"
1905 "\n"
1906 "<p><h4>Syntax</h4>\n"
1907 " toint(<i>string</i>)</p>\n"
1908 "\n"
1909 "<p><h4>Arguments</h4>\n"
1910 "<!-- List args for functions here-->\n"
1911 "<i> string</i> &rarr; is string. The String to convert to integer number.</p>\n"
1912 "\n"
1913 "<p><h4>Example</h4>\n"
1914 "<!-- Show example of function.-->\n"
1915 " toint('123') &rarr; 123</p>\n"
1916 "") );
1917  gFunctionHelpTexts.insert( "tointerval", QCoreApplication::translate( "function_help", "<h3>tointerval() function</h3>\n"
1918 "Converts a string to a interval type. Can be used to take days, hours, month, etc off a date. \n"
1919 "\n"
1920 "<h4>Syntax</h4>\n"
1921 "<code>tointerval('string')</code><br>\n"
1922 "\n"
1923 "<h4>Arguments</h4>\n"
1924 "<code>string</code> - is string. Format {n} days {n} hours {n} months\n"
1925 "<br>\n"
1926 "\n"
1927 "<h4>Example</h4>\n"
1928 "<!-- Show example of function.-->\n"
1929 "<code>todatetime('2012-05-05 12:00:00') - tointerval('1 day 2 hours') &rarr; 2012-05-04T10:00:00</code><br>") );
1930  gFunctionHelpTexts.insert( "toreal", QCoreApplication::translate( "function_help", "<h3>toreal() function</h3>\n"
1931 "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"
1932 "\n"
1933 "<p><h4>Syntax</h4>\n"
1934 " toreal(<i>string</i>)</p>\n"
1935 "\n"
1936 "<p><h4>Arguments</h4>\n"
1937 "<!-- List args for functions here-->\n"
1938 "<i> string</i> &rarr; is string. The String to convert to real number.</p>\n"
1939 "\n"
1940 "<p><h4>Example</h4>\n"
1941 "<!-- Show example of function.-->\n"
1942 " toreal('123.45') &rarr; 123.45</p>\n"
1943 "") );
1944  gFunctionHelpTexts.insert( "tostring", QCoreApplication::translate( "function_help", "<h3>tostring() function</h3>\n"
1945 "Converts a number to string.\n"
1946 "\n"
1947 "<p><h4>Syntax</h4>\n"
1948 " tostring(<i>number</i>)</p>\n"
1949 "\n"
1950 "<p><h4>Arguments</h4>\n"
1951 "<!-- List args for functions here-->\n"
1952 "<i>number</i> &rarr; is integer or real. The number to convert to string.</p>\n"
1953 "\n"
1954 "<p><h4>Example</h4>\n"
1955 "<!-- Show example of function.-->\n"
1956 " tostring(123) &rarr; '123'</p>\n"
1957 "") );
1958  gFunctionHelpTexts.insert( "totime", QCoreApplication::translate( "function_help", "<h3>totime() function</h3>\n"
1959 "Convert a string into Qt time type.\n"
1960 "\n"
1961 "<h4>Syntax</h4>\n"
1962 "<code>totime('string')</code><br>\n"
1963 "\n"
1964 "<h4>Arguments</h4>\n"
1965 "<code>string</code> - is string in Qt time format.\n"
1966 "<br>\n"
1967 "\n"
1968 "<h4>Example</h4>\n"
1969 "<!-- Show example of function.-->\n"
1970 "<code>totime('12:30:01') &rarr; 12:30:01</code><br>") );
1971  gFunctionHelpTexts.insert( "touches", QCoreApplication::translate( "function_help", "<h3>touches function</h3>\n"
1972 "Returns 1 if the geometries have at least one point in common, but their interiors do not intersect.\n"
1973 "\n"
1974 "<h4>Syntax</h4>\n"
1975 "<pre>touches( a, b )</pre>\n"
1976 "\n"
1977 "<h4>Arguments</h4>\n"
1978 "a &rarr; geometry\n"
1979 "b &rarr; geometry\n"
1980 "\n"
1981 "<h4>Example</h4>\n"
1982 "<pre> touches( geomFromWKT( 'LINESTRING(5 3 , 4 4)' ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' )) &rarr; returns 1</pre>\n"
1983 "<pre> touches( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) &rarr; returns 0</pre>\n"
1984 "") );
1985  gFunctionHelpTexts.insert( "trim", QCoreApplication::translate( "function_help", "<h3>trim() function</h3>\n"
1986 "Removes all leading and trailing whitespace (spaces, tabs, etc) from a string.\n"
1987 "\n"
1988 "<p><h4>Syntax</h4>\n"
1989 " trim(<i>string</i>)</p>\n"
1990 "\n"
1991 "<p><h4>Arguments</h4>\n"
1992 "<!-- List args for functions here-->\n"
1993 "<i> string</i> &rarr; is string. The string to trim.</p>\n"
1994 "\n"
1995 "<p><h4>Example</h4>\n"
1996 "<!-- Show example of function.-->\n"
1997 " trim(' hello world ') &rarr; 'hello world'</p>\n"
1998 "") );
1999  gFunctionHelpTexts.insert( "union", QCoreApplication::translate( "function_help", "<h3>union function</h3>\n"
2000 "Returns a geometry that represents the point set union of the geometries.\n"
2001 "\n"
2002 "<h4>Syntax</h4>\n"
2003 "<pre>union( a, b )</pre>\n"
2004 "\n"
2005 "<h4>Arguments</h4>\n"
2006 "a &rarr; geometry\n"
2007 "b &rarr; geometry\n"
2008 "\n"
2009 "<h4>Example</h4>\n"
2010 "<pre> geomToWKT( union( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' )) ) &rarr; returns MULTIPOINT(4 4, 5 5)</pre>\n"
2011 "") );
2012  gFunctionHelpTexts.insert( "upper", QCoreApplication::translate( "function_help", "<h3>upper() function</h3>\n"
2013 "Converts a string to upper case letters.\n"
2014 "\n"
2015 "<p><h4>Syntax</h4>\n"
2016 " upper(<i>string</i>)</p>\n"
2017 "\n"
2018 "<p><h4>Arguments</h4>\n"
2019 "<!-- List args for functions here-->\n"
2020 "<i> string</i> &rarr; is string. The String to convert to upper case.</p>\n"
2021 "\n"
2022 "<p><h4>Example</h4>\n"
2023 "<!-- Show example of function.-->\n"
2024 " upper('hello WOrld') &rarr; 'HELLO WORLD'</p>\n"
2025 "") );
2026  gFunctionHelpTexts.insert( "week", QCoreApplication::translate( "function_help", "<h3>week() function</h3>\n"
2027 "Extract the week number from a date, or the number of weeks\n"
2028 "from a <code>Interval</code>\n"
2029 "\n"
2030 "<h4>Syntax</h4>\n"
2031 "<code>week(date)</code><br>\n"
2032 "<code>week(Interval)</code><br>\n"
2033 "\n"
2034 "<h4>Arguments</h4>\n"
2035 "<code>date</code> - is date or datetime. The date to extract the week from.\n"
2036 "<br>\n"
2037 "<code>Interval</code> - is Interval. The Interval to return the number of weeks from.\n"
2038 "\n"
2039 "<h4>Example</h4>\n"
2040 "<!-- Show example of function.-->\n"
2041 "<code>week('2012-05-12') &rarr; 19</code><br>\n"
2042 "<code>week(tointerval('3 weeks')) &rarr; 3</code><br>\n"
2043 "<code>week(age('2012-01-01','2010-01-01')) &rarr; 104.285...</code><br>\n"
2044 "\n"
2045 "") );
2046  gFunctionHelpTexts.insert( "within", QCoreApplication::translate( "function_help", "<h3>within function</h3>\n"
2047 "Returns 1 if the geometry a is completely inside geometry b\n"
2048 "\n"
2049 "<h4>Syntax</h4>\n"
2050 "<pre>within( geometry a , geometry b)</pre>\n"
2051 "\n"
2052 "<h4>Arguments</h4>\n"
2053 "geometry &rarr; geometry\n"
2054 "geometry &rarr; geometry\n"
2055 "\n"
2056 "<h4>Example</h4>\n"
2057 "<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"
2058 "<pre> within( geomFromWKT( 'POINT( 5 5 )') , geomFromWKT('POLYGON((0 0 , 0 1 , 1 1 , 1 0 , 0 0 ))' ) ) &rarr; returns 0</pre>\n"
2059 "") );
2060  gFunctionHelpTexts.insert( "wordwrap", QCoreApplication::translate( "function_help", "<h3>wordwrap() function</h3>\n"
2061 "Returns a string wrapped to a maximum/minimum number of characters.\n"
2062 "\n"
2063 "<p><h4>Syntax</h4>\n"
2064 " wordwrap(<i>string,wrap_length[,delimiter_string]</i>)</p>\n"
2065 "\n"
2066 "<p><h4>Arguments</h4>\n"
2067 "<!-- List args for functions here-->\n"
2068 "<i> string</i> &rarr; is string. The string to be wrapped.<br>\n"
2069 "<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"
2070 "<i> delimiter_string</i> &rarr; is string. The delimiter string to wrap to a new line (<u>optional</u>).<br></p>\n"
2071 "\n"
2072 "<p><h4>Example</h4>\n"
2073 "<!-- Show example of function.-->\n"
2074 " wordwrap('UNIVERSITY OF QGIS',13) &rarr; 'UNIVERSITY OF&#92;nQGIS'<br>\n"
2075 " wordwrap('UNIVERSITY OF QGIS',-3) &rarr; 'UNIVERSITY&#92;nOF QGIS'</p>\n"
2076 "") );
2077  gFunctionHelpTexts.insert( "xat", QCoreApplication::translate( "function_help", "<h3>xat() function</h3>\n"
2078 "Retrieves a x coordinate of the current feature\n"
2079 "\n"
2080 "<h4>Syntax</h4>\n"
2081 "<code>xat(i)</code>\n"
2082 "\n"
2083 "<h4>Arguments</h4>\n"
2084 "<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index).\n"
2085 "\n"
2086 "<h4>Example</h4>\n"
2087 "<pre>xat(1) &rarr; 5</pre>\n"
2088 "") );
2089  gFunctionHelpTexts.insert( "xmax", QCoreApplication::translate( "function_help", "<h3>xmax function</h3>\n"
2090 "Returns the maximum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2091 "\n"
2092 "<h4>Syntax</h4>\n"
2093 "<pre>xmax(geom)</pre>\n"
2094 "\n"
2095 "<h4>Arguments</h4>\n"
2096 "geom &rarr; a geometry\n"
2097 "\n"
2098 "<h4>Example</h4>\n"
2099 "<pre> xmax($geometry) &rarr; returns maximum x coordinate of $geometry</pre>\n"
2100 "\n"
2101 "") );
2102  gFunctionHelpTexts.insert( "xmin", QCoreApplication::translate( "function_help", "<h3>xmin function</h3>\n"
2103 "Returns the minimum x coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2104 "\n"
2105 "<h4>Syntax</h4>\n"
2106 "<pre>xmin(geom)</pre>\n"
2107 "\n"
2108 "<h4>Arguments</h4>\n"
2109 "geom &rarr; a geometry\n"
2110 "\n"
2111 "<h4>Example</h4>\n"
2112 "<pre> xmin($geometry) &rarr; returns minimum x coordinate of $geometry</pre>\n"
2113 "\n"
2114 "") );
2115  gFunctionHelpTexts.insert( "yat", QCoreApplication::translate( "function_help", "<h3>yat() function</h3>\n"
2116 "Retrieves a y coordinate of the current feature\n"
2117 "\n"
2118 "<h4>Syntax</h4>\n"
2119 "<code>yat(i)</code>\n"
2120 "\n"
2121 "<h4>Arguments</h4>\n"
2122 "<code>i<code> - is int. index of point of a line (indices start at 0; negative values apply to the last index).\n"
2123 "\n"
2124 "<h4>Example</h4>\n"
2125 "<pre>yat(1) &rarr; 5</pre>\n"
2126 "") );
2127  gFunctionHelpTexts.insert( "year", QCoreApplication::translate( "function_help", "<h3>year() function</h3>\n"
2128 "Extract the year part from a date, or the number of years\n"
2129 "from a <code>Interval</code>\n"
2130 "\n"
2131 "<h4>Syntax</h4>\n"
2132 "<code>year(date)</code><br>\n"
2133 "<code>year(Interval)</code><br>\n"
2134 "\n"
2135 "<h4>Arguments</h4>\n"
2136 "<code>date</code> - is date or datetime. The date to extract the year from.\n"
2137 "<br>\n"
2138 "<code>Interval</code> - is Interval. The Interval to return the number of years from.\n"
2139 "\n"
2140 "<h4>Example</h4>\n"
2141 "<!-- Show example of function.-->\n"
2142 "<code>year('2012-05-12') &rarr; 2012</code><br>\n"
2143 "<code>year(tointerval('3 Years')) &rarr; 3</code><br>\n"
2144 "<code>year(age('2012-01-01','2010-01-01')) &rarr; 1.9986..</code><br>\n"
2145 "\n"
2146 "") );
2147  gFunctionHelpTexts.insert( "ymax", QCoreApplication::translate( "function_help", "<h3>ymax function</h3>\n"
2148 "Returns the maximum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2149 "\n"
2150 "<h4>Syntax</h4>\n"
2151 "<pre>ymax(geom)</pre>\n"
2152 "\n"
2153 "<h4>Arguments</h4>\n"
2154 "geom &rarr; a geometry\n"
2155 "\n"
2156 "<h4>Example</h4>\n"
2157 "<pre> ymax($geometry) &rarr; returns maximum y coordinate of $geometry</pre>\n"
2158 "\n"
2159 "") );
2160  gFunctionHelpTexts.insert( "ymin", QCoreApplication::translate( "function_help", "<h3>ymin function</h3>\n"
2161 "Returns the minimum y coordinate of a geometry. Calculations are in the Spatial Reference System of this Geometry. \n"
2162 "\n"
2163 "<h4>Syntax</h4>\n"
2164 "<pre>ymin(geom)</pre>\n"
2165 "\n"
2166 "<h4>Arguments</h4>\n"
2167 "geom &rarr; a geometry\n"
2168 "\n"
2169 "<h4>Example</h4>\n"
2170 "<pre> ymin($geometry) &rarr; returns minimum y coordinate of $geometry</pre>\n"
2171 "\n"
2172 "") );
2173 }
static QHash< QString, QString > gFunctionHelpTexts
static void initFunctionHelp()