summaryrefslogtreecommitdiff
authorzecke <zecke>2003-12-09 20:58:41 (UTC)
committer zecke <zecke>2003-12-09 20:58:41 (UTC)
commitafa2a1983fba363bc1d4f692fefc7fc26965de8d (patch) (unidiff)
tree89f148a1417e6cdc0dac8e28cbadf187338d6d6f
parent31ba7b6bf273889f9486bb2df44d9a8a5381f579 (diff)
downloadopie-afa2a1983fba363bc1d4f692fefc7fc26965de8d.zip
opie-afa2a1983fba363bc1d4f692fefc7fc26965de8d.tar.gz
opie-afa2a1983fba363bc1d4f692fefc7fc26965de8d.tar.bz2
Do not include stl if you don't use it
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/kmolcalc.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/oxygen/kmolcalc.cpp b/noncore/apps/oxygen/kmolcalc.cpp
index 1d41b0f..7a47942 100644
--- a/noncore/apps/oxygen/kmolcalc.cpp
+++ b/noncore/apps/oxygen/kmolcalc.cpp
@@ -1,43 +1,42 @@
1/* 1/*
2 * kmolcalc.cpp 2 * kmolcalc.cpp
3 * 3 *
4 * Copyright (C) 2000,2001 Tomislav Gountchev <tomi@idiom.com> 4 * Copyright (C) 2000,2001 Tomislav Gountchev <tomi@idiom.com>
5 * Copyright (C) 2002 Carsten Niehaus <cniehaus@handhelds.org> 5 * Copyright (C) 2002 Carsten Niehaus <cniehaus@handhelds.org>
6 */ 6 */
7 7
8/** 8/**
9 * KMOLCALC is the calculation engine. It knows about a hashtable of user defined atomic 9 * KMOLCALC is the calculation engine. It knows about a hashtable of user defined atomic
10 * weights and group definitions ELSTABLE, and the currently processed formula, stored 10 * weights and group definitions ELSTABLE, and the currently processed formula, stored
11 * as a list of elements and their coefficients, ELEMENTS. 11 * as a list of elements and their coefficients, ELEMENTS.
12 */ 12 */
13 13
14#include "kmolcalc.h" 14#include "kmolcalc.h"
15#include <qdict.h> 15#include <qdict.h>
16#include <qdir.h> 16#include <qdir.h>
17#include <qfile.h> 17#include <qfile.h>
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <iostream>
20 19
21 20
22/** 21/**
23 * Construct a new calculator object. 22 * Construct a new calculator object.
24 */ 23 */
25KMolCalc::KMolCalc() { 24KMolCalc::KMolCalc() {
26 elements = new ElementList; 25 elements = new ElementList;
27 elstable = NULL; 26 elstable = NULL;
28 readElstable(); 27 readElstable();
29} 28}
30 29
31KMolCalc::~KMolCalc() { 30KMolCalc::~KMolCalc() {
32 delete elements; 31 delete elements;
33} 32}
34 33
35void KMolCalc::readElstable() { 34void KMolCalc::readElstable() {
36 weight = -1; // not calculated yet 35 weight = -1; // not calculated yet
37 if (elstable) delete elstable; 36 if (elstable) delete elstable;
38 elstable = new QDict<SubUnit> (197, TRUE); 37 elstable = new QDict<SubUnit> (197, TRUE);
39 elstable->setAutoDelete(TRUE); 38 elstable->setAutoDelete(TRUE);
40 mwfile = QPEApplication::qpeDir() +"share/oxygen/kmolweights"; 39 mwfile = QPEApplication::qpeDir() +"share/oxygen/kmolweights";
41 QFile f(mwfile); 40 QFile f(mwfile);
42 if (f.exists()) readMwfile(f); 41 if (f.exists()) readMwfile(f);
43} 42}