Commit fbad9468 authored by wiebel's avatar wiebel
Browse files

added const where appropriate

parent 20df1599
......@@ -19,16 +19,16 @@ BGLScenePainter::~BGLScenePainter()
// TODO(wiebel): Auto-generated destructor stub
}
void BGLScenePainter::initGL()
void BGLScenePainter::initGL() const
{
GLenum error = glGetError();
assert( error == GL_NO_ERROR );
// Set clear color
glClearColor( 0, 0, 0, 0 );
glClearColor( 1., 1., 1., 0 );
}
void BGLScenePainter::paintGL()
void BGLScenePainter::paintGL() const
{
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glLoadIdentity();
......@@ -49,7 +49,7 @@ void BGLScenePainter::paintGL()
glEnd();
}
void BGLScenePainter::resizeGL( int width, int height )
void BGLScenePainter::resizeGL( int width, int height ) const
{
glViewport( 0, 0, width, height );
}
......@@ -20,18 +20,18 @@ class BGLScenePainter
/**
* Initialize the OpenGL context, e.g., set main transformation matrices.
*/
virtual void initGL();
virtual void initGL() const;
/**
* Do the OpenGL painting in every frame.
*/
virtual void paintGL();
virtual void paintGL() const;
/**
* Called, when the window is resized and re-initialization of the
* window parameters and matrices may need to be done.
*/
virtual void resizeGL( int width, int height );
virtual void resizeGL( int width, int height ) const;
};
......
......@@ -6,12 +6,6 @@
#include "BGUI.h"
BGUI::BGUI()
{
// TODO(wiebel): Auto-generated constructor stub
}
BGUI::~BGUI()
{
// TODO(wiebel): Auto-generated destructor stub
}
......@@ -14,7 +14,6 @@
class BGUI
{
public:
BGUI();
virtual ~BGUI();
/**
......
......@@ -144,5 +144,5 @@ void BMainWindow::setupGUI( QMainWindow *MainWindow )
void BMainWindow::setEnabled( bool enable )
{
// NOTE implement here
// TODO(wiebel) implement here
}
......@@ -32,6 +32,9 @@ class BQtGLWidget: public QGLWidget
/**
* This virtual function is called whenever the widget has been
* resized. The new size is passed in width and height.
*
* \note It seem that the function is not called if declared const, so it
* is not const.
*/
void resizeGL( int width, int height );
......@@ -40,12 +43,18 @@ class BQtGLWidget: public QGLWidget
* This function is called once before the first
* call to paintGL() or resizeGL(), and then once whenever
* the widget has been assigned a new QGLContext.
*
* \note It seem that the function is not called if declared const, so it
* is not const.
*/
void initializeGL();
private:
/**
* This function is called whenever the widget needs to be painted.
*
* \note It seem that the function is not called if declared const, so it
* is not const.
*/
void paintGL();
......
......@@ -17,7 +17,7 @@ BQtPipelineBrowser::BQtPipelineBrowser()
BQtPipelineBrowser::~BQtPipelineBrowser()
{
// NOTE Auto-generated destructor stub
// TODO(wiebel) Auto-generated destructor stub
}
QSize BQtPipelineBrowser::sizeHint() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment