Commit 98b6d23a by Alexander Wiebel

[FIX] fixed capitalization of "axial" and by this renamed it to "Axial View"

(and similar  for coronal and sagittal). Corrected name of data set browser:
it really is the "Control Panel"
parent a30bd81f
......@@ -191,19 +191,19 @@ void WMainWindow::setupGUI()
bool hideWidget;
if( !( WPreferences::getPreference( "qt4gui.hideAxial", &hideWidget ) && hideWidget) )
{
m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "axial", this, "Axial Slice" ) );
m_navAxial = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Axial View", this, "Axial Slice" ) );
m_navAxial->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::LeftDockWidgetArea, m_navAxial.get() );
}
if( !( WPreferences::getPreference( "qt4gui.hideCoronal", &hideWidget ) && hideWidget) )
{
m_navCoronal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "coronal", this, "Coronal Slice" ) );
m_navCoronal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Coronal View", this, "Coronal Slice" ) );
m_navCoronal->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::LeftDockWidgetArea, m_navCoronal.get() );
}
if( !( WPreferences::getPreference( "qt4gui.hideSagittal", &hideWidget ) && hideWidget) )
{
m_navSagittal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "sagittal", this, "Sagittal Slice" ) );
m_navSagittal = boost::shared_ptr< WQtNavGLWidget >( new WQtNavGLWidget( "Sagittal View", this, "Sagittal Slice" ) );
m_navSagittal->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::LeftDockWidgetArea, m_navSagittal.get() );
}
......@@ -257,14 +257,14 @@ void WMainWindow::setupPermanentToolBar()
// NOTE: this only works if the toolbar is used with QActions instead of buttons and other widgets
m_permanentToolBar->setToolButtonStyle( getToolbarStyle() );
m_iconManager.addIcon( std::string( "ROI" ), box_xpm );
m_iconManager.addIcon( std::string( "axial" ), axial_xpm );
m_iconManager.addIcon( std::string( "coronal" ), cor_xpm );
m_iconManager.addIcon( std::string( "sagittal" ), sag_xpm );
m_iconManager.addIcon( std::string( "ROI icon" ), box_xpm );
m_iconManager.addIcon( std::string( "axial icon" ), axial_xpm );
m_iconManager.addIcon( std::string( "coronal icon" ), cor_xpm );
m_iconManager.addIcon( std::string( "sagittal icon" ), sag_xpm );
// TODO(all): this should be QActions to allow the toolbar style to work properly
m_loadButton = new WQtPushButton( m_iconManager.getIcon( "load" ), "load", m_permanentToolBar );
WQtPushButton* roiButton = new WQtPushButton( m_iconManager.getIcon( "ROI" ), "ROI", m_permanentToolBar );
WQtPushButton* roiButton = new WQtPushButton( m_iconManager.getIcon( "ROI icon" ), "ROI", m_permanentToolBar );
WQtPushButton* projectLoadButton = new WQtPushButton( m_iconManager.getIcon( "loadProject" ), "loadProject", m_permanentToolBar );
WQtPushButton* projectSaveButton = new WQtPushButton( m_iconManager.getIcon( "saveProject" ), "saveProject", m_permanentToolBar );
......@@ -382,7 +382,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
WQtPropertyBoolAction* a = new WQtPropertyBoolAction( prop->toPropBool(), m_permanentToolBar );
a->setToolTip( "Toggle Axial Slice" );
a->setText( "Toggle Axial Slice" );
a->setIcon( m_iconManager.getIcon( "axial" ) );
a->setIcon( m_iconManager.getIcon( "axial icon" ) );
m_permanentToolBar->addAction( a );
}
......@@ -398,7 +398,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
WQtPropertyBoolAction* a = new WQtPropertyBoolAction( prop->toPropBool(), m_permanentToolBar );
a->setToolTip( "Toggle Coronal Slice" );
a->setText( "Toggle Coronal Slice" );
a->setIcon( m_iconManager.getIcon( "coronal" ) );
a->setIcon( m_iconManager.getIcon( "coronal icon" ) );
m_permanentToolBar->addAction( a );
}
......@@ -414,7 +414,7 @@ void WMainWindow::moduleSpecificSetup( boost::shared_ptr< WModule > module )
WQtPropertyBoolAction* a = new WQtPropertyBoolAction( prop->toPropBool(), m_permanentToolBar );
a->setToolTip( "Toggle Saggital Slice" );
a->setText( "Toggle Saggital Slice" );
a->setIcon( m_iconManager.getIcon( "sagittal" ) );
a->setIcon( m_iconManager.getIcon( "sagittal icon" ) );
m_permanentToolBar->addAction( a );
}
......
......@@ -1116,17 +1116,17 @@ bool WQtConfigWidget::setWalnutFromProperties()
{
view->setBgColor( color );
}
view = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "axial" );
view = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Axial View" );
if ( view )
{
view->setBgColor( color );
}
view = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "coronal" );
view = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Coronal View" );
if ( view )
{
view->setBgColor( color );
}
view = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "sagittal" );
view = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Sagittal View" );
if ( view )
{
view->setBgColor( color );
......
......@@ -63,7 +63,7 @@
#include "WQtDatasetBrowser.h"
WQtDatasetBrowser::WQtDatasetBrowser( WMainWindow* parent )
: QDockWidget( "Dataset Browser", parent ),
: QDockWidget( "Control Panel", parent ),
m_ignoreSelectionChange( false )
{
m_mainWindow = parent;
......
......@@ -163,19 +163,19 @@ void WMNavSlices::moduleMain()
WAssert( m_viewer, "Requested viewer not found." );
m_viewer->getPickHandler()->getPickSignal()->connect( boost::bind( &WMNavSlices::setSlicePosFromPick, this, _1 ) );
m_viewer = ge->getViewerByName( "axial" );
m_viewer = ge->getViewerByName( "Axial View" );
if( m_viewer )
{
m_viewer->getPickHandler()->getPickSignal()->connect( boost::bind( &WMNavSlices::setSlicePosFromPick, this, _1 ) );
}
m_viewer = ge->getViewerByName( "sagittal" );
m_viewer = ge->getViewerByName( "Sagittal View" );
if( m_viewer )
{
m_viewer->getPickHandler()->getPickSignal()->connect( boost::bind( &WMNavSlices::setSlicePosFromPick, this, _1 ) );
}
m_viewer = ge->getViewerByName( "coronal" );
m_viewer = ge->getViewerByName( "Coronal View" );
if( m_viewer )
{
m_viewer->getPickHandler()->getPickSignal()->connect( boost::bind( &WMNavSlices::setSlicePosFromPick, this, _1 ) );
......@@ -205,21 +205,21 @@ void WMNavSlices::moduleMain()
// NOTE: ALAWAYS remove your osg nodes!
// Please, please always check for NULL
boost::shared_ptr< WGEViewer > viewer;
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "axial" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Axial View" );
if( viewer )
{
viewer->getScene()->remove( m_zSliceNode );
viewer->getScene()->remove( m_zCrossNode );
}
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "sagittal" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Sagittal View" );
if( viewer )
{
viewer->getScene()->remove( m_xSliceNode );
viewer->getScene()->remove( m_xCrossNode );
}
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "coronal" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Coronal View" );
if( viewer )
{
viewer->getScene()->remove( m_ySliceNode );
......@@ -300,7 +300,7 @@ void WMNavSlices::create()
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->insert( m_slicesNode );
// Please, please always check for NULL
boost::shared_ptr< WGEViewer > viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "axial" );
boost::shared_ptr< WGEViewer > viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Axial View" );
if( viewer )
{
viewer->getScene()->insert( m_zSliceNode );
......@@ -308,7 +308,7 @@ void WMNavSlices::create()
viewer->setCameraManipulator( 0 );
}
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "sagittal" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Sagittal View" );
if( viewer )
{
viewer->getScene()->insert( m_xSliceNode );
......@@ -316,7 +316,7 @@ void WMNavSlices::create()
viewer->setCameraManipulator( 0 );
}
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "coronal" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Coronal View" );
if( viewer )
{
viewer->getScene()->insert( m_ySliceNode );
......@@ -330,15 +330,16 @@ void WMNavSlices::setSlicePosFromPick( WPickInfo pickInfo )
// handle the pick information on the slice views
if ( pickInfo.getViewerName() != "main" && pickInfo.getViewerName() != "" )
{
osg::ref_ptr< osg::Viewport > port = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "axial" )->getCamera()->getViewport();
osg::ref_ptr< osg::Viewport > port;
port= WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Axial View" )->getCamera()->getViewport();
float axialWidgetWidth = port->width();
float axialWidgetHeight = port->height();
port = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "sagittal" )->getCamera()->getViewport();
port = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Sagittal View" )->getCamera()->getViewport();
float sagittalWidgetWidth = port->width();
float sagittalWidgetHeight = port->height();
port = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "coronal" )->getCamera()->getViewport();
port = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Coronal View" )->getCamera()->getViewport();
float coronalWidgetWidth = port->width();
float coronalWidgetHeight = port->height();
......@@ -354,7 +355,7 @@ void WMNavSlices::setSlicePosFromPick( WPickInfo pickInfo )
float height;
float left, top;
// z slice
if ( pickInfo.getViewerName() == "axial" )
if ( pickInfo.getViewerName() == "Axial View" )
{
width = m_bb.second[0] - m_bb.first[0];
height = m_bb.second[1] - m_bb.first[1];
......@@ -381,7 +382,7 @@ void WMNavSlices::setSlicePosFromPick( WPickInfo pickInfo )
}
// x slice
if ( pickInfo.getViewerName() == "sagittal" )
if ( pickInfo.getViewerName() == "Sagittal View" )
{
width = m_bb.second[1] - m_bb.first[1];
height = m_bb.second[2] - m_bb.first[2];
......@@ -409,7 +410,7 @@ void WMNavSlices::setSlicePosFromPick( WPickInfo pickInfo )
}
// y slice
if ( pickInfo.getViewerName() == "coronal" )
if ( pickInfo.getViewerName() == "Coronal View" )
{
width = m_bb.second[0] - m_bb.first[0];
height = m_bb.second[2] - m_bb.first[2];
......@@ -1016,7 +1017,7 @@ void WMNavSlices::updateViewportMatrix()
double scale;
boost::shared_ptr< WGEViewer > viewer;
osg::ref_ptr< WGEGroupNode > currentScene;
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "axial" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Axial View" );
if( viewer )
{
currentScene = viewer->getScene();
......@@ -1055,7 +1056,7 @@ void WMNavSlices::updateViewportMatrix()
currentScene->setMatrix( tm );
}
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "sagittal" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Sagittal View" );
if( viewer )
{
currentScene = viewer->getScene();
......@@ -1096,7 +1097,7 @@ void WMNavSlices::updateViewportMatrix()
currentScene->setMatrix( tm );
}
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "coronal" );
viewer = WKernel::getRunningKernel()->getGraphicsEngine()->getViewerByName( "Coronal View" );
if( viewer )
{
currentScene = viewer->getScene();
......
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