Krita Source Code Documentation
Loading...
Searching...
No Matches
KoUnitDoubleSpinBox.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2002 Rob Buis (buis@kde.org)
3 SPDX-FileCopyrightText: 2004 Nicolas GOUTTE <goutte@kde.org>
4 SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KOUNITDOUBLESPINBOX_H
10#define KOUNITDOUBLESPINBOX_H
11
12#include "kritawidgets_export.h"
13
14#include <QDoubleSpinBox>
15
16class KoUnit;
17
32class KRITAWIDGETS_EXPORT KoUnitDoubleSpinBox : public QDoubleSpinBox
33{
34 Q_OBJECT
35public:
43 explicit KoUnitDoubleSpinBox( QWidget *parent = 0);
44 ~KoUnitDoubleSpinBox() override;
45
51 virtual void changeValue( double newValue );
55 virtual void setUnit( const KoUnit &);
56
58 double value( ) const;
59
61 void setMinimum(double min);
62
64 void setMaximum(double max);
65
67 void setLineStep(double step);
68
70 void setLineStepPt(double step);
71
73 void setMinMaxStep( double min, double max, double step );
74
76 QValidator::State validate(QString &input, int &pos) const override;
77
83 QString textFromValue( double value ) const override;
89 double valueFromText( const QString& str ) const override;
90
91
92Q_SIGNALS:
94 void valueChangedPt( qreal );
95
96private:
97 class Private;
98 Private * const d;
99
100private Q_SLOTS:
101 // exists to do emits for valueChangedPt
102 void privateValueChanged();
103};
104
105#endif
106
float value(const T *src, size_t ch)
void valueChangedPt(qreal)
emitted like valueChanged in the parent, but this one emits the point value