From 2fcbc351c3a779225bb8106b2e7737a25b72f0a9 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 1 Jun 2005 08:04:16 +0000 Subject: [PATCH] Hot keys for new viewer creations --- src/SalomeApp/SalomeApp_Application.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 ); } -- 2.39.2