AngleSpinBox.cpp   AngleSpinBox.cpp 
skipping to change at line 191 skipping to change at line 191
return (StepUpEnabled|StepDownEnabled); return (StepUpEnabled|StepDownEnabled);
} }
double AngleSpinBox::valueRadians() double AngleSpinBox::valueRadians()
{ {
return radAngle; return radAngle;
} }
double AngleSpinBox::valueDegrees() double AngleSpinBox::valueDegrees()
{ {
return (radAngle*360)/(2*M_PI); return (radAngle*360.)/(2.*M_PI);
}
QString AngleSpinBox::text()
{
return lineEdit()->text();
} }
double AngleSpinBox::stringToDouble(QString input, QValidator::State* state , PrefixType prefix) const double AngleSpinBox::stringToDouble(QString input, QValidator::State* state , PrefixType prefix) const
{ {
if (prefix==Unknown) if (prefix==Unknown)
{ {
prefix=currentPrefixType; prefix=currentPrefixType;
} }
int sign=1; int sign=1;
if (input.startsWith(negativePrefix(prefix), Qt::CaseInsensitive)) if (input.startsWith(negativePrefix(prefix), Qt::CaseInsensitive))
skipping to change at line 310 skipping to change at line 305
return 0.0; return 0.0;
} }
void AngleSpinBox::updateValue(void) void AngleSpinBox::updateValue(void)
{ {
QValidator::State state; QValidator::State state;
double a = stringToDouble(lineEdit()->text(), &state); double a = stringToDouble(lineEdit()->text(), &state);
if (state != QValidator::Acceptable) if (state != QValidator::Acceptable)
return; return;
if (radAngle == a)
return;
radAngle = a; radAngle = a;
formatText(); formatText();
emit(valueChanged()); emit(valueChanged());
} }
void AngleSpinBox::setRadians(double radians) void AngleSpinBox::setRadians(double radians)
{ {
radAngle = radians; radAngle = radians;
formatText(); formatText();
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/