: QGLWidget( parent )
{
sphereDisplayList = 0;
+ m_molecule = 0;
+ m_detail = 2;
isDragging = false;
setMinimumSize( 100,100 );
glPopMatrix();
}
+void KalziumGLWidget::slotSetMolecule( OpenBabel::OBMol* molecule )
+{
+ m_molecule = molecule;
+}
+
+void KalziumGLWidget::slotSetDetail( int detail )
+{
+ m_detail = detail;
+}
+
#include "kalziumglwidget.moc"
#define SPHERE_TESSELATE_SLICES 30
#define SPHERE_TESSELATE_STACKS 30
+#include <openbabel/mol.h>
+
/**
* This class displays the 3D-view of a molecule
*
*/
virtual ~KalziumGLWidget();
+ public slots:
+ /**
+ * sets the molecule which will be displayed
+ * @param molecule the molecule to render
+ */
+ void slotSetMolecule( OpenBabel::OBMol* molecule );
+
+ /**
+ * Sets the detail-grade in a range from 0 to 2
+ * @param detail the detail-grade of the rendering. 0 is low, 2 is high
+ */
+ void slotSetDetail( int detail );
+
protected:
/**
* This method initilized OpenGL
GLfloat red,
GLfloat green,
GLfloat blue );
+
+ /**
+ * The molecule which is displayed
+ */
+ OpenBabel::OBMol* m_molecule;
+
+ /**
+ * The detail-grade from 0 to 2
+ */
+ int m_detail;
};
#endif // KALZIUMGLWIDGET_H