9#ifndef KISDOUBLEPARSESPINBOX_H
10#define KISDOUBLEPARSESPINBOX_H
12#include <QDoubleSpinBox>
13#include <QScopedPointer>
15#include <kritawidgetutils_export.h>
17template <
typename SpinBoxTypeTP,
typename BaseSpinBoxTypeTP>
37 void stepBy(
int steps)
override;
53 void setValue(
double value,
bool overwriteExpression =
false);
59 bool isLastValid()
const;
65 virtual QString veryCleanText()
const;
79 QValidator::State validate(QString &input,
int &pos)
const override;
80 double valueFromText(
const QString &text)
const override;
81 QString textFromValue(
double value)
const override;
84 template <
typename SpinBoxTypeTP,
typename BaseSpinBoxTypeTP>
86 QScopedPointer<KisParseSpinBoxPrivate<KisDoubleParseSpinBox, QDoubleSpinBox>>
d;
float value(const T *src, size_t ch)
The KisDoubleParseSpinBox class is a cleverer doubleSpinBox, able to parse arithmetic expressions.
void errorWhileParsing(const QString &expr) const
signal emitted when the last parsed expression is not valid.
QScopedPointer< KisParseSpinBoxPrivate< KisDoubleParseSpinBox, QDoubleSpinBox > > d
void noMoreParsingError() const
signal emitted when the last parsed expression is valid and the expression before was not valid.