Commit c34fb6bf authored by wiebel's avatar wiebel
Browse files

adapted classnames and filenames to new namingconvention due to new name

parent ffe75f64
......@@ -62,7 +62,7 @@ ADD_SUBDIRECTORY( dataHandler )
ADD_SUBDIRECTORY( graphicsEngine )
ADD_SUBDIRECTORY( gui )
ADD_SUBDIRECTORY( plugins )
ADD_EXECUTABLE( walnut BCognize.cpp utils/BOptionHandler.cpp )
ADD_EXECUTABLE( walnut OpenWalnut.cpp utils/WOptionHandler.cpp )
TARGET_LINK_LIBRARIES( walnut guiqt4 ${Boost_LIBRARIES} )
......
......@@ -23,8 +23,8 @@
#include <iostream>
#include "gui/qt4/BMainApplication.h"
#include "utils/BOptionHandler.h"
#include "gui/qt4/WMainApplication.h"
#include "utils/WOptionHandler.h"
/**
* The main routine starting up the whole application.
......@@ -43,6 +43,6 @@ int main( int argc, char* argv[] )
"along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>." << std::endl;
std::cout << std::endl; // Create new line after message for clarity.
BOptionHandler h( argc, argv );
WOptionHandler h( argc, argv );
return h.takeActions();
}
......@@ -24,19 +24,19 @@
#include <cassert>
#include <GL/glew.h>
#include "BGLScenePainter.h"
#include "WGLScenePainter.h"
BGLScenePainter::BGLScenePainter()
WGLScenePainter::WGLScenePainter()
{
// TODO(wiebel): Auto-generated constructor stub
}
BGLScenePainter::~BGLScenePainter()
WGLScenePainter::~WGLScenePainter()
{
// TODO(wiebel): Auto-generated destructor stub
}
void BGLScenePainter::initGL() const
void WGLScenePainter::initGL() const
{
GLenum glewError = glewInit();
assert( glewError == GL_NO_ERROR );
......@@ -47,7 +47,7 @@ void BGLScenePainter::initGL() const
glClearColor( 1., 1., 1., 0 );
}
void BGLScenePainter::paintGL() const
void WGLScenePainter::paintGL() const
{
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glLoadIdentity();
......@@ -68,7 +68,7 @@ void BGLScenePainter::paintGL() const
glEnd();
}
void BGLScenePainter::resizeGL( int width, int height ) const
void WGLScenePainter::resizeGL( int width, int height ) const
{
glViewport( 0, 0, width, height );
}
......@@ -21,18 +21,18 @@
//
//---------------------------------------------------------------------------
#ifndef BGLSCENEPAINTER_H
#define BGLSCENEPAINTER_H
#ifndef WGLSCENEPAINTER_H
#define WGLSCENEPAINTER_H
/**
* \ingroup ge
* This is the base class for rendering the scene graph.
*/
class BGLScenePainter
class WGLScenePainter
{
public:
BGLScenePainter();
virtual ~BGLScenePainter();
WGLScenePainter();
virtual ~WGLScenePainter();
/**
* Initialize the OpenGL context, e.g., set main transformation matrices.
......@@ -60,4 +60,4 @@ public:
*/
#endif // BGLSCENEPAINTER_H
#endif // WGLSCENEPAINTER_H
......@@ -6,5 +6,5 @@ ADD_LIBRARY( gui SHARED ${GUI_SRC} )
# Unit tests
IF( CXXTEST_FOUND )
CXXTEST_ADD_TEST( unittest_BGUI BGUI_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/test/BGUI_test.h )
CXXTEST_ADD_TEST( unittest_WGUI WGUI_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/test/WGUI_test.h )
ENDIF( CXXTEST_FOUND )
......@@ -21,8 +21,8 @@
//
//---------------------------------------------------------------------------
#include "BGUI.h"
#include "WGUI.h"
BGUI::~BGUI()
WGUI::~WGUI()
{
}
......@@ -21,17 +21,17 @@
//
//---------------------------------------------------------------------------
#ifndef BGUI_H
#define BGUI_H
#ifndef WGUI_H
#define WGUI_H
/**
* This class prescribes the interface to the GUI.
* \ingroup gui
*/
class BGUI
class WGUI
{
public:
virtual ~BGUI();
virtual ~WGUI();
/**
* \brief
......@@ -51,4 +51,4 @@ public:
*/
#endif // BGUI_H
#endif // WGUI_H
......@@ -21,8 +21,8 @@
//
//---------------------------------------------------------------------------
#ifndef BICONS_H
#define BICONS_H
#ifndef WICONS_H
#define WICONS_H
/**
* This file is provided to allow to get access to all used icons by one include.
......@@ -32,4 +32,4 @@
#include "fileopen.xpm"
#include "quit.xpm"
#endif // BICONS_H
#endif // WICONS_H
......@@ -23,14 +23,14 @@
#include <QtGui/QApplication>
#include "BMainApplication.h"
#include "BMainWindow.h"
#include "WMainApplication.h"
#include "WMainWindow.h"
int BMainApplication::runQT( int argc, char* argv[] )
int WMainApplication::runQT( int argc, char* argv[] )
{
QApplication appl( argc, argv );
QMainWindow *widget = new QMainWindow;
BMainWindow gui;
WMainWindow gui;
gui.setupGUI( widget );
widget->show();
......
......@@ -21,13 +21,13 @@
//
//---------------------------------------------------------------------------
#ifndef BMAINAPPLICATION_H
#define BMAINAPPLICATION_H
#ifndef WMAINAPPLICATION_H
#define WMAINAPPLICATION_H
/**
* Starts up the QT GUI.
*/
class BMainApplication
class WMainApplication
{
public:
/**
......@@ -41,5 +41,5 @@ protected:
private:
};
#endif // BMAINAPPLICATION_H
#endif // WMAINAPPLICATION_H
......@@ -23,15 +23,15 @@
#include <QtGui/QDockWidget>
#include "BMainWindow.h"
#include "BQtGLWidget.h"
#include "BQtPipelineBrowser.h"
#include "WMainWindow.h"
#include "WQtGLWidget.h"
#include "WQtPipelineBrowser.h"
#include "../icons/BIcons.h"
#include "../icons/WIcons.h"
void BMainWindow::addDockableGLWidget( QMainWindow *MainWindow )
void WMainWindow::addDockableGLWidget( QMainWindow *MainWindow )
{
m_glWidget = new BQtGLWidget();
m_glWidget = new WQtGLWidget();
QDockWidget *dockWidget = new QDockWidget( "Graphics Display" );
dockWidget->setAllowedAreas( Qt::LeftDockWidgetArea
| Qt::RightDockWidgetArea );
......@@ -39,7 +39,7 @@ void BMainWindow::addDockableGLWidget( QMainWindow *MainWindow )
MainWindow->addDockWidget( Qt::LeftDockWidgetArea, dockWidget );
}
void BMainWindow::setupGUI( QMainWindow *MainWindow )
void WMainWindow::setupGUI( QMainWindow *MainWindow )
{
QIcon mainWindowIcon;
QIcon quitIcon;
......@@ -137,7 +137,7 @@ void BMainWindow::setupGUI( QMainWindow *MainWindow )
m_menuHelp->setTitle( QApplication::translate( "MainWindow", "&Help", 0,
QApplication::UnicodeUTF8 ) );
m_glWidget = new BQtGLWidget();
m_glWidget = new WQtGLWidget();
MainWindow->setCentralWidget( m_glWidget );
// initially 3 views
......@@ -145,7 +145,7 @@ void BMainWindow::setupGUI( QMainWindow *MainWindow )
addDockableGLWidget( MainWindow );
addDockableGLWidget( MainWindow );
m_pipelineBrowser = new BQtPipelineBrowser();
m_pipelineBrowser = new WQtPipelineBrowser();
MainWindow->addDockWidget( Qt::RightDockWidgetArea, m_pipelineBrowser );
MainWindow->setWindowTitle( QApplication::translate( "MainWindow",
......@@ -159,7 +159,7 @@ void BMainWindow::setupGUI( QMainWindow *MainWindow )
QMetaObject::connectSlotsByName( MainWindow );
}
void BMainWindow::setEnabled( bool enable )
void WMainWindow::setEnabled( bool enable )
{
// TODO(wiebel) implement here
}
......@@ -21,8 +21,8 @@
//
//---------------------------------------------------------------------------
#ifndef BMAINWINDOW_H
#define BMAINWINDOW_H
#ifndef WMAINWINDOW_H
#define WMAINWINDOW_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
......@@ -35,18 +35,18 @@
#include <QtGui/QToolBar>
#include <QtGui/QWidget>
#include "../BGUI.h"
#include "../WGUI.h"
// forward declarations
class BQtGLWidget;
class BQtPipelineBrowser;
class WQtGLWidget;
class WQtPipelineBrowser;
/**
* \ingroup gui
* This class contains the main window and the layout
* of the widgets within the window.
*/
class BMainWindow : public BGUI
class WMainWindow : public WGUI
{
public:
......@@ -77,8 +77,8 @@ private:
QStatusBar* m_statusBar;
QToolBar* m_toolBar;
BQtGLWidget* m_glWidget;
BQtPipelineBrowser* m_pipelineBrowser;
WQtGLWidget* m_glWidget;
WQtPipelineBrowser* m_pipelineBrowser;
/**
* Helper routine for adding new docks with GL content
......@@ -86,4 +86,4 @@ private:
void addDockableGLWidget( QMainWindow *MainWindow );
};
#endif // BMAINWINDOW_H
#endif // WMAINWINDOW_H
......@@ -21,10 +21,10 @@
//
//---------------------------------------------------------------------------
#include "BQtGLWidget.h"
#include "../../graphicsEngine/BGLScenePainter.h"
#include "WQtGLWidget.h"
#include "../../graphicsEngine/WGLScenePainter.h"
BQtGLWidget::BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent )
WQtGLWidget::WQtGLWidget( WGLScenePainter* scenePainter, QWidget *parent )
: QGLWidget( parent ),
m_scenePainter( scenePainter ),
m_recommendedSize()
......@@ -33,37 +33,37 @@ BQtGLWidget::BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent )
m_recommendedSize.setHeight( 200 );
}
BQtGLWidget::BQtGLWidget( QWidget *parent )
WQtGLWidget::WQtGLWidget( QWidget *parent )
: QGLWidget( parent ),
m_recommendedSize()
{
m_recommendedSize.setWidth( 200 );
m_recommendedSize.setHeight( 200 );
m_scenePainter = new BGLScenePainter();
m_scenePainter = new WGLScenePainter();
}
BQtGLWidget::~BQtGLWidget()
WQtGLWidget::~WQtGLWidget()
{
// TODO(wiebel): Auto-generated destructor stub
}
void BQtGLWidget::paintGL()
void WQtGLWidget::paintGL()
{
// TODO(wiebel): we have to have something automatic in here in the future
m_scenePainter->paintGL();
}
QSize BQtGLWidget::sizeHint() const
QSize WQtGLWidget::sizeHint() const
{
return m_recommendedSize;
}
void BQtGLWidget::resizeGL( int width, int height )
void WQtGLWidget::resizeGL( int width, int height )
{
m_scenePainter->resizeGL( width, height );
}
void BQtGLWidget:: initializeGL()
void WQtGLWidget:: initializeGL()
{
m_scenePainter->initGL();
}
......@@ -21,24 +21,24 @@
//
//---------------------------------------------------------------------------
#ifndef BQTGLWIDGET_H
#define BQTGLWIDGET_H
#ifndef WQTGLWIDGET_H
#define WQTGLWIDGET_H
#include <QtOpenGL/QGLWidget>
class BGLScenePainter;
class WGLScenePainter;
/**
* \ingroup gui
* A widget containing an open gl display area.
*/
class BQtGLWidget: public QGLWidget
class WQtGLWidget: public QGLWidget
{
public:
explicit BQtGLWidget( QWidget *parent = 0 );
BQtGLWidget( BGLScenePainter* scenePainter, QWidget *parent = 0 );
virtual ~BQtGLWidget();
explicit WQtGLWidget( QWidget *parent = 0 );
WQtGLWidget( WGLScenePainter* scenePainter, QWidget *parent = 0 );
virtual ~WQtGLWidget();
/**
* returns the recommended size for the widget to allow
......@@ -78,7 +78,7 @@ private:
/**
* Holds the GL scene painter of the widget
*/
BGLScenePainter* m_scenePainter;
WGLScenePainter* m_scenePainter;
/**
* Holds the recommended size for the widget
......@@ -86,4 +86,4 @@ private:
QSize m_recommendedSize;
};
#endif // BQTGLWIDGET_H
#endif // WQTGLWIDGET_H
......@@ -21,9 +21,9 @@
//
//---------------------------------------------------------------------------
#include "BQtPipelineBrowser.h"
#include "WQtPipelineBrowser.h"
BQtPipelineBrowser::BQtPipelineBrowser()
WQtPipelineBrowser::WQtPipelineBrowser()
: QDockWidget( "Pipeline Browser" ),
m_recommendedSize()
{
......@@ -32,12 +32,12 @@ BQtPipelineBrowser::BQtPipelineBrowser()
m_recommendedSize.setHeight( 300 );
}
BQtPipelineBrowser::~BQtPipelineBrowser()
WQtPipelineBrowser::~WQtPipelineBrowser()
{
// TODO(wiebel) Auto-generated destructor stub
}
QSize BQtPipelineBrowser::sizeHint() const
QSize WQtPipelineBrowser::sizeHint() const
{
return m_recommendedSize;
}
......@@ -21,8 +21,8 @@
//
//---------------------------------------------------------------------------
#ifndef BQTPIPELINEBROWSER_H
#define BQTPIPELINEBROWSER_H
#ifndef WQTPIPELINEBROWSER_H
#define WQTPIPELINEBROWSER_H
#include <QtGui/QDockWidget>
......@@ -31,11 +31,11 @@
* Represents the browser showing the loaded data sets
* and applied filter/methods/algorithms/plugins
*/
class BQtPipelineBrowser: public QDockWidget
class WQtPipelineBrowser: public QDockWidget
{
public:
BQtPipelineBrowser();
virtual ~BQtPipelineBrowser();
WQtPipelineBrowser();
virtual ~WQtPipelineBrowser();
/**
* returns the recommended size for the widget to allow
......@@ -50,4 +50,4 @@ private:
QSize m_recommendedSize;
};
#endif // BQTPIPELINEBROWSER_H
#endif // WQTPIPELINEBROWSER_H
......@@ -21,21 +21,21 @@
//
//---------------------------------------------------------------------------
#ifndef BGUI_TEST_H
#define BGUI_TEST_H
#ifndef WGUI_TEST_H
#define WGUI_TEST_H
#include <cxxtest/TestSuite.h>
#include "../BGUI.h"
#include "../WGUI.h"
class BGUITest : public CxxTest::TestSuite
class WGUITest : public CxxTest::TestSuite
{
public:
// Since BGUI is abstrac no test are here to define
// Since WGUI is abstrac no test are here to define
void testInstanziation( void )
{
TS_ASSERT( true );
}
};
#endif // BGUI_TEST_H
#endif // WGUI_TEST_H
......@@ -23,9 +23,9 @@
#include <iostream>
#include "BOptionHandler.h"
#include "WOptionHandler.h"
BOptionHandler::BOptionHandler( int argc, char* argv[] )
WOptionHandler::WOptionHandler( int argc, char* argv[] )
: m_argc( argc ),
m_argv( argv ),
m_errorOccured( false ),
......@@ -56,19 +56,19 @@ BOptionHandler::BOptionHandler( int argc, char* argv[] )
}
}
void BOptionHandler::createOptions()
void WOptionHandler::createOptions()
{
// This is not our CodingStandard, but this is a special overloaded operator()
m_desc.add_options()
( "help,h", "prints this help message" );
}
void BOptionHandler::parseOptions()
void WOptionHandler::parseOptions()
{
po::store( po::parse_command_line( m_argc, m_argv, m_desc ), m_map );
}
int BOptionHandler::takeActions() const
int WOptionHandler::takeActions() const
{
if( m_errorOccured )
{
......@@ -81,7 +81,7 @@ int BOptionHandler::takeActions() const
return 0;
}
BMainApplication app;
WMainApplication app;
return app.runQT( m_argc, m_argv );
}
......@@ -21,12 +21,12 @@
//
//---------------------------------------------------------------------------
#ifndef BOPTIONHANDLER_H
#define BOPTIONHANDLER_H
#ifndef WOPTIONHANDLER_H
#define WOPTIONHANDLER_H
#include <boost/program_options.hpp>
#include "../gui/qt4/BMainApplication.h"
#include "../gui/qt4/WMainApplication.h"
// since the namespace is far to big we use a shortcut here:
namespace po = boost::program_options;
......@@ -34,14 +34,14 @@ namespace po = boost::program_options;
/**
* Parses commandline options, print usage and issue other appropriate actions.
*/
class BOptionHandler
class WOptionHandler
{
public:
/**
* Initiate the handling of the commandline parameter given via argc and
* argv with the ProgramOptions library from boost.
*/
BOptionHandler( int argc, char* argv[] );
WOptionHandler( int argc, char* argv[] );
/**
* Evaluates the given options and initiate the appropriate actions.
......@@ -77,5 +77,5 @@ private:
void parseOptions();
};
#endif // BOPTIONHANDLER_H
#endif // WOPTIONHANDLER_H
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