double aVal = lineEdit()->text().toDouble();
aVal += steps * mySingleStep;
setValue(aVal);
- QAbstractSpinBox::stepBy(steps);
+ //QAbstractSpinBox::stepBy(steps);
}
void ModuleBase_ParamSpinBox::onTextChanged(const QString& theText)
else if (aVal > myMaximum)
aVal = myMaximum;
QString aText = QString::number(aVal, 'g', decimals());
+ lineEdit()->blockSignals(true);
lineEdit()->setText(aText);
+ lineEdit()->blockSignals(false);
emit textChanged(aText);
}
virtual bool eventFilter(QObject* theObj, QEvent* theEvent);
+ /// The virtual function is reimplemented in order to avoid extra increasing of value by StepBy
+ /// method
+ virtual void timerEvent(QTimerEvent *event) {}
virtual StepEnabled stepEnabled() const { return StepUpEnabled | StepDownEnabled; }
myLabel->setToolTip(aTTip);
aControlLay->addRow(myLabel, mySpinBox);
- connect(mySpinBox, SIGNAL(valueChanged(int)), this, SIGNAL(valuesModified()));
+ connect(mySpinBox, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
}
ModuleBase_WidgetIntValue::~ModuleBase_WidgetIntValue()