- QString site = tr ( "SALOME_SITE" );
- QAction* as = createAction( id, site,
- resMgr->loadPixmap( "LightApp", tr( "ICON_WWW" ), false ),
- site, site,
- 0, desk, false, this, SLOT( onHelpOnline() ) );
- as->setData( "salome-platform.org" );
- createMenu( as, helpMenu, -1, 0 );
- id++;
-
- QString forum = tr ( "SALOME_FORUM" );
-
- QAction* af = createAction( helpMenu, forum,
- resMgr->loadPixmap( "LightApp", tr( "ICON_WWW" ), false ),
- forum, forum,
- 0, desk, false, this, SLOT( onHelpOnline() ) );
- af->setData( "salome-platform.org/forum" );
- createMenu( af, helpMenu, -1, 0 );
- id++;
-
- createMenu( separator(), helpMenu, -1, 0 );
-
- // YouTube channel
- QString video = tr ( "SALOME_VIDEO_TUTORIALS" );
- QAction* av = createAction( helpMenu, video,
- resMgr->loadPixmap( "LightApp", tr( "ICON_LIFE_RIGN" ), false ),
- video, video,
- 0, desk, false, this, SLOT( onHelpOnline() ) );
- av->setData( "www.youtube.com/playlist?list=PLgvBxFyGVRbZZz4wVvP36xXQL-S81RZsc&disable_polymer=true" );
- createMenu( av, helpMenu, -1, 0 );
- id++;
-
+ // a) Link to web site
+ QString url = resMgr->stringValue("GUI", "site_url");
+ if ( !url.isEmpty() ) {
+ QString title = tr ( "SALOME_SITE" );
+ QAction* as = createAction( id, title,
+ resMgr->loadPixmap( "LightApp", tr( "ICON_WWW" ), false ),
+ title, title,
+ 0, desk, false, this, SLOT( onHelpOnline() ) );
+ as->setData( url );
+ createMenu( as, helpMenu, -1, 0 );
+ id++;
+ }
+
+ // b) Link to Forum
+ url = resMgr->stringValue("GUI", "forum_url");
+ if ( !url.isEmpty() ) {
+ QString title = tr ( "SALOME_FORUM" );
+ QAction* af = createAction( helpMenu, title,
+ resMgr->loadPixmap( "LightApp", tr( "ICON_WWW" ), false ),
+ title, title,
+ 0, desk, false, this, SLOT( onHelpOnline() ) );
+ af->setData( url );
+ createMenu( af, helpMenu, -1, 0 );
+ id++;
+ }
+
+ // c) Link to YouTube channel
+ url = resMgr->stringValue("GUI", "channel_url");
+ if ( !url.isEmpty() ) {
+ createMenu( separator(), helpMenu, -1, 0 );
+ QString title = tr ( "SALOME_VIDEO_TUTORIALS" );
+ QAction* av = createAction( helpMenu, title,
+ resMgr->loadPixmap( "LightApp", tr( "ICON_LIFE_RIGN" ), false ),
+ title, title,
+ 0, desk, false, this, SLOT( onHelpOnline() ) );
+ av->setData( url );
+ createMenu( av, helpMenu, -1, 0 );
+ id++;
+ }
+
+ // d) Help for modules
+
+ // - First create top-level menus to preserve correct order
+ QString userGuide = "User's Guide";
+ QString devGuide = "Developer's Guide";
+ createMenu( userGuide, helpMenu, -1, 5 );
+ createMenu( devGuide, helpMenu, -1, 5 );