Commit 131e7377 authored by math's avatar math
Browse files

adjusted existing code to CodingStandard and updated BrainLint

parent fb9575cc
......@@ -4,7 +4,6 @@
//
//---------------------------------------------------------------------------
#include <iostream>
#include <QtGui/QApplication>
#include "gui/qt4/BMainWindow.h"
......
......@@ -44,10 +44,6 @@ void BGLScenePainter::paintGL()
glEnd();
}
void BGLScenePainter::resizeGL(int w, int h)
void BGLScenePainter::resizeGL( int w, int h )
{
}
......@@ -13,25 +13,25 @@
*/
class BGLScenePainter
{
public:
BGLScenePainter();
virtual ~BGLScenePainter();
/**
* Initialize the OpenGL context, e.g., set main transformation matrices.
*/
virtual void initGL();
/**
* Do the OpenGL painting in every frame.
*/
virtual void paintGL();
/**
* Called, when the window is resized and re-initialization of the
* window parameters and matrices may need to be done.
*/
virtual void resizeGL(int w, int h);
public:
BGLScenePainter();
virtual ~BGLScenePainter();
/**
* Initialize the OpenGL context, e.g., set main transformation matrices.
*/
virtual void initGL();
/**
* Do the OpenGL painting in every frame.
*/
virtual void paintGL();
/**
* Called, when the window is resized and re-initialization of the
* window parameters and matrices may need to be done.
*/
virtual void resizeGL( int w, int h );
};
......@@ -43,4 +43,4 @@ public:
*/
#endif /* BGLSCENEPAINTER_H */
#endif // BGLSCENEPAINTER_H
......@@ -9,7 +9,6 @@
BGUI::BGUI()
{
// TODO Auto-generated constructor stub
}
BGUI::~BGUI()
......
......@@ -13,19 +13,18 @@
*/
class BGUI
{
public:
BGUI();
virtual ~BGUI();
/**
* \brief
* enable/disable the access to the GUI
* \post
* GUI enabled/disabled
* \param enable true iff gui should be enabled
*/
virtual void setEnabled (bool enable) = 0;
public:
BGUI();
virtual ~BGUI();
/**
* \brief
* enable/disable the access to the GUI
* \post
* GUI enabled/disabled
* \param enable true iff gui should be enabled
*/
virtual void setEnabled( bool enable ) = 0;
};
/**
......@@ -36,4 +35,4 @@ public:
*/
#endif /* BGUI_H */
#endif // BGUI_H
//---------------------------------------------------------------------------
//
// Project: BrainCognize
//
//---------------------------------------------------------------------------
#ifndef ICONS_H
#define ICONS_H
/**
* This file is provided to allow to get access to all used icons by one include.
*/
......@@ -5,3 +13,5 @@
#include "disc.xpm"
#include "fileopen.xpm"
#include "quit.xpm"
#endif // ICONS_H
......@@ -121,7 +121,7 @@ void BMainWindow::setupGUI( QMainWindow *MainWindow )
m_glWidget = new BQtGLWidget();
MainWindow->setCentralWidget( m_glWidget );
//initially 3 views
// initially 3 views
addDockableGLWidget( MainWindow );
addDockableGLWidget( MainWindow );
addDockableGLWidget( MainWindow );
......@@ -134,13 +134,13 @@ void BMainWindow::setupGUI( QMainWindow *MainWindow )
m_toolBar->setWindowTitle( QApplication::translate( "MainWindow",
"toolBar", 0, QApplication::UnicodeUTF8 ) );
QObject::connect( m_actionExit, SIGNAL(activated()), MainWindow,
SLOT(close()) );
QObject::connect( m_actionExit, SIGNAL( activated() ), MainWindow,
SLOT( close() ) );
QMetaObject::connectSlotsByName( MainWindow );
}
void BMainWindow::setEnabled (bool enable)
void BMainWindow::setEnabled( bool enable )
{
// NOTE implement here
}
......@@ -19,7 +19,7 @@
#include "../BGUI.h"
//forward declarations
// forward declarations
class BQtGLWidget;
class BQtPipelineBrowser;
......@@ -31,42 +31,42 @@ class BQtPipelineBrowser;
*/
class BMainWindow : public BGUI
{
public:
public:
/**
* Set up all widgets menus an buttons in the main window.
*/
void setupGUI( QMainWindow *MainWindow );
/**
* Set up all widgets menus an buttons in the main window.
*/
void setupGUI( QMainWindow *MainWindow );
/**
* \brief
* enable/disable the access to the GUI
* \post
* GUI enabled/disabeld
* \param enable true iff gui should be enabled
*/
void setEnabled( bool enable );
/**
* \brief
* enable/disable the access to the GUI
* \post
* GUI enabled/disabeld
* \param enable true iff gui should be enabled
*/
void setEnabled( bool enable );
private:
QAction* m_actionLoad;
QAction* m_actionSave;
QAction* m_actionPreferences;
QAction* m_actionExit;
QAction* m_actionAbout_BrainCognize;
QWidget* m_centralwidget;
QMenuBar* m_menubar;
QMenu* m_menuFile;
QMenu* m_menuHelp;
QStatusBar* m_statusBar;
QToolBar* m_toolBar;
private:
QAction* m_actionLoad;
QAction* m_actionSave;
QAction* m_actionPreferences;
QAction* m_actionExit;
QAction* m_actionAbout_BrainCognize;
QWidget* m_centralwidget;
QMenuBar* m_menubar;
QMenu* m_menuFile;
QMenu* m_menuHelp;
QStatusBar* m_statusBar;
QToolBar* m_toolBar;
BQtGLWidget* m_glWidget;
BQtPipelineBrowser* m_pipelineBrowser;
BQtGLWidget* m_glWidget;
BQtPipelineBrowser* m_pipelineBrowser;
/**
* Helper routine for adding new docks with GL content
*/
void addDockableGLWidget( QMainWindow *MainWindow );
/**
* Helper routine for adding new docks with GL content
*/
void addDockableGLWidget( QMainWindow *MainWindow );
};
#endif // BMAINWINDOW_H
#endif // BMAINWINDOW_H
......@@ -7,21 +7,22 @@
#include "BQtGLWidget.h"
#include "../../graphicsEngine/BGLScenePainter.h"
BQtGLWidget::BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent ) :
m_scenePainter( scenePainter ), QGLWidget( parent ), m_recommendedSize()
BQtGLWidget::BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent )
: m_scenePainter( scenePainter ),
QGLWidget( parent ),
m_recommendedSize()
{
m_recommendedSize.setWidth( 200 );
m_recommendedSize.setHeight( 200 );
}
BQtGLWidget::BQtGLWidget( QWidget *parent ) :
QGLWidget( parent ), m_recommendedSize()
BQtGLWidget::BQtGLWidget( QWidget *parent )
: QGLWidget( parent ),
m_recommendedSize()
{
m_recommendedSize.setWidth( 200 );
m_recommendedSize.setHeight( 200 );
m_scenePainter = new BGLScenePainter();
}
BQtGLWidget::~BQtGLWidget()
......
......@@ -18,32 +18,31 @@ class BGLScenePainter;
*/
class BQtGLWidget: public QGLWidget
{
public:
BQtGLWidget( QWidget *parent = 0 );
BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent = 0 );
virtual ~BQtGLWidget();
/**
* returns the recommended size for the widget to allow
* parent widgets to give it a proper initial layout
*/
QSize sizeHint() const;
private:
/**
* This function is called whenever the widget needs to be painted.
*/
void paintGL();
/**
* Holds the GL scene painter of the widget
*/
BGLScenePainter* m_scenePainter;
/**
* Holds the recommended size for the widget
*/
QSize m_recommendedSize;
public:
explicit BQtGLWidget( QWidget *parent = 0 );
BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent = 0 );
virtual ~BQtGLWidget();
/**
* returns the recommended size for the widget to allow
* parent widgets to give it a proper initial layout
*/
QSize sizeHint() const;
private:
/**
* This function is called whenever the widget needs to be painted.
*/
void paintGL();
/**
* Holds the GL scene painter of the widget
*/
BGLScenePainter* m_scenePainter;
/**
* Holds the recommended size for the widget
*/
QSize m_recommendedSize;
};
#endif /* BQTGLWIDGET_H */
#endif // BQTGLWIDGET_H
......@@ -6,13 +6,13 @@
#include "BQtPipelineBrowser.h"
BQtPipelineBrowser::BQtPipelineBrowser() :
QDockWidget( "Pipeline Browser" ), m_recommendedSize()
BQtPipelineBrowser::BQtPipelineBrowser()
: QDockWidget( "Pipeline Browser" ),
m_recommendedSize()
{
setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
m_recommendedSize.setWidth( 200 );
m_recommendedSize.setHeight( 300 );
}
BQtPipelineBrowser::~BQtPipelineBrowser()
......
......@@ -16,21 +16,21 @@
*/
class BQtPipelineBrowser: public QDockWidget
{
public:
BQtPipelineBrowser();
virtual ~BQtPipelineBrowser();
public:
BQtPipelineBrowser();
virtual ~BQtPipelineBrowser();
/**
* returns the recommended size for the widget to allow
* parent widgets to give it a proper initial layout
*/
QSize sizeHint() const;
private:
/**
* returns the recommended size for the widget to allow
* parent widgets to give it a proper initial layout
*/
QSize sizeHint() const;
/**
* Holds the recommended size for the widget
*/
QSize m_recommendedSize;
private:
/**
* Holds the recommended size for the widget
*/
QSize m_recommendedSize;
};
#endif /* BQTPIPELINEBROWSER_H */
#endif // BQTPIPELINEBROWSER_H
......@@ -198,7 +198,7 @@ _CPP_HEADERS = frozenset([
# Other heders which are include like system headers, starting with a '<'
_OTHER_HEADERS = frozenset([
'QtGui'
'QtGui', 'GL'
])
# Assertion macros. These are defined in base/logging.h and
......
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