diff --git a/src/Base/Quantity.cpp b/src/Base/Quantity.cpp index 97073d44e..8d293a06e 100644 --- a/src/Base/Quantity.cpp +++ b/src/Base/Quantity.cpp @@ -39,12 +39,6 @@ # pragma warning(disable : 4335) // disable MAC file format warning on VC #endif -#ifndef DOUBLE_MAX -# define DOUBLE_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/ -#endif -#ifndef DOUBLE_MIN -# define DOUBLE_MIN 2.2250738585072014E-308 /* min decimal value of a "double"*/ -#endif using namespace Base; diff --git a/src/Base/Quantity.h b/src/Base/Quantity.h index c64d2f74b..e965215cd 100644 --- a/src/Base/Quantity.h +++ b/src/Base/Quantity.h @@ -27,6 +27,13 @@ #include "Unit.h" #include +#ifndef DOUBLE_MAX +# define DOUBLE_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/ +#endif +#ifndef DOUBLE_MIN +# define DOUBLE_MIN 2.2250738585072014E-308 /* min decimal value of a "double"*/ +#endif + namespace Base { /** diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index 3a106b7cd..588ce4820 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -40,7 +40,7 @@ using namespace Base; // -------------------------------------------------------------------- InputField::InputField ( QWidget * parent ) - : QLineEdit(parent) + : QLineEdit(parent), StepSize(1.0), Maximum(DOUBLE_MAX),Minimum(-DOUBLE_MAX) { this->setContextMenuPolicy(Qt::DefaultContextMenu); @@ -149,37 +149,37 @@ void InputField::setUnit(const Base::Unit& unit) /// get the value of the singleStep property double InputField::singleStep(void)const { - return 0.0; + return StepSize; } /// set the value of the singleStep property -void InputField::setSingleStep(double) +void InputField::setSingleStep(double s) { - + StepSize = s; } /// get the value of the maximum property double InputField::maximum(void)const { - return 0.0; + return Maximum; } /// set the value of the maximum property -void InputField::setMaximum(double) +void InputField::setMaximum(double m) { - + Maximum = m; } /// get the value of the minimum property double InputField::minimum(void)const { - return 0.0; + return Minimum; } /// set the value of the minimum property -void InputField::setMinimum(double) +void InputField::setMinimum(double m) { - + Minimum = m; } diff --git a/src/Gui/InputField.h b/src/Gui/InputField.h index f0274028f..8ac314a6e 100644 --- a/src/Gui/InputField.h +++ b/src/Gui/InputField.h @@ -128,6 +128,10 @@ private: Base::Quantity actQuantity; Base::Unit actUnit; + + double Maximum; + double Minimum; + double StepSize; };