Commit 2ff8517f authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[ADD] - network manager can now be en/disabled in ccmake. This is more...

[ADD] - network manager can now be en/disabled in ccmake. This is more comfortable. By default, it is off. I plan to permanently enable it for OW1.3
parent 78011788
......@@ -50,6 +50,16 @@ IF( NOT QT_QTWEBKIT_FOUND )
ADD_DEFINITIONS( "-DQT4GUI_NOWEBKIT" )
ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# GUI compilation options
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# compile network manager?
OPTION( OW_QT4GUI_NETWORKEDITOR "Enable this to get the experimental network manager compiled." OFF )
IF( OW_QT4GUI_NETWORKEDITOR )
ADD_DEFINITIONS( -DOW_QT4GUI_NETWORKEDITOR )
ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Add sources as target
# ---------------------------------------------------------------------------------------------------------------------------------------------------
......
......@@ -180,10 +180,11 @@ void WMainWindow::setupGUI()
setDockOptions( QMainWindow::AnimatedDocks | QMainWindow::AllowNestedDocks | QMainWindow::AllowTabbedDocks );
// Disabled Network Editor due to bug: #11
// //network Editor
// m_networkEditor = new WQtNetworkEditor( this );
// m_networkEditor->setFeatures( QDockWidget::AllDockWidgetFeatures );
#ifdef OW_QT4GUI_NETWORKEDITOR
//network Editor
m_networkEditor = new WQtNetworkEditor( this );
m_networkEditor->setFeatures( QDockWidget::AllDockWidgetFeatures );
#endif
// the control panel instance is needed for the menu
m_controlPanel = new WQtControlPanel( this );
......@@ -192,16 +193,21 @@ void WMainWindow::setupGUI()
// add all docks
addDockWidget( Qt::RightDockWidgetArea, m_controlPanel->getModuleDock() );
// Disabled Network Editor due to bug: #11
// addDockWidget( Qt::RightDockWidgetArea, m_networkEditor );
// tabifyDockWidget( m_networkEditor, m_controlPanel->getModuleDock() );
#ifdef OW_QT4GUI_NETWORKEDITOR
addDockWidget( Qt::RightDockWidgetArea, m_networkEditor );
#endif
addDockWidget( Qt::RightDockWidgetArea, m_controlPanel->getColormapperDock() );
addDockWidget( Qt::RightDockWidgetArea, m_controlPanel->getRoiDock() );
// tabify those panels by default
#ifdef OW_QT4GUI_NETWORKEDITOR
tabifyDockWidget( m_networkEditor, m_controlPanel->getModuleDock() );
#endif
tabifyDockWidget( m_controlPanel->getModuleDock(), m_controlPanel->getColormapperDock() );
tabifyDockWidget( m_controlPanel->getColormapperDock(), m_controlPanel->getRoiDock() );
// by default, the module editor should be in front
m_controlPanel->getModuleDock()->raise();
addDockWidget( Qt::RightDockWidgetArea, m_controlPanel );
......
......@@ -226,7 +226,9 @@ void WQt4Gui::slotAddDatasetOrModuleToTree( boost::shared_ptr< WModule > module
{
// create a new event for this and insert it into event queue
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleAssocEvent( module ) );
// QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleAssocEvent( module ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleAssocEvent( module ) );
#endif
}
void WQt4Gui::slotAddRoiToTree( osg::ref_ptr< WROI > roi )
......@@ -244,13 +246,17 @@ void WQt4Gui::slotActivateDatasetOrModuleInTree( boost::shared_ptr< WModule > mo
// create a new event for this and insert it into event queue
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleReadyEvent( module ) );
QCoreApplication::postEvent( m_mainWindow, new WModuleReadyEvent( module ) );
// QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleReadyEvent( module ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleReadyEvent( module ) );
#endif
}
void WQt4Gui::slotRemoveDatasetOrModuleInTree( boost::shared_ptr< WModule > module )
{
// create a new event for this and insert it into event queue
// QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleRemovedEvent( module ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleRemovedEvent( module ) );
#endif
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleRemovedEvent( module ) );
QCoreApplication::postEvent( m_mainWindow, new WModuleRemovedEvent( module ) );
}
......@@ -261,12 +267,16 @@ void WQt4Gui::slotConnectionEstablished( boost::shared_ptr<WModuleConnector> in,
if( in->isInputConnector() )
{
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleConnectEvent( in, out ) );
// QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleConnectEvent( in, out ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleConnectEvent( in, out ) );
#endif
}
else
{
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleConnectEvent( out, in ) );
// QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleConnectEvent( out, in ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleConnectEvent( out, in ) );
#endif
}
}
......@@ -275,12 +285,16 @@ 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->getNetworkEditor(), new WModuleDisconnectEvent( in, out ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleDisconnectEvent( in, out ) );
#endif
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleDisconnectEvent( in, out ) );
}
else
{
// QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleDisconnectEvent( out, in ) );
#ifdef OW_QT4GUI_NETWORKEDITOR
QCoreApplication::postEvent( m_mainWindow->getNetworkEditor(), new WModuleDisconnectEvent( out, in ) );
#endif
QCoreApplication::postEvent( m_mainWindow->getControlPanel(), new WModuleDisconnectEvent( out, in ) );
}
}
......
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