-///*!
-// \brief This function is used to determine whether input is valid.
-// \return validating operation result
-// */
-//ModuleBase_ParamSpinBox::State ModuleBase_ParamSpinBox::isValid(const QString& theText,
-// double& theValue) const
-//{
-// if (hasVariable() && !findVariable(theText, theValue)) {
-// bool ok = false;
-// theValue = locale().toDouble(theText, &ok);
-// if (!ok) {
-// return NoVariable;
-// }
-// }
-// if (!checkRange(theValue)) {
-// return Invalid;
-// }
-//
-// return Acceptable;
-//}
-//
-///*!
-// \brief This function is used to check that string value lies within predefined range.
-// \return check status
-// */
-//bool ModuleBase_ParamSpinBox::checkRange(const double theValue) const
-//{
-// return theValue >= minimum() && theValue <= maximum();
-//}
-//
-///*!
-// \brief This function is used to determine whether input is a variable name and to get its value.
-// \return status of search operation
-// */
-//bool ModuleBase_ParamSpinBox::findVariable(const QString& theName,
-// double& outValue) const
-//{
-// ResultParameterPtr aParam;
-// return ModelAPI_Tools::findVariable(FeaturePtr(), theName.toStdString(), outValue, aParam);
-//}
+void ModuleBase_ParamSpinBox::showCompletion(bool checkPrefix)
+{
+ myCompletePos = lineEdit()->cursorPosition();
+ int aStart, aEnd;
+ QString aPrefix;
+ aPrefix = getPrefix(aStart, aEnd);
+ if (checkPrefix) {
+ if (aPrefix.length() > 0) {
+ myCompleter->setCompletionPrefix(aPrefix);
+ myCompleter->complete();
+ }
+ } else {
+ myCompleter->setCompletionPrefix(aPrefix);
+ myCompleter->complete();
+ }
+}