author | kergoth <kergoth> | 2002-09-15 17:23:20 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-09-15 17:23:20 (UTC) |
commit | 9bd6edd077df796677c9d069200172f930ac1304 (patch) (side-by-side diff) | |
tree | 3b473d4280249b5ade8e5276758cc8f9aa3c2822 /noncore/apps/checkbook/calcdlgui.cpp | |
parent | 33ec9ead7ce30bf9450b9048506f0bda49ba4791 (diff) | |
download | opie-9bd6edd077df796677c9d069200172f930ac1304.zip opie-9bd6edd077df796677c9d069200172f930ac1304.tar.gz opie-9bd6edd077df796677c9d069200172f930ac1304.tar.bz2 |
Reverting to checkbook in its previous state, hopefully i got everything.
Diffstat (limited to 'noncore/apps/checkbook/calcdlgui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/calcdlgui.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/noncore/apps/checkbook/calcdlgui.cpp b/noncore/apps/checkbook/calcdlgui.cpp deleted file mode 100644 index e9b40d3..0000000 --- a/noncore/apps/checkbook/calcdlgui.cpp +++ b/dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * * - * 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() ) ); -} - -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"; - } - result->setText( mw ); - anal_display->setText( ea ); -} - -/** - * * Clear all text entry / result fields. - * */ -void calcDlgUI::clear() -{ - formula->clear(); - result->clear(); - anal_display->clear(); -} - - |