From 8162487d253560ea5c67b124f22384127c54494d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Jacob?= Date: Wed, 18 Oct 2006 06:26:00 +0000 Subject: [PATCH] Only make methods 'virtual' when it's needed. svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.h; revision=596668 --- kalzium/kalziumglhelperclasses.h | 22 +++++++++++----------- kalzium/kalziumglwidget.h | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/kalzium/kalziumglhelperclasses.h b/kalzium/kalziumglhelperclasses.h index eb64d8b..7940e9d 100644 --- a/kalzium/kalziumglhelperclasses.h +++ b/kalzium/kalziumglhelperclasses.h @@ -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 ¢er, double radius ); + void draw( const OpenBabel::vector3 ¢er, 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 ); }; diff --git a/kalzium/kalziumglwidget.h b/kalzium/kalziumglwidget.h index ea545f3..ae1a8c4 100644 --- a/kalzium/kalziumglwidget.h +++ b/kalzium/kalziumglwidget.h @@ -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, -- 2.47.3