|
Krita Source Code Documentation
|
the namespace contains functions to transform math expression written as QString in numbers. More...
Functions | |
| int | parseIntegerMathExpr (QString const &expr, bool *noProblem=0) |
| parse an expression to an int. | |
| double | parseSimpleMathExpr (QString const &expr, bool *noProblem=0) |
| parse an expression to a double. | |
the namespace contains functions to transform math expression written as QString in numbers.
Computation is done in a recursive way, maybe not the most efficient way compared to infix to postfix conversion before parsing. (TODO: look if it need to be changed).
| KRITAWIDGETUTILS_EXPORT int KisNumericParser::parseIntegerMathExpr | ( | QString const & | expr, |
| bool * | noProblem ) |
parse an expression to an int.
| expr | the expression to parse |
| noProblem | if provided, the value pointed to will be se to true is no problem appeared, false otherwise. |
Definition at line 69 of file kis_num_parser.cpp.
References treatLevel1Int().
| KRITAWIDGETUTILS_EXPORT double KisNumericParser::parseSimpleMathExpr | ( | const QString & | expr, |
| bool * | noProblem ) |
parse an expression to a double.
| expr | the expression to parse |
| noProblem | if provided, the value pointed to will be se to true is no problem appeared, false otherwise. |
Definition at line 50 of file kis_num_parser.cpp.
References treatLevel1().