Commit 21936ecc authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[CHANGE #358] renamed class WQtDatasetBrowser to WQtControlPanel

parent 0869f4fd
......@@ -28,7 +28,7 @@ SET(GUI_QT4_MOC_HDRS
controlPanel/WPropertyTriggerWidget.h
controlPanel/WPropertySelectionWidget.h
controlPanel/WPropertyPositionWidget.h
controlPanel/WQtDatasetBrowser.h
controlPanel/WQtControlPanel.h
controlPanel/WQtDSBWidget.h
controlPanel/WQtTreeWidget.h
controlPanel/WQtTreeItem.h
......
......@@ -99,38 +99,38 @@ void WMainWindow::setupGUI()
setWindowTitle( QApplication::translate( "MainWindow", "OpenWalnut (development version)", 0, QApplication::UnicodeUTF8 ) );
// the dataset browser instance is needed for the menu
m_datasetBrowser = new WQtDatasetBrowser( this );
m_datasetBrowser->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::RightDockWidgetArea, m_datasetBrowser );
m_datasetBrowser->addSubject( "Default Subject" );
// the control panel instance is needed for the menu
m_controlPanel = new WQtControlPanel( this );
m_controlPanel->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::RightDockWidgetArea, m_controlPanel );
m_controlPanel->addSubject( "Default Subject" );
setupPermanentToolBar();
// we want the upper most tree item to be selected. This helps to make the always compatible modules
// show up in the tool bar from the beginning. And ... it doesn't hurt.
m_datasetBrowser->selectUpperMostEntry();
m_controlPanel->selectUpperMostEntry();
// set the size of the dsb according to config file
int dsbWidth = 250;
if( WPreferences::getPreference( "qt4gui.dsbWidth", &dsbWidth ) )
{
m_datasetBrowser->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
m_datasetBrowser->setMinimumWidth( dsbWidth );
m_controlPanel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
m_controlPanel->setMinimumWidth( dsbWidth );
}
// hide the DSB by default?
bool dsbInvisibleByDefault = false;
if( WPreferences::getPreference( "qt4gui.dsbInvisibleByDefault", &dsbInvisibleByDefault ) )
{
m_datasetBrowser->setVisible( !dsbInvisibleByDefault );
m_controlPanel->setVisible( !dsbInvisibleByDefault );
}
// undock the DSB by default?
bool dsbFloatingByDefault = false;
if( WPreferences::getPreference( "qt4gui.dsbFloatingByDefault", &dsbFloatingByDefault ) )
{
m_datasetBrowser->setFloating( dsbFloatingByDefault );
m_controlPanel->setFloating( dsbFloatingByDefault );
}
// NOTE: Please be aware that not every menu needs a shortcut key. If you add a shortcut, you should use one of the
......@@ -165,7 +165,7 @@ void WMainWindow::setupGUI()
// directly -> set shortcuts, and some further properties using QAction's interface
QMenu* viewMenu = m_menuBar->addMenu( "View" );
QAction* dsbTrigger = m_datasetBrowser->toggleViewAction();
QAction* dsbTrigger = m_controlPanel->toggleViewAction();
QList< QKeySequence > dsbShortcut;
dsbShortcut.append( QKeySequence( Qt::Key_F9 ) );
dsbTrigger->setShortcuts( dsbShortcut );
......@@ -305,8 +305,8 @@ void WMainWindow::setupPermanentToolBar()
if( getToolbarPos() == InDSB )
{
m_datasetBrowser->addToolbar( m_permanentToolBar );
//m_datasetBrowser->setTitleBarWidget( m_permanentToolBar );
m_controlPanel->addToolbar( m_permanentToolBar );
//m_controlPanel->setTitleBarWidget( m_permanentToolBar );
}
else if( getToolbarPos() == Hide )
{
......@@ -569,9 +569,9 @@ void WMainWindow::setCompatiblesToolbar( WQtCombinerToolbar* toolbar )
addToolBar( toQtToolBarArea( getCompatiblesToolbarPos() ), m_currentCompatiblesToolbar );
}
WQtDatasetBrowser* WMainWindow::getDatasetBrowser()
WQtControlPanel* WMainWindow::getControlPanel()
{
return m_datasetBrowser;
return m_controlPanel;
}
void WMainWindow::projectSave( const std::vector< boost::shared_ptr< WProjectFileIO > >& writer )
......@@ -977,7 +977,7 @@ void WMainWindow::newRoi()
wmath::WPosition minROIPos = crossHairPos - wmath::WPosition( 10., 10., 10. );
wmath::WPosition maxROIPos = crossHairPos + wmath::WPosition( 10., 10., 10. );
if( m_datasetBrowser->getFirstRoiInSelectedBranch().get() == NULL )
if( m_controlPanel->getFirstRoiInSelectedBranch().get() == NULL )
{
osg::ref_ptr< WROIBox > newRoi = osg::ref_ptr< WROIBox >( new WROIBox( minROIPos, maxROIPos ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( newRoi );
......@@ -985,7 +985,7 @@ void WMainWindow::newRoi()
else
{
osg::ref_ptr< WROIBox > newRoi = osg::ref_ptr< WROIBox >( new WROIBox( minROIPos, maxROIPos ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( newRoi, m_datasetBrowser->getFirstRoiInSelectedBranch()->getROI() );
WKernel::getRunningKernel()->getRoiManager()->addRoi( newRoi, m_controlPanel->getFirstRoiInSelectedBranch()->getROI() );
}
}
......
......@@ -42,7 +42,7 @@
#include "../../common/WProjectFileIO.h"
#include "../../kernel/WModule.h"
#include "controlPanel/WQtDatasetBrowser.h"
#include "controlPanel/WQtControlPanel.h"
#include "ribbonMenu/WQtRibbonMenu.h"
#include "WIconManager.h"
#include "WQtConfigWidget.h"
......@@ -75,9 +75,9 @@ public:
void setupGUI();
/**
* returns a pointer to the dataset browser object
* returns a pointer to the control panel object
*/
WQtDatasetBrowser* getDatasetBrowser();
WQtControlPanel* getControlPanel();
/**
* returns a pointer to the ribbon menu object
......@@ -310,7 +310,7 @@ private:
WQtPushButton* m_loadButton; //!< the load Data Button
WQtDatasetBrowser* m_datasetBrowser; //!< dataset browser
WQtControlPanel* m_controlPanel; //!< control panel
boost::shared_ptr<WQtGLWidget> m_mainGLWidget; //!< the main GL widget of the GUI
boost::shared_ptr< WQtNavGLWidget > m_navAxial; //!< the axial view widget GL widget of the GUI
......
......@@ -273,29 +273,29 @@ int WQt4Gui::run()
void WQt4Gui::slotUpdateTextureSorter()
{
// create a new event for this and insert it into event queue
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WUpdateTextureSorterEvent() );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WUpdateTextureSorterEvent() );
}
void WQt4Gui::slotAddDatasetOrModuleToBrowser( boost::shared_ptr< WModule > module )
{
// create a new event for this and insert it into event queue
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleAssocEvent( module ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleAssocEvent( module ) );
}
void WQt4Gui::slotAddRoiToBrowser( boost::shared_ptr< WRMROIRepresentation > roi )
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WRoiAssocEvent( roi ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WRoiAssocEvent( roi ) );
}
void WQt4Gui::slotRemoveRoiFromBrowser( boost::shared_ptr< WRMROIRepresentation > roi )
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WRoiRemoveEvent( roi ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WRoiRemoveEvent( roi ) );
}
void WQt4Gui::slotActivateDatasetOrModuleInBrowser( boost::shared_ptr< WModule > module )
{
// create a new event for this and insert it into event queue
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleReadyEvent( module ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleReadyEvent( module ) );
QCoreApplication::postEvent( m_mainWindow, new WModuleReadyEvent( module ) );
}
......@@ -312,7 +312,7 @@ void WQt4Gui::slotRemoveDatasetOrModuleInBrowser( boost::shared_ptr< WModule > m
m_mainWindow->setFibersLoaded( false );
}
}
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleRemovedEvent( module ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleRemovedEvent( module ) );
}
void WQt4Gui::slotConnectionEstablished( boost::shared_ptr<WModuleConnector> in, boost::shared_ptr<WModuleConnector> out )
......@@ -320,11 +320,11 @@ void WQt4Gui::slotConnectionEstablished( boost::shared_ptr<WModuleConnector> in,
// create a new event for this and insert it into event queue
if ( in->isInputConnector() )
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleConnectEvent( in, out ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleConnectEvent( in, out ) );
}
else
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleConnectEvent( out, in ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleConnectEvent( out, in ) );
}
}
......@@ -333,17 +333,17 @@ void WQt4Gui::slotConnectionClosed( boost::shared_ptr<WModuleConnector> in, boos
// create a new event for this and insert it into event queue
if ( in->isInputConnector() )
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleDisconnectEvent( in, out ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleDisconnectEvent( in, out ) );
}
else
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleDisconnectEvent( out, in ) );
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleDisconnectEvent( out, in ) );
}
}
boost::shared_ptr< WModule > WQt4Gui::getSelectedModule()
{
return m_mainWindow->getDatasetBrowser()->getSelectedModule();
return m_mainWindow->getControlPanel()->getSelectedModule();
}
boost::signals2::signal1< void, std::vector< std::string > >* WQt4Gui::getLoadButtonSignal()
......
......@@ -66,7 +66,7 @@ public:
virtual int run();
/**
* returns a pointer to the selected module in the dataset browser
* returns a pointer to the selected module in the control panel
*
* \return the module
*/
......
......@@ -280,12 +280,12 @@ void WQtConfigWidget::registerComponents()
ctbpos->setMax( 5 );
m_defaultProperties->addProperty( "qt4gui.hideMenuBar", "Hide the menu bar.", false, m_propCondition );
WPropInt dsbWidth = m_defaultProperties->addProperty( "qt4gui.dsbWidth", "The width of the dataset browser.", 250, m_propCondition );
WPropInt dsbWidth = m_defaultProperties->addProperty( "qt4gui.dsbWidth", "The width of the control panel.", 250, m_propCondition );
dsbWidth->setMin( 0 );
dsbWidth->setMax( 1000 );
m_defaultProperties->addProperty( "qt4gui.dsbInvisibleByDefault", "Hide the dataset browser on startup?", false, m_propCondition );
m_defaultProperties->addProperty( "qt4gui.dsbFloatingByDefault", "Undock the dataset browser on startup?", false, m_propCondition );
m_defaultProperties->addProperty( "qt4gui.dsbInvisibleByDefault", "Hide the control panel on startup?", false, m_propCondition );
m_defaultProperties->addProperty( "qt4gui.dsbFloatingByDefault", "Undock the control panel on startup?", false, m_propCondition );
WPropGroup moduleWhiteList = m_defaultProperties->addPropertyGroup( "modules.whiteListGroup", "moduleWhiteList" );
m_skipPropertyWrite.push_back( "modules.whiteListGroup" );
......@@ -1043,14 +1043,14 @@ WQtDSBWidget *WQtConfigWidget::createTabForSection( boost::shared_ptr< WProperti
tab->addProp( ( *iter )->toPropFilename() );
break;
case PV_SELECTION:
WLogger::getLogger()->addLogMessage( "This property type \"PV_SELECTION\" is not yet supported by the GUI.", "DatasetBrowser",
WLogger::getLogger()->addLogMessage( "This property type \"PV_SELECTION\" is not yet supported by the GUI.", "ControlPanel",
LL_WARNING );
break;
case PV_COLOR:
tab->addProp( ( *iter )->toPropColor() );
break;
case PV_POSITION:
WLogger::getLogger()->addLogMessage( "This property type \"PV_POSITION\" is not yet supported by the GUI.", "DatasetBrowser",
WLogger::getLogger()->addLogMessage( "This property type \"PV_POSITION\" is not yet supported by the GUI.", "ControlPanel",
LL_WARNING );
break;
case PV_TRIGGER:
......@@ -1060,7 +1060,7 @@ WQtDSBWidget *WQtConfigWidget::createTabForSection( boost::shared_ptr< WProperti
tab->addGroup( createTabForSection( ( *iter )->toPropGroup(), sectionName ), true );
break;
default:
WLogger::getLogger()->addLogMessage( "This property type is not yet supported.", "DatasetBrowser", LL_WARNING );
WLogger::getLogger()->addLogMessage( "This property type is not yet supported.", "ControlPanel", LL_WARNING );
break;
}
}
......
......@@ -54,10 +54,10 @@
#include "../WQt4Gui.h"
#include "../WQtCombinerActionList.h"
#include "WQtBranchTreeItem.h"
#include "WQtDatasetBrowser.h"
#include "WQtControlPanel.h"
#include "WQtTextureSorter.h"
WQtDatasetBrowser::WQtDatasetBrowser( WMainWindow* parent )
WQtControlPanel::WQtControlPanel( WMainWindow* parent )
: QDockWidget( "Control Panel", parent ),
m_ignoreSelectionChange( false )
{
......@@ -151,11 +151,11 @@ WQtDatasetBrowser::WQtDatasetBrowser( WMainWindow* parent )
connect( shortcut, SIGNAL( activated() ), this, SLOT( deleteROITreeItem() ) );
}
WQtDatasetBrowser::~WQtDatasetBrowser()
WQtControlPanel::~WQtControlPanel()
{
}
void WQtDatasetBrowser::connectSlots()
void WQtControlPanel::connectSlots()
{
connect( m_moduleTreeWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectTreeItem() ) );
// connect( m_moduleTreeWidget, SIGNAL( itemClicked( QTreeWidgetItem*, int ) ), this, SLOT( selectTreeItem() ) );
......@@ -170,12 +170,12 @@ void WQtDatasetBrowser::connectSlots()
this, SLOT( selectDataModule( boost::shared_ptr< WDataSet > ) ) );
}
void WQtDatasetBrowser::addToolbar( QToolBar* tb )
void WQtControlPanel::addToolbar( QToolBar* tb )
{
m_layout->insertWidget( 0, tb );
}
WQtSubjectTreeItem* WQtDatasetBrowser::addSubject( std::string name )
WQtSubjectTreeItem* WQtControlPanel::addSubject( std::string name )
{
WQtSubjectTreeItem* subject = new WQtSubjectTreeItem( m_moduleTreeWidget );
subject->setText( 0, QString::fromStdString( name ) );
......@@ -185,7 +185,7 @@ WQtSubjectTreeItem* WQtDatasetBrowser::addSubject( std::string name )
return subject;
}
bool WQtDatasetBrowser::event( QEvent* event )
bool WQtControlPanel::event( QEvent* event )
{
// a subject singals a newly registered data set
if ( event->type() == WQT_UPDATE_TEXTURE_SORTER_EVENT )
......@@ -199,7 +199,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
if ( e2 )
{
addRoi( e2->getRoi() );
WLogger::getLogger()->addLogMessage( "Inserting ROI to dataset browser.", "DatasetBrowser", LL_DEBUG );
WLogger::getLogger()->addLogMessage( "Inserting ROI to control panel.", "ControlPanel", LL_DEBUG );
}
return true;
......@@ -210,7 +210,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
if( e3 )
{
removeRoi( e3->getRoi() );
WLogger::getLogger()->addLogMessage( "Removing ROI from dataset browser.", "DatasetBrowser", LL_DEBUG );
WLogger::getLogger()->addLogMessage( "Removing ROI from control panel.", "ControlPanel", LL_DEBUG );
}
return true;
......@@ -223,8 +223,8 @@ bool WQtDatasetBrowser::event( QEvent* event )
WModuleAssocEvent* e1 = dynamic_cast< WModuleAssocEvent* >( event ); // NOLINT
if ( e1 )
{
WLogger::getLogger()->addLogMessage( "Inserting module " + e1->getModule()->getName() + " to dataset browser.",
"DatasetBrowser", LL_DEBUG );
WLogger::getLogger()->addLogMessage( "Inserting module " + e1->getModule()->getName() + " to control panel.",
"ControlPanel", LL_DEBUG );
// finally add the module
// TODO(schurade): is this differentiation between data and "normal" modules really needed?
......@@ -240,7 +240,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
return true;
}
// a module changed its state to "ready" -> activate it in dataset browser
// a module changed its state to "ready" -> activate it in control panel
if ( event->type() == WQT_READY_EVENT )
{
// convert event to assoc event
......@@ -249,13 +249,13 @@ bool WQtDatasetBrowser::event( QEvent* event )
{
// this should never happen, since the type is set to WQT_READY_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModueReadyEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
"ControlPanel", LL_WARNING );
return true;
}
WLogger::getLogger()->addLogMessage( "Activating module " + e->getModule()->getName() + " in dataset browser.",
"DatasetBrowser", LL_DEBUG );
WLogger::getLogger()->addLogMessage( "Activating module " + e->getModule()->getName() + " in control panel.",
"ControlPanel", LL_DEBUG );
// search all the item matching the module
std::list< WQtTreeItem* > items = findItemsByModule( e->getModule() );
......@@ -278,7 +278,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
{
// this should never happen, since the type is set to WQT_MODULE_CONNECT_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModuleConnectEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
"ControlPanel", LL_WARNING );
return true;
}
......@@ -320,7 +320,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
{
// this should never happen, since the type is set to WQT_MODULE_DISCONNECT_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModuleDisconnectEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
"ControlPanel", LL_WARNING );
return true;
}
......@@ -373,14 +373,14 @@ bool WQtDatasetBrowser::event( QEvent* event )
{
// this should never happen, since the type is set to WQT_MODULE_DELETE_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModuleDeleteEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
"ControlPanel", LL_WARNING );
return true;
}
// grab the module reference and print some info
boost::shared_ptr< WModule > module = e->getTreeItem()->getModule();
WLogger::getLogger()->addLogMessage( "Deleting module \"" + module->getName() + "\" from Tree.",
"DatasetBrowser", LL_DEBUG );
"ControlPanel", LL_DEBUG );
// remove it from the tree and free last ref count
m_moduleTreeWidget->deleteItem( e->getTreeItem() );
......@@ -389,7 +389,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
bool lastTreeItem = !findItemsByModule( module ).size();
if ( lastTreeItem && ( module.use_count() != 1 ) )
{
wlog::warn( "DatasetBrowser" ) << "Removed module has strange usage count: " << module.use_count() << ". Should be 1 here. " <<
wlog::warn( "ControlPanel" ) << "Removed module has strange usage count: " << module.use_count() << ". Should be 1 here. " <<
"Module reference is held by someone else.";
}
......@@ -404,7 +404,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
{
// this should never happen, since the type is set to WQT_MODULE_REMOVE_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModuleRemovedEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
"ControlPanel", LL_WARNING );
return true;
}
......@@ -416,12 +416,12 @@ bool WQtDatasetBrowser::event( QEvent* event )
}
// be nice and print some info
WLogger::getLogger()->addLogMessage( "Removing module \"" + e->getModule()->getName() + "\" from Tree.", "DatasetBrowser", LL_DEBUG );
WLogger::getLogger()->addLogMessage( "Removing module \"" + e->getModule()->getName() + "\" from Tree.", "ControlPanel", LL_DEBUG );
// stop the module
e->getModule()->requestStop();
WLogger::getLogger()->addLogMessage( "Waiting for module \"" + e->getModule()->getName() + "\" to finish before deleting.",
"DatasetBrowser", LL_DEBUG );
"ControlPanel", LL_DEBUG );
return true;
}
......@@ -429,7 +429,7 @@ bool WQtDatasetBrowser::event( QEvent* event )
return QDockWidget::event( event );
}
std::list< WQtTreeItem* > WQtDatasetBrowser::findItemsByModule( boost::shared_ptr< WModule > module, QTreeWidgetItem* where )
std::list< WQtTreeItem* > WQtControlPanel::findItemsByModule( boost::shared_ptr< WModule > module, QTreeWidgetItem* where )
{
std::list< WQtTreeItem* > l;
......@@ -462,12 +462,12 @@ std::list< WQtTreeItem* > WQtDatasetBrowser::findItemsByModule( boost::shared_pt
return l;
}
std::list< WQtTreeItem* > WQtDatasetBrowser::findItemsByModule( boost::shared_ptr< WModule > module )
std::list< WQtTreeItem* > WQtControlPanel::findItemsByModule( boost::shared_ptr< WModule > module )
{
return findItemsByModule( module, m_moduleTreeWidget->invisibleRootItem() );
}
WQtDatasetTreeItem* WQtDatasetBrowser::addDataset( boost::shared_ptr< WModule > module, int subjectId )
WQtDatasetTreeItem* WQtControlPanel::addDataset( boost::shared_ptr< WModule > module, int subjectId )
{
int c = getFirstSubject();
WQtSubjectTreeItem* subject = static_cast< WQtSubjectTreeItem* >( m_moduleTreeWidget->topLevelItem( subjectId + c ) );
......@@ -479,7 +479,7 @@ WQtDatasetTreeItem* WQtDatasetBrowser::addDataset( boost::shared_ptr< WModule >
return item;
}
WQtModuleTreeItem* WQtDatasetBrowser::addModule( boost::shared_ptr< WModule > module )
WQtModuleTreeItem* WQtControlPanel::addModule( boost::shared_ptr< WModule > module )
{
m_tiModules->setExpanded( true );
WQtModuleTreeItem* item;
......@@ -513,7 +513,7 @@ WQtModuleTreeItem* WQtDatasetBrowser::addModule( boost::shared_ptr< WModule > mo
return item;
}
void WQtDatasetBrowser::addRoi( boost::shared_ptr< WRMROIRepresentation > roi )
void WQtControlPanel::addRoi( boost::shared_ptr< WRMROIRepresentation > roi )
{
WQtRoiTreeItem* newItem;
WQtBranchTreeItem* branchItem;
......@@ -546,7 +546,7 @@ void WQtDatasetBrowser::addRoi( boost::shared_ptr< WRMROIRepresentation > roi )
WKernel::getRunningKernel()->getRoiManager()->setSelectedRoi( getSelectedRoi() );
}
void WQtDatasetBrowser::removeRoi( boost::shared_ptr< WRMROIRepresentation > roi )
void WQtControlPanel::removeRoi( boost::shared_ptr< WRMROIRepresentation > roi )
{
for( int branchID = 0; branchID < m_tiRois->childCount(); ++branchID )
{
......@@ -570,7 +570,7 @@ void WQtDatasetBrowser::removeRoi( boost::shared_ptr< WRMROIRepresentation > roi
WKernel::getRunningKernel()->getRoiManager()->setSelectedRoi( getSelectedRoi() );
}
boost::shared_ptr< WModule > WQtDatasetBrowser::getSelectedModule()
boost::shared_ptr< WModule > WQtControlPanel::getSelectedModule()
{
if ( m_moduleTreeWidget->selectedItems().at( 0 )->type() == 1 )
{
......@@ -584,7 +584,7 @@ boost::shared_ptr< WModule > WQtDatasetBrowser::getSelectedModule()
return boost::shared_ptr< WModule >();
}
void WQtDatasetBrowser::selectTreeItem()
void WQtControlPanel::selectTreeItem()
{
if ( m_ignoreSelectionChange )
{
......@@ -696,7 +696,7 @@ void WQtDatasetBrowser::selectTreeItem()
buildPropTab( props, infoProps );
}
void WQtDatasetBrowser::selectRoiTreeItem()
void WQtControlPanel::selectRoiTreeItem()
{
// TODO(schurade): qt doc says clear() doesn't delete tabs so this is possibly a memory leak
m_tabWidget->clear();
......@@ -731,7 +731,7 @@ void WQtDatasetBrowser::selectRoiTreeItem()
buildPropTab( props, boost::shared_ptr< WProperties >() );
}
void WQtDatasetBrowser::selectDataModule( boost::shared_ptr< WDataSet > dataSet )
void WQtControlPanel::selectDataModule( boost::shared_ptr< WDataSet > dataSet )
{
m_moduleTreeWidget->clearSelection();
......@@ -756,7 +756,7 @@ void WQtDatasetBrowser::selectDataModule( boost::shared_ptr< WDataSet > dataSet
selectTreeItem();
}
WQtDSBWidget* WQtDatasetBrowser::buildPropWidget( boost::shared_ptr< WProperties > props )
WQtDSBWidget* WQtControlPanel::buildPropWidget( boost::shared_ptr< WProperties > props )
{
WQtDSBWidget* tab = new WQtDSBWidget( props->getName() );
......@@ -805,7 +805,7 @@ WQtDSBWidget* WQtDatasetBrowser::buildPropWidget( boost::shared_ptr< WPropertie
tab->addGroup( buildPropWidget( ( *iter )->toPropGroup() ) );
break;
default:
WLogger::getLogger()->addLogMessage( "This property type is not yet supported.", "DatasetBrowser", LL_WARNING );
WLogger::getLogger()->addLogMessage( "This property type is not yet supported.", "ControlPanel", LL_WARNING );
break;
}
}
......@@ -816,7 +816,7 @@ WQtDSBWidget* WQtDatasetBrowser::buildPropWidget( boost::shared_ptr< WPropertie
return tab;
}
void WQtDatasetBrowser::buildPropTab( boost::shared_ptr< WProperties > props, boost::shared_ptr< WProperties > infoProps )
void WQtControlPanel::buildPropTab( boost::shared_ptr< WProperties > props, boost::shared_ptr< WProperties > infoProps )
{
WQtDSBWidget* tab = NULL;
WQtDSBWidget* infoTab = NULL;
......@@ -845,7 +845,7 @@ void WQtDatasetBrowser::buildPropTab( boost::shared_ptr< WProperties > props, bo
}
}
WQtCombinerToolbar* WQtDatasetBrowser::createCompatibleButtons( boost::shared_ptr< WModule >module )
WQtCombinerToolbar* WQtControlPanel::createCompatibleButtons( boost::shared_ptr< WModule >module )
{
// every module may have compatibles: create ribbon menu entry
// NOTE: if module is NULL, getCompatiblePrototypes returns the list of modules without input connector (nav slices and so on)
......@@ -881,7 +881,7 @@ WQtCombinerToolbar* WQtDatasetBrowser::createCompatibleButtons( boost::shared_pt
return new WQtCombinerToolbar( m_mainWindow, comps );
}
void WQtDatasetBrowser::changeTreeItem()
void WQtControlPanel::changeTreeItem()
{
if ( m_moduleTreeWidget->selectedItems().size() == 1 && m_moduleTreeWidget->selectedItems().at( 0 )->type() == DATASET )
{
......@@ -896,7 +896,7 @@ void WQtDatasetBrowser::changeTreeItem()
}
}
void WQtDatasetBrowser::changeRoiTreeItem()
void WQtControlPanel::changeRoiTreeItem()
{
if ( m_roiTreeWidget->selectedItems().size() == 1 && m_roiTreeWidget->selectedItems().at( 0 )->type() == ROI )
{
......@@ -905,7 +905,7 @@ void WQtDatasetBrowser::changeRoiTreeItem()
}
}
int WQtDatasetBrowser::addTabWidgetContent( WQtDSBWidget* content )
int WQtControlPanel::addTabWidgetContent( WQtDSBWidget* content )
{
if ( !content || content->isEmpty() )
{
......@@ -919,7 +919,7 @@ int WQtDatasetBrowser::addTabWidgetContent( WQtDSBWidget* content )
return m_tabWidget->addTab( sa, content->getName() );
}
int WQtDatasetBrowser::getFirstSubject()
int WQtControlPanel::getFirstSubject()
{
int c = 0;
for ( int i = 0; i < m_moduleTreeWidget->topLevelItemCount() ; ++i )
......@@ -933,7 +933,7 @@ int WQtDatasetBrowser::getFirstSubject()
return c;
}
boost::shared_ptr< WRMROIRepresentation > WQtDatasetBrowser::getSelectedRoi()
boost::shared_ptr< WRMROIRepresentation > WQtControlPanel::getSelectedRoi()
{
boost::shared_ptr< WRMROIRepresentation >roi;
if ( m_roiTreeWidget->selectedItems().count() == 0 )
......@@ -947,7 +947,7 @@ boost::shared_ptr< WRMROIRepresentation > WQtDatasetBrowser::getSelectedRoi()
return roi;
}
boost::shared_ptr< WRMROIRepresentation > WQtDatasetBrowser::getFirstRoiInSelectedBranch()
boost::shared_ptr< WRMROIRepresentation > WQtControlPanel::getFirstRoiInSelectedBranch()
{
boost::shared_ptr< WRMROIRepresentation >roi;
if ( m_roiTreeWidget->selectedItems().count() == 0 )
......@@ -970,7 +970,7 @@ boost::shared_ptr< WRMROIRepresentation > WQtDatasetBrowser::getFirstRoiInSelect
return roi;
}