File indexing completed on 2024-05-12 16:02:27

0001 /* This file is part of the KDE project
0002  *
0003  * SPDX-FileCopyrightText: 2016 Laurent Valentin Jospin <laurent.valentin@famillejospin.ch>
0004  * SPDX-FileCopyrightText: 2021 Deif Lou <ginoba@gmail.com>
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #include <kis_parse_spin_box_p.h>
0010 
0011 #include "kis_int_parse_spin_box.h"
0012 
0013 KisIntParseSpinBox::KisIntParseSpinBox(QWidget *parent) :
0014     QSpinBox(parent),
0015     d(new KisParseSpinBoxPrivate<KisIntParseSpinBox, QSpinBox>(this))
0016 {}
0017 
0018 KisIntParseSpinBox::~KisIntParseSpinBox()
0019 {}
0020 
0021 void KisIntParseSpinBox::stepBy(int steps)
0022 {
0023     d->stepBy(steps);
0024 }
0025 
0026 void KisIntParseSpinBox::setValue(int value, bool overwriteExpression)
0027 {
0028     d->setValue(value, overwriteExpression);
0029 }
0030 
0031 bool KisIntParseSpinBox::isLastValid() const
0032 {
0033     return d->isLastValid();
0034 }
0035 
0036 QString KisIntParseSpinBox::veryCleanText() const
0037 {
0038     return d->veryCleanText();
0039 }
0040 
0041 QValidator::State KisIntParseSpinBox::validate(QString &input, int &pos) const
0042 {
0043     return d->validate(input, pos);
0044 }
0045 
0046 int KisIntParseSpinBox::valueFromText(const QString &text) const
0047 {
0048     return d->valueFromText(text);
0049 }
0050 
0051 QString KisIntParseSpinBox::textFromValue(int value) const
0052 {
0053     return d->textFromValue(value);
0054 }