Commit 7b36dc11 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - additional views are enabled again.

parent 09fcbd42
...@@ -77,32 +77,31 @@ void WMainWindow::setupGUI( boost::program_options::variables_map guiConfigurati ...@@ -77,32 +77,31 @@ void WMainWindow::setupGUI( boost::program_options::variables_map guiConfigurati
m_mainGLWidget->initialize(); m_mainGLWidget->initialize();
setCentralWidget( m_mainGLWidget.get() ); setCentralWidget( m_mainGLWidget.get() );
// initially 3 views
m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "axial", this, 160, "axialPos" ) );
addDockWidget( Qt::LeftDockWidgetArea, m_navAxial.get() );
m_navCoronal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "coronal", this, 200, "coronalPos" ) );
addDockWidget( Qt::LeftDockWidgetArea, m_navCoronal.get() );
m_navSagittal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "sagittal", this, 160, "sagittalPos" ) );
addDockWidget( Qt::LeftDockWidgetArea, m_navSagittal.get() );
connect( m_navAxial.get(), SIGNAL( navSliderValueChanged( QString, int ) ), &m_propertyManager, SLOT( slotIntChanged( QString, int ) ) );
connect( m_navCoronal.get(), SIGNAL( navSliderValueChanged( QString, int ) ), &m_propertyManager, SLOT( slotIntChanged( QString, int ) ) );
connect( m_navSagittal.get(), SIGNAL( navSliderValueChanged( QString, int ) ), &m_propertyManager, SLOT( slotIntChanged( QString, int ) ) );
if( guiConfiguration.count( "ge.bgColor.r" ) && guiConfiguration.count( "ge.bgColor.g" ) && guiConfiguration.count( "ge.bgColor.b" ) ) if( guiConfiguration.count( "ge.bgColor.r" ) && guiConfiguration.count( "ge.bgColor.g" ) && guiConfiguration.count( "ge.bgColor.b" ) )
{ {
WColor bgColor( guiConfiguration["ge.bgColor.r"].as< float >(), WColor bgColor( guiConfiguration["ge.bgColor.r"].as< float >(),
guiConfiguration["ge.bgColor.g"].as< float >(), guiConfiguration["ge.bgColor.g"].as< float >(),
guiConfiguration["ge.bgColor.b"].as< float >() ); guiConfiguration["ge.bgColor.b"].as< float >() );
m_mainGLWidget->setBgColor( bgColor ); m_mainGLWidget->setBgColor( bgColor );
m_navAxial->getGLWidget()->setBgColor( bgColor );
m_navCoronal->getGLWidget()->setBgColor( bgColor );
m_navSagittal->getGLWidget()->setBgColor( bgColor );
} }
//TODO(all): this is commented out
// initially 3 views
// m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "axial", 160, "axialPos" ) );
//m_navAxial->getGLWidget()->initialize();
//addDockWidget( Qt::LeftDockWidgetArea, m_navAxial.get() );
//m_navCoronal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "coronal", 200, "coronalPos" ) );
//m_navCoronal->getGLWidget()->initialize();
//addDockWidget( Qt::LeftDockWidgetArea, m_navCoronal.get() );
//m_navSagittal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "sagittal", 160, "sagittalPos" ) );
//m_navSagittal->getGLWidget()->initialize();
//addDockWidget( Qt::LeftDockWidgetArea, m_navSagittal.get() );
//connect( m_navAxial.get(), SIGNAL( navSliderValueChanged( QString, int ) ), &m_propertyManager, SLOT( slotIntChanged( QString, int ) ) );
//connect( m_navCoronal.get(), SIGNAL( navSliderValueChanged( QString, int ) ), &m_propertyManager, SLOT( slotIntChanged( QString, int ) ) );
//connect( m_navSagittal.get(), SIGNAL( navSliderValueChanged( QString, int ) ), &m_propertyManager, SLOT( slotIntChanged( QString, int ) ) );
m_datasetBrowser = new WQtDatasetBrowser(); m_datasetBrowser = new WQtDatasetBrowser();
addDockWidget( Qt::RightDockWidgetArea, m_datasetBrowser ); addDockWidget( Qt::RightDockWidgetArea, m_datasetBrowser );
m_datasetBrowser->addSubject( "subject1" ); m_datasetBrowser->addSubject( "subject1" );
...@@ -235,10 +234,9 @@ void WMainWindow::closeEvent( QCloseEvent* e ) ...@@ -235,10 +234,9 @@ void WMainWindow::closeEvent( QCloseEvent* e )
// clean up gl widgets // clean up gl widgets
m_mainGLWidget->close(); m_mainGLWidget->close();
//TODO(all): this is commented out m_navAxial->close();
//m_navAxial->close(); m_navCoronal->close();
//m_navCoronal->close(); m_navSagittal->close();
//m_navSagittal->close();
// finally close // finally close
e->accept(); e->accept();
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#include "WQtNavGLWidget.h" #include "WQtNavGLWidget.h"
WQtNavGLWidget::WQtNavGLWidget( QString title, int maxValue, std::string sliderTitle ) WQtNavGLWidget::WQtNavGLWidget( QString title, QWidget* parent, int maxValue, std::string sliderTitle )
: QDockWidget( title ) : QDockWidget( title, parent )
{ {
m_sliderTitle = QString( sliderTitle.c_str() ); m_sliderTitle = QString( sliderTitle.c_str() );
...@@ -47,7 +47,8 @@ WQtNavGLWidget::WQtNavGLWidget( QString title, int maxValue, std::string sliderT ...@@ -47,7 +47,8 @@ WQtNavGLWidget::WQtNavGLWidget( QString title, int maxValue, std::string sliderT
QVBoxLayout* layout = new QVBoxLayout(); QVBoxLayout* layout = new QVBoxLayout();
m_glWidget = boost::shared_ptr<WQtGLWidget>( new WQtGLWidget( title.toStdString() , panel, WGECamera::ORTHOGRAPHIC ) ); m_glWidget = boost::shared_ptr<WQtGLWidget>( new WQtGLWidget( title.toStdString(), panel, WGECamera::ORTHOGRAPHIC ) );
m_glWidget->initialize();
layout->addWidget( m_glWidget.get() ); layout->addWidget( m_glWidget.get() );
layout->addWidget( slider ); layout->addWidget( slider );
......
...@@ -40,8 +40,10 @@ class WQtNavGLWidget : public QDockWidget ...@@ -40,8 +40,10 @@ class WQtNavGLWidget : public QDockWidget
public: public:
/** /**
* default constructor * default constructor
*
* \param parent the parent widget.
*/ */
explicit WQtNavGLWidget( QString title, int maxValue = 100, std::string sliderTitle="pos" ); explicit WQtNavGLWidget( QString title, QWidget* parent ,int maxValue = 100, std::string sliderTitle="pos" );
/** /**
* destructor * destructor
......
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