{
public:
ModuleBase_EditorDialog(QWidget* theParent, Qt::WindowFlags theFlags)
- : QDialog(theParent, theFlags) {}
+ : QDialog(theParent, theFlags)
+ {
+ setMinimumWidth(100);
+ }
~ModuleBase_EditorDialog() {}
protected:
{
}
-bool ModuleBase_WidgetEditor::editedValue(double& outValue, QString& outText)
+bool ModuleBase_WidgetEditor::editedValue(double theSpinMinValue, double theSpinMaxValue,
+ double& outValue, QString& outText)
{
bool isValueAccepted = false;
aLay->setContentsMargins(2, 2, 2, 2);
ModuleBase_ParamSpinBox* anEditor = new ModuleBase_ParamSpinBox(myEditorDialog);
- anEditor->setMinimum(0);
- anEditor->setMaximum(DBL_MAX);
+ anEditor->setMinimum(theSpinMinValue);
+ anEditor->setMaximum(theSpinMaxValue);
+
+ QStringList aParameters;
+ ModuleBase_Tools::getParameters(aParameters);
+ anEditor->setCompletionList(aParameters);
+
if (outText.isEmpty())
anEditor->setValue(outValue);
else
if (mySpinBox->hasVariable())
aText = mySpinBox->text();
- isValueAccepted = editedValue(aValue, aText);
+ isValueAccepted = editedValue(mySpinBox->minimum(), mySpinBox->maximum(), aValue, aText);
if (isValueAccepted) {
if (aText.isEmpty()) {
if (mySpinBox->hasVariable()) {