From: asl Date: Fri, 22 Sep 2006 06:11:09 +0000 (+0000) Subject: Menu item "File->Connect" and corresponding action now are accessible only in SalomeA... X-Git-Tag: V3_2_3pre1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0889577e080b24636d359c683927faa74b2a9b90;p=modules%2Fgui.git Menu item "File->Connect" and corresponding action now are accessible only in SalomeApp_Application --- diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 5a74b4785..68900f1aa 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -186,13 +186,6 @@ void STD_Application::createActions() tr( "MEN_DESK_HELP_ABOUT" ), tr( "PRP_DESK_HELP_ABOUT" ), SHIFT+Key_A, desk, false, this, SLOT( onHelpAbout() ) ); - //SRN: BugID IPAL9021, add an action "Load" - createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ), - resMgr->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ), - tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ), - CTRL+Key_L, desk, false, this, SLOT( onLoadDoc() ) ); - //SRN: BugID IPAL9021: End - QtxDockAction* da = new QtxDockAction( tr( "TOT_DOCK_WINDOWS" ), tr( "MEN_DOCK_WINDOWS" ), desk ); registerAction( ViewWindowsId, da ); da->setAutoPlace( false ); @@ -208,7 +201,6 @@ void STD_Application::createActions() createMenu( FileNewId, fileMenu, 0 ); createMenu( FileOpenId, fileMenu, 0 ); - createMenu( FileLoadId, fileMenu, 0 ); //SRN: BugID IPAL9021, add a menu item "Load" createMenu( FileCloseId, fileMenu, 0 ); createMenu( separator(), fileMenu, -1, 0 ); createMenu( FileSaveId, fileMenu, 0 ); @@ -322,11 +314,6 @@ bool STD_Application::onOpenDoc( const QString& aName ) return res; } -/*! called on loading the existent study */ -void STD_Application::onLoadDoc() -{ -} - /*! \retval true, if document was loaded successful, else false.*/ bool STD_Application::onLoadDoc( const QString& aName ) { diff --git a/src/STD/STD_Application.h b/src/STD/STD_Application.h index b6ca7fc08..4e766ca98 100755 --- a/src/STD/STD_Application.h +++ b/src/STD/STD_Application.h @@ -101,7 +101,6 @@ public slots: virtual void onOpenDoc(); virtual bool onOpenDoc( const QString& ); - virtual void onLoadDoc(); virtual bool onLoadDoc( const QString& ); virtual void onExit(); @@ -126,7 +125,7 @@ protected: MenuHelpId = 7 }; - enum { FileNewId, FileOpenId, FileLoadId, FileCloseId, + enum { FileNewId, FileOpenId, FileCloseId, FileSaveId, FileSaveAsId, FileExitId, ViewStatusBarId, ViewWindowsId, NewWindowId, EditCutId, EditCopyId, EditPasteId, diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 271125534..b2c5cfe89 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -148,12 +148,22 @@ void SalomeApp_Application::createActions() tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ), /*SHIFT+Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) ); + //SRN: BugID IPAL9021, add an action "Load" + createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ), + resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ), + tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ), + CTRL+Key_L, desk, false, this, SLOT( onLoadDoc() ) ); + //SRN: BugID IPAL9021: End + + int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 ); // "Save GUI State" command is renamed to "Save VISU State" and // creation of menu item is moved to VISU // createMenu( SaveGUIStateId, fileMenu, 10, -1 ); + createMenu( FileLoadId, fileMenu, 0 ); //SRN: BugID IPAL9021, add a menu item "Load" + createMenu( DumpStudyId, fileMenu, 10, -1 ); createMenu( separator(), fileMenu, -1, 15, -1 ); createMenu( LoadScriptId, fileMenu, 10, -1 ); diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index d9944623c..f4c8df810 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -69,7 +69,7 @@ class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application public: enum { MenuToolsId = 5 }; enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId, - CatalogGenId, RegDisplayId, SaveGUIStateId, UserID }; + CatalogGenId, RegDisplayId, SaveGUIStateId, FileLoadId, UserID }; public: SalomeApp_Application();