From: stv Date: Wed, 1 Jun 2005 08:04:16 +0000 (+0000) Subject: Hot keys for new viewer creations X-Git-Tag: T3_0_0_a1~46 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2fcbc351c3a779225bb8106b2e7737a25b72f0a9;p=modules%2Fgui.git Hot keys for new viewer creations --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 7aa8d3d9d..4d72cb730 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -279,12 +279,18 @@ void SalomeApp_Application::createActions() int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 ); createMenu( separator(), windowMenu, -1, 1 ); + QMap accelMap; + accelMap[NewGLViewId] = ALT+Key_G; + accelMap[NewPlot2dId] = ALT+Key_P; + accelMap[NewOCCViewId] = ALT+Key_O; + accelMap[NewVTKViewId] = ALT+Key_K; + for ( int id = NewGLViewId; id <= NewVTKViewId; id++ ) { QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), QIconSet(), - tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), - tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), - 0, desk, false, this, SLOT( onNewWindow() ) ); + tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), + tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), + accelMap.contains( id ) ? accelMap[id] : 0, desk, false, this, SLOT( onNewWindow() ) ); createMenu( a, newWinMenu, -1 ); }