]> Git trees. - libqmvoc.git/commitdiff
* If the user selects an atom in the QTreeWidget KalziumGLWidget will be
authorCarsten Niehaus <cniehaus@gmx.de>
Sat, 17 Jun 2006 17:46:33 +0000 (17:46 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sat, 17 Jun 2006 17:46:33 +0000 (17:46 +0000)
  informed about that in

  void KalziumGLWidget::slotAtomSelected( OpenBabel::OBAtom* atom )

  Benoit: Please add you "atom-hightlight" code there, ok?

CCMAIL:jacob@math.jussieu.fr

svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.h; revision=552399

kalzium/kalziumglwidget.cpp
kalzium/kalziumglwidget.h

index 43ea0e35c81f09dc83cbe6f2f27728db3d3cb17a..7b1bac24c81d73943b1d47ad4d99ef9aebbb59e0 100644 (file)
@@ -613,6 +613,14 @@ void KalziumGLWidget::construct_ortho_3D_basis_given_first_vector3(
        w[2] = u[0] * v[1] - u[1] * v[0];
 }
 
+void KalziumGLWidget::slotAtomSelected( OpenBabel::OBAtom* atom )
+{
+       kDebug() << "KalziumGLWidget::slotAtomSelected()" << endl;
+       //Benoit: At this place you need to do some OpenGL-stuff to select
+       //the emitted atom. No clue how to do that, though :-)
+       if ( !atom ) return;
+}
+
 inline void GLColor::apply()
 {
        glColor3fv( reinterpret_cast<GLfloat *>( this ) );
index 3215e98ed3b7e31cb2847f89e76e3223a0baa58b..04b247301a67782ff47e98becb35c99fdb411464 100644 (file)
@@ -200,10 +200,19 @@ class KalziumGLWidget : public QGLWidget
                 */
                void slotChooseStylePreset( StylePreset stylePreset );
                
+               /**
+                * Chooses the style of rendering among some presets
+                * @param stylePreset the wanted style preset
+                */
                void slotChooseStylePreset( int stylePreset ){
                        slotChooseStylePreset( (StylePreset) stylePreset );
                }
 
+               /**
+                * The atom @p atom was selected by the user
+                */
+               void slotAtomSelected( OpenBabel::OBAtom* atom );
+
        protected:
                /**
                 * This method initializes OpenGL. Automatically called by Qt