]> Git trees. - libqmvoc.git/commitdiff
Only make methods 'virtual' when it's needed.
authorBenoît Jacob <jacob.benoit.1@gmail.com>
Wed, 18 Oct 2006 06:26:00 +0000 (06:26 +0000)
committerBenoît Jacob <jacob.benoit.1@gmail.com>
Wed, 18 Oct 2006 06:26:00 +0000 (06:26 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.h; revision=596668

kalzium/kalziumglhelperclasses.h
kalzium/kalziumglwidget.h

index eb64d8b34788e42048d8087732d58d2f110fb802..7940e9d62605c3fec6b0f88b39ad5fd4ddda16ab 100644 (file)
@@ -310,23 +310,23 @@ class Sphere : public VertexArray
                 * icosahedron */
                int m_detail;
 
-               virtual int getVertexCount();
-               virtual int getIndexCount();
-               virtual void buildBuffers();
+               int getVertexCount();
+               int getIndexCount();
+               void buildBuffers();
 
        public:
                Sphere();
-               virtual ~Sphere() {}
+               ~Sphere() {}
 
                /** initializes the sphere with given level of detail. If the
                 * sphere was already initialized, any pre-allocated buffers
                 * are freed and then re-allocated.
                @param detail the wanted level of detail. See m_detail member */
-               virtual void setup( int detail );
+               void setup( int detail );
 
                /** draws the sphere at specifiec position and with
                 * specified radius */
-               virtual void draw( const OpenBabel::vector3 &center, double radius );
+               void draw( const OpenBabel::vector3 &center, double radius );
 };
 
 /**
@@ -342,16 +342,16 @@ class Cylinder : public VertexArray
                 * two discs) are not rendered. */
                int m_faces;
 
-               virtual int getVertexCount();
-               virtual void buildBuffers();
+               int getVertexCount();
+               void buildBuffers();
 
        public:
                Cylinder();
-               virtual ~Cylinder() {}
+               ~Cylinder() {}
                /** initializes the cylinder with given number of faces. If the
                 * cylinder was already initialized, any pre-allocated buffers
                 * are freed and then re-allocated */
-               virtual void setup( int faces );
+               void setup( int faces );
                /**
                 * draws the cylinder at specified position, with specified
                 * radius. the order and shift arguments allow to render
@@ -371,7 +371,7 @@ class Cylinder : public VertexArray
                        this is interpreted as the displacement of the axis
                        of the drawn cylinders from the axis (end1 - end2).
                 */
-               virtual void draw( const OpenBabel::vector3 &end1, const OpenBabel::vector3 &end2,
+               void draw( const OpenBabel::vector3 &end1, const OpenBabel::vector3 &end2,
                        double radius, int order = 1, double shift = 0.0 );
 };
 
index ea545f3c79dfb833d2cd104be6274aa63d0841a7..ae1a8c4c96ff50f4ed21056ea73d14eef4b52d10 100644 (file)
@@ -105,7 +105,7 @@ class KalziumGLWidget : public QGLWidget
                /**
                 * Destructor
                 */
-               virtual ~KalziumGLWidget();
+               ~KalziumGLWidget();
 
                /**
                 * @return Returns a pointer to the molecule being worked on
@@ -190,25 +190,25 @@ class KalziumGLWidget : public QGLWidget
                /**
                 * This method initializes OpenGL. Automatically called by Qt
                 */
-               virtual void initializeGL();
+               void initializeGL();
 
                /**
                 * This method does the painting. Automatically called by Qt
                 */
-               virtual void paintGL();
-               virtual void renderAtoms();
-               virtual void renderBonds();
-               virtual void renderHighlighting();
-               virtual void FPSCounter();
+               void paintGL();
+               void renderAtoms();
+               void renderBonds();
+               void renderHighlighting();
+               void FPSCounter();
 
                /**
                 * This method is called by Qt whenever the widget is resized.
                 */
-               virtual void resizeGL( int width, int height );
+               void resizeGL( int width, int height );
 
-               virtual void mousePressEvent( QMouseEvent * event );
-               virtual void mouseReleaseEvent( QMouseEvent * event );
-               virtual void mouseMoveEvent( QMouseEvent * event );
+               void mousePressEvent( QMouseEvent * event );
+               void mouseReleaseEvent( QMouseEvent * event );
+               void mouseMoveEvent( QMouseEvent * event );
 
                /**
                 * This method is called by slotSetMolecule. It prepares the
@@ -233,7 +233,7 @@ class KalziumGLWidget : public QGLWidget
                 * recomputes the geometry of the geometric objects ( sphere,
                 * cylinder ).
                 */
-               virtual void setupObjects();
+               void setupObjects();
 
                /**
                 * Sets the molecule style, but contrary to slotSetMolStyle,