Krita Source Code Documentation
Loading...
Searching...
No Matches
IntParseSpinBox.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_INTPARSESPINBOX_H
8#define LIBKIS_INTPARSESPINBOX_H
9
11
12#include "kritalibkis_export.h"
13#include "libkis.h"
14
23class KRITALIBKIS_EXPORT IntParseSpinBox : public QObject
24{
25 Q_OBJECT
26 Q_DISABLE_COPY(IntParseSpinBox)
27
28public:
29 explicit IntParseSpinBox();
30 ~IntParseSpinBox() override;
31
32public Q_SLOTS:
33
40 QSpinBox* widget() const;
41
47 void stepBy(int steps);
63 void setValue(int 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
88private:
89 struct Private;
90 Private *const d;
91
92};
93
94#endif // LIBKIS_INTPARSESPINBOX_H
float value(const T *src, size_t ch)
A wrapper around KisIntParseSpinBox, which is a cleverer SpinBox, able to parse arithmetic expression...
void errorWhileParsing(const QString &expr) const
signal emitted when the last parsed expression is not valid.
Private *const d
void noMoreParsingError() const
signal emitted when the last parsed expression is valid and the expression before was not valid.