Commit 57212a3c by Sebastian Eichelbaum

[ADD] - network editor now provides context menu too.

parent 1d34c3e6
......@@ -105,6 +105,10 @@ void WMainWindow::setupGUI()
setWindowIcon( m_iconManager.getIcon( "logo" ) );
setWindowTitle( QApplication::translate( "MainWindow", "OpenWalnut (development version)", 0, QApplication::UnicodeUTF8 ) );
//network Editor
m_networkEditor = new WQtNetworkEditor( this );
m_networkEditor->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::RightDockWidgetArea, m_networkEditor );
// the control panel instance is needed for the menu
m_controlPanel = new WQtControlPanel( this );
......@@ -273,11 +277,6 @@ void WMainWindow::setupGUI()
m_navSagittal->getGLWidget()->setBgColor( bgColor );
}
}
//network Editor
m_networkEditor = new WQtNetworkEditor( this );
m_networkEditor->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::RightDockWidgetArea, m_networkEditor );
}
void WMainWindow::setupPermanentToolBar()
......
......@@ -108,6 +108,14 @@ WQtControlPanel::WQtControlPanel( WMainWindow* parent )
connect( m_deleteModuleAction, SIGNAL( triggered() ), this, SLOT( deleteModuleTreeItem() ) );
m_moduleTreeWidget->addAction( m_deleteModuleAction );
// the network editor also needs the context menu
// TODO(rfrohl): context menu gets not opened if a graphicitem is clicked. This should be fixed.
m_mainWindow->getNetworkEditor()->setContextMenuPolicy( Qt::ActionsContextMenu );
m_mainWindow->getNetworkEditor()->addAction( m_connectWithPrototypeAction );
m_mainWindow->getNetworkEditor()->addAction( m_connectWithModuleAction );
m_mainWindow->getNetworkEditor()->addAction( m_disconnectAction );
m_mainWindow->getNetworkEditor()->addAction( m_deleteModuleAction );
m_textureSorter = new WQtTextureSorter( this );
m_textureSorter->setToolTip( "Reorder the textures." );
......
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