From: vsr Date: Tue, 6 Aug 2013 10:04:55 +0000 (+0000) Subject: 0022256: [CEA 866] Add item "Developers" in menu "Help" X-Git-Tag: BR_hydro_v_0_3_1~91 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=acee55702f4af1c04e0211103a8155abe5a560af;p=modules%2Fgui.git 0022256: [CEA 866] Add item "Developers" in menu "Help" --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 889c6f2f3..5cb0200fc 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -491,14 +491,17 @@ void LightApp_Application::createActions() SUIT_Desktop* desk = desktop(); SUIT_ResourceMgr* resMgr = resourceMgr(); - //! Preferences + // Preferences createAction( PreferencesId, tr( "TOT_DESK_PREFERENCES" ), QIcon(), tr( "MEN_DESK_PREFERENCES" ), tr( "PRP_DESK_PREFERENCES" ), Qt::CTRL+Qt::Key_R, desk, false, this, SLOT( onPreferences() ) ); - //! Help for modules + // Help menu: + + // - Help for modules + int helpMenu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1, 1000 ); - createMenu( separator(), helpMenu, -1, 1 ); + createMenu( separator(), helpMenu, -1, 10 ); QStringList aModuleList; modules( aModuleList, false ); aModuleList.prepend( "GUI" ); @@ -506,8 +509,6 @@ void LightApp_Application::createActions() int id = LightApp_Application::UserID + FIRST_HELP_ID; - // help for other existing modules - QString aModule; foreach( aModule, aModuleList ) { if ( aModule.isEmpty() ) // module title (user name) @@ -573,6 +574,24 @@ void LightApp_Application::createActions() } } + // - Additional help items + + QStringList addHelpItems = resMgr->parameters( "add_help" ); + foreach ( QString addHelpItem, addHelpItems ) { + QString valueStr = resMgr->stringValue( "add_help", addHelpItem ); + printf("-----%s\n", qPrintable(valueStr)); + if ( !valueStr.isEmpty() && QFile::exists( valueStr ) ) { + QAction* a = createAction( id, addHelpItem, + resMgr->loadPixmap( "STD", tr( "ICON_HELP" ), false ), + addHelpItem, addHelpItem, + 0, desk, false, this, SLOT( onHelpContentsModule() ) ); + a->setData( valueStr ); + createMenu( a, helpMenu, -1, 5 ); + id++; + } + } + createMenu( separator(), helpMenu, -1, 5 ); + //! MRU static QtxMRUAction* mru = new QtxMRUAction( tr( "TOT_DESK_MRU" ), tr( "MEN_DESK_MRU" ), 0 ); connect( mru, SIGNAL( activated( const QString& ) ), this, SLOT( onMRUActivated( const QString& ) ) ); diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 5c85bbf9c..b9b52e650 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -242,4 +242,8 @@ +
+ + +