[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/kalzium/src
From:       BenoƮt Jacob <jacob () math ! jussieu ! fr>
Date:       2006-10-18 6:26:02
Message-ID: 1161152762.168049.18623.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 596668 by bjacob:

Only make methods 'virtual' when it's needed.



 M  +11 -11    kalziumglhelperclasses.h  
 M  +12 -12    kalziumglwidget.h  


--- trunk/KDE/kdeedu/kalzium/src/kalziumglhelperclasses.h #596667:596668
@@ -310,23 +310,23 @@
 		 * 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 @@
 		 * 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 @@
 			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 );
 };
 
--- trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.h #596667:596668
@@ -105,7 +105,7 @@
 		/**
 		 * Destructor
 		 */
-		virtual ~KalziumGLWidget();
+		~KalziumGLWidget();
 
 		/**
 		 * @return Returns a pointer to the molecule being worked on
@@ -190,25 +190,25 @@
 		/**
 		 * 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 @@
 		 * recomputes the geometry of the geometric objects ( sphere,
 		 * cylinder ).
 		 */
-		virtual void setupObjects();
+		void setupObjects();
 
 		/**
 		 * Sets the molecule style, but contrary to slotSetMolStyle,
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic