void DAVAFloat32SpinBox::stepBy(int steps)
{
	textEditingFinished();
	setValue(originalValue + (DAVA::float32) steps);
	selectAll();

	emit valueEdited();
}
DAVAFloat32SpinBox::DAVAFloat32SpinBox(QWidget *parent /* = 0 */)
	: QAbstractSpinBox(parent)
	, originalValue(0)
	, precision(3)
	, hasButtons(true)
	, cleared(true)
{
	QLineEdit *le = lineEdit();

	QRegExp rx("^-?\\d+([\\.,]\\d+){0,1}$");
	QValidator *vd = new QRegExpValidator(rx, this);

	le->setValidator(vd);

	connect(this, SIGNAL(editingFinished()), this, SLOT(textEditingFinished()));
}
Example #3
0
void LineEdit::doEmitTextEditingFinished()
{
    emit textEditingFinished(text());
}