Skip to content

Commit

Permalink
Using return to write the logBook in UnitsCalculator
Browse files Browse the repository at this point in the history
  • Loading branch information
jriegel committed Nov 30, 2013
1 parent f2ebb08 commit ae3c170
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Gui/DlgUnitsCalculatorImp.cpp
Expand Up @@ -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()));
Expand Down Expand Up @@ -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());
}



Expand Down
2 changes: 2 additions & 0 deletions src/Gui/DlgUnitsCalculatorImp.h
Expand Up @@ -51,13 +51,15 @@ protected Q_SLOTS:

void copy(void);
void help(void);
void returnPressed(void);

void parseError(const QString& errorText);

private:
Base::Quantity actValue;
Base::Quantity actUnit;


};

} // namespace Dialog
Expand Down

0 comments on commit ae3c170

Please sign in to comment.