Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/kis_double_parse_spin_box.cpp
Show All 26 Lines | |||||
27 | #include <QLineEdit> | 27 | #include <QLineEdit> | ||
28 | #include <qnumeric.h> // for qIsNaN | 28 | #include <qnumeric.h> // for qIsNaN | ||
29 | 29 | | |||
30 | KisDoubleParseSpinBox::KisDoubleParseSpinBox(QWidget *parent) : | 30 | KisDoubleParseSpinBox::KisDoubleParseSpinBox(QWidget *parent) : | ||
31 | QDoubleSpinBox(parent), | 31 | QDoubleSpinBox(parent), | ||
32 | boolLastValid(true), | 32 | boolLastValid(true), | ||
33 | lastExprParsed(QStringLiteral("0.0")) | 33 | lastExprParsed(QStringLiteral("0.0")) | ||
34 | { | 34 | { | ||
35 | setAlignment(Qt::AlignRight); | ||||
36 | | ||||
35 | connect(this, SIGNAL(noMoreParsingError()), | 37 | connect(this, SIGNAL(noMoreParsingError()), | ||
36 | this, SLOT(clearErrorStyle())); | 38 | this, SLOT(clearErrorStyle())); | ||
37 | 39 | | |||
38 | //hack to let the clearError be called, even if the value changed method is the one from QDoubleSpinBox. | 40 | //hack to let the clearError be called, even if the value changed method is the one from QDoubleSpinBox. | ||
39 | connect(this, SIGNAL(valueChanged(double)), | 41 | connect(this, SIGNAL(valueChanged(double)), | ||
40 | this, SLOT(clearError())); | 42 | this, SLOT(clearError())); | ||
41 | 43 | | |||
42 | connect(this, SIGNAL(errorWhileParsing(QString)), | 44 | connect(this, SIGNAL(errorWhileParsing(QString)), | ||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |