aMainLay->addRow(aLabel, myLineEdit);
this->setLayout(aMainLay);
- connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged()));
+ connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified()));
}
ModuleBase_WidgetLineEdit::~ModuleBase_WidgetLineEdit()
return result;
}
-void ModuleBase_WidgetLineEdit::onTextChanged()
+bool ModuleBase_WidgetLineEdit::processEnter()
{
- storeValue();
+ bool isModified = getValueState() == ModifiedInPP;
+ if (isModified) {
+ emit valuesChanged();
+ myLineEdit->selectAll();
+ }
+ return isModified;
}
/// Redefinition of virtual method
virtual QList<QWidget*> getControls() const;
- public slots:
- /// A slot for processing text changed event
- void onTextChanged();
+ /// Returns true if the event is processed.
+ virtual bool processEnter();
protected:
/// Saves the internal parameters to the given feature