]> Git trees. - libqmvoc.git/commitdiff
* Many UI-Changes
authorCarsten Niehaus <cniehaus@gmx.de>
Sat, 17 Jun 2006 07:21:41 +0000 (07:21 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sat, 17 Jun 2006 07:21:41 +0000 (07:21 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.h; revision=552247

kalzium/kalziumglwidget.h
kalzium/openbabel2wrapper.cpp
kalzium/openbabel2wrapper.h

index 2e775f87eb197085dd71f8c5c9e0df03a3dfed28..d301654a5a0d24f140fb11bdd4dee43991ff2a61 100644 (file)
@@ -118,6 +118,13 @@ class KalziumGLWidget : public QGLWidget
 
                virtual void getColor( OpenBabel::OBAtom &a, GLfloat &r, GLfloat &g, GLfloat &b );
 
+               /**
+                * @return the current molecule
+                */
+               OpenBabel::OBMol* molecule(){
+                       return m_molecule;
+               }
+
        public slots:
                /**
                 * sets the molecule which will be displayed
index b0cb07139beba0eefcdd06f4916064af28ec9b38..a273fcce59e69ddf2215ebf7c00c73116a8a42ef 100644 (file)
@@ -55,3 +55,15 @@ OpenBabel::OBMol* OpenBabel2Wrapper::readMolecule( const QString& filename )
 
        return mol;
 }
+
+QString OpenBabel2Wrapper::getFormula( OpenBabel::OBMol* molecule )
+{
+       QString formula( molecule->GetFormula().c_str() );
+       return formula;
+}
+               
+QString OpenBabel2Wrapper::getPrettyFormula( OpenBabel::OBMol* molecule )
+{
+       QString formula( molecule->GetFormula().c_str() );
+       return formula;
+}
index 06b108c833879326f7b325963009279d4b554956..8f46ddded73540c9e59ba50fe463cd3528548da5 100644 (file)
@@ -31,6 +31,10 @@ class OpenBabel2Wrapper
                 * the file couldn't be read.
                 */
                static OpenBabel::OBMol* readMolecule( const QString& filename );
+               
+               static QString getFormula( OpenBabel::OBMol* molecule );
+               
+               static QString getPrettyFormula( OpenBabel::OBMol* molecule );
 };
 
 #endif // OPENBABEL2WRAPPER_H