Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_num_parser.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Laurent Valentin Jospin <laurent.valentin@famillejospin.ch>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_NUMPARSER_H
8#define KIS_NUMPARSER_H
9
10#include <QString>
11
12#include "kritawidgetutils_export.h"
13
20namespace KisNumericParser {
21
23 KRITAWIDGETUTILS_EXPORT double parseSimpleMathExpr(QString const& expr, bool* noProblem = 0);
24
26 KRITAWIDGETUTILS_EXPORT int parseIntegerMathExpr(QString const& expr, bool* noProblem = 0);
27}
28
29#endif // KIS_NUMPARSER_H
30
the namespace contains functions to transform math expression written as QString in numbers.
int parseIntegerMathExpr(QString const &expr, bool *noProblem)
parse an expression to an int.
double parseSimpleMathExpr(const QString &expr, bool *noProblem)
parse an expression to a double.