diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2018-01-12 21:27:34 +0100 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2018-01-23 08:33:30 +0000 |
commit | 7743532c7c5596beec8bc5354cc4c6078d81645e (patch) | |
tree | 785fbbf9f760f2ec1797f254a6dd089bae1b5d9c /doc | |
parent | 8dae0c4613005e7c398d3c5ef65d49a584b48d7a (diff) |
Locator: Document the JavaScript filter
Change-Id: Idf56eb4d4620e0517b855485ba88dd92b468e850
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/editors/creator-editors.qdoc | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index 79742e736f..72023523c3 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -2866,6 +2866,9 @@ \li Running text editing macros that you record and save (\c {rm}). For more information, see \l{Using Text Editing Macros} + \li Executing JavaScript (\c {=}), especially useful for calculations. + For more information, see \l{Executing JavaScript}. + \li Executing shell commands (\c {!}) \li Executing version control system commands (\c {git}). For more @@ -3048,4 +3051,86 @@ \endlist + \section1 Executing JavaScript + + The locator provides access to a JavaScript interpreter, that can be used to + perform calculations. + + Beside simple mathematical operations, like ((1 + 2) * 3), the following + built-in functions exist: + + \table + \header + \li Function + \li Purpose + \row + \li abs(x) + \li Returns the absolute value of x + \row + \li acos(x) + \li Returns the arccosine of x, in radians + \row + \li asin(x) + \li Returns the arcsine of x, in radians + \row + \li atan(x) + \li Returns the arctangent of x, in radians + \row + \li atan2(x, y) + \li Returns the arctangent of the quotient of its arguments + \row + \li bin(x) + \li Returns the binary representation of x + \row + \li ceil(x) + \li Returns the value of x rounded up to the next integer + \row + \li cos(x) + \li Returns the cosine of x (x is in radians) + \row + \li exp(x) + \li Returns the value of E to the power of x + \row + \li e() + \li Returns Euler's number E (2.71828...) + \row + \li floor(x) + \li Returns the value of x rounded down to the next integer + \row + \li hex(x) + \li Returns the hexadecimal representation of x + \row + \li log(x) + \li Returns the natural logarithm (base E) of x + \row + \li max(x, y) + \li Returns the higher value of x and y + \row + \li min(x, y) + \li Returns the lower value of x and y + \row + \li oct(x) + \li Returns the octal representation of x + \row + \li pi() + \li Returns PI (3.14159...) + \row + \li pow(x, y) + \li Returns the value of x to the power of y + \row + \li random() + \li Returns a random number between 0 and 1 + \row + \li round(x) + \li Returns the value of x rounded to the next integer + \row + \li sin(x) + \li Returns the sine of x (x is in radians) + \row + \li sqrt(x) + \li Returns the square root of x + \row + \li tan(x) + \li Returns the tangent of x (x is in radians) + \endtable */ |