Krita Source Code Documentation
Loading...
Searching...
No Matches
DoubleParseSpinBox.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Laurent Valentin Jospin <laurent.valentin@famillejospin.ch>
3 * SPDX-FileCopyrightText: 2021 Deif Lou <ginoba@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef LIBKIS_DOUBLEPARSESPINBOX_H
8#define LIBKIS_DOUBLEPARSESPINBOX_H
9
11
12#include "kritalibkis_export.h"
13#include "libkis.h"
14
23class KRITALIBKIS_EXPORT DoubleParseSpinBox : public QObject
24{
25 Q_OBJECT
26 Q_DISABLE_COPY(DoubleParseSpinBox)
27
28public:
29 explicit DoubleParseSpinBox();
30 ~DoubleParseSpinBox() override;
31
32
33public Q_SLOTS:
40 QDoubleSpinBox* widget() const;
41
47 void stepBy(int steps);
63 void setValue(double value, bool overwriteExpression = false);
69 bool isLastValid() const;
75 virtual QString veryCleanText() const;
76
77Q_SIGNALS:
81 void errorWhileParsing(const QString &expr) const;
86 void noMoreParsingError() const;
87
88Q_SIGNALS:
89
90private:
91 struct Private;
92 Private *const d;
93
94};
95
96#endif // LIBKIS_DOUBLEPARSESPINBOX_H
float value(const T *src, size_t ch)
A wrapper around KisDoubleParseSpinBox, which is a cleverer doubleSpinBox, able to parse arithmetic e...
void noMoreParsingError() const
signal emitted when the last parsed expression is valid and the expression before was not valid.
void errorWhileParsing(const QString &expr) const
signal emitted when the last parsed expression is not valid.