author | cniehaus <cniehaus> | 2002-09-23 11:16:29 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-23 11:16:29 (UTC) |
commit | 26c4a68e5e7e68e6fba70b4abe1290d23c2d7410 (patch) (side-by-side diff) | |
tree | f533820993ba68a6b9c6efd545d6c3a717b45cf9 /noncore/apps/oxygen/calcdlgui.cpp | |
parent | 4af73fb07b69dce910abb2ac098b1045403cda67 (diff) | |
download | opie-26c4a68e5e7e68e6fba70b4abe1290d23c2d7410.zip opie-26c4a68e5e7e68e6fba70b4abe1290d23c2d7410.tar.gz opie-26c4a68e5e7e68e6fba70b4abe1290d23c2d7410.tar.bz2 |
i18n-stuff + removed some headers
Diffstat (limited to 'noncore/apps/oxygen/calcdlgui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/calcdlgui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/oxygen/calcdlgui.cpp b/noncore/apps/oxygen/calcdlgui.cpp index ca3a9f2..f8dfde5 100644 --- a/noncore/apps/oxygen/calcdlgui.cpp +++ b/noncore/apps/oxygen/calcdlgui.cpp @@ -1,64 +1,64 @@ /*************************************************************************** application: : Oxygen begin : September 2002 copyright : ( C ) 2002 by Carsten Niehaus email : cniehaus@handhelds.org **************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * ( at your option ) any later version. * * * **************************************************************************/ #include "oxygen.h" #include "calcdlgui.h" #include "kmolcalc.h" #include <qlineedit.h> #include <qmultilineedit.h> #include <qpushbutton.h> calcDlgUI::calcDlgUI() : CalcDlg() { kmolcalc = new KMolCalc; connect( calculate, SIGNAL( clicked() ), this, SLOT( calc() ) ); connect( clear_fields, SIGNAL( clicked() ), this, SLOT( clear() ) ); result->setReadOnly( true ); } void calcDlgUI::calc() { QString compound( formula->text() ); if ( compound.isEmpty() ) { clear(); return; } QString errors( kmolcalc->readFormula( compound ) ); QString mw, ea; double weight = kmolcalc->getWeight(); if ( errors == "OK" ) { mw.setNum( weight ); ea = kmolcalc->getEmpFormula() + " :\n" + kmolcalc->getEA(); } else { mw = "???"; - ea = tr( "ERROR: \n" ) + errors + "\n"; + ea = tr( "ERROR: \n" ).arg( errors )+ "\n"; } result->setText( mw ); anal_display->setText( ea ); } /** * * Clear all text entry / result fields. * */ void calcDlgUI::clear() { formula->clear(); result->clear(); anal_display->clear(); } |