Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

kmolcalc.h

Go to the documentation of this file.
00001 /* 
00002  * kmolcalc.h
00003  *
00004  * Copyright (C) 2000 Tomislav Gountchev <tomi@idiom.com>
00005  */
00006 
00007 
00008 #ifndef KMOLCALC_H
00009 #define KMOLCALC_H
00010 
00011 #ifdef HAVE_CONFIG_H
00012 #include <config.h>
00013 #endif 
00014 
00015 
00016 #include "kmolelements.h"
00017 #include <qdict.h>
00018 #include <qlist.h>
00019 #include <qstring.h>
00020 #include <qfile.h>
00021 #include <qfileinfo.h>
00022 #include <qmessagebox.h>
00023 #include <qtextstream.h>
00024 
00025 
00031 class KMolCalc {
00032 
00033 public:
00034 
00035   KMolCalc();
00036   ~KMolCalc();
00037   
00044   QString readFormula(const QString& s);
00045   
00049   double getWeight();
00050   
00055   QString getEA();
00056 
00057 
00061   QString getEmpFormula();
00062 
00067   void defineElement(const QString& name, double weight);
00068 
00073   QString defineGroup(const QString& name, const QString& formula);
00074 
00078   void undefineGroup(const QString& name);
00079 
00083   void readElstable();
00084 
00088   QDict<SubUnit>* elstable;
00089 
00090   QString mwfile;
00091 
00092  private:
00093   double weight;
00094 
00095   QString readGroup(const QString& s, ElementList* els);
00096   void readMwfile(QFile& f);
00097   ElementList* elements;
00098 };
00099     
00100 #endif
00101 
00102 
00103 
00104 
00105 

Generated on Sat Nov 5 16:17:07 2005 for OPIE by  doxygen 1.4.2