Using return to write the logBook in UnitsCalculator
This commit is contained in:
parent
f2ebb0813e
commit
ae3c1704c9
|
@ -48,7 +48,9 @@ DlgUnitsCalculator::DlgUnitsCalculator( QWidget* parent, Qt::WFlags fl )
|
|||
this->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
connect(this->ValueInput, SIGNAL(valueChanged(Base::Quantity)), this, SLOT(valueChanged(Base::Quantity)));
|
||||
connect(this->ValueInput, SIGNAL(returnPressed () ), this, SLOT(returnPressed()));
|
||||
connect(this->UnitInput, SIGNAL(valueChanged(Base::Quantity)), this, SLOT(unitValueChanged(Base::Quantity)));
|
||||
connect(this->UnitInput, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
|
||||
|
||||
connect(this->pushButton_Help, SIGNAL(clicked()), this, SLOT(help()));
|
||||
connect(this->pushButton_Close, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
|
@ -131,6 +133,10 @@ void DlgUnitsCalculator::help(void)
|
|||
//TODO: call help page Std_UnitsCalculator
|
||||
}
|
||||
|
||||
void DlgUnitsCalculator::returnPressed(void)
|
||||
{
|
||||
this->textEdit->append(this->ValueInput->text() + QString::fromAscii(" = ") + this->ValueOutput->text());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ protected Q_SLOTS:
|
|||
|
||||
void copy(void);
|
||||
void help(void);
|
||||
void returnPressed(void);
|
||||
|
||||
void parseError(const QString& errorText);
|
||||
|
||||
|
@ -58,6 +59,7 @@ private:
|
|||
Base::Quantity actValue;
|
||||
Base::Quantity actUnit;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace Dialog
|
||||
|
|
Loading…
Reference in New Issue
Block a user