#include "STD_MDIDesktop.h"
+#include "STD_CloseDlg.h"
+
#include <SUIT_Tools.h>
#include <SUIT_Desktop.h>
#include <SUIT_Session.h>
#include <qfiledialog.h>
#include <qapplication.h>
+#include <iostream.h>
+
extern "C" STD_EXPORT SUIT_Application* createApplication()
{
return new STD_Application();
tr( "MEN_DESK_HELP_ABOUT" ), tr( "PRP_DESK_HELP_ABOUT" ),
0, 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 );
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 );
{
QString sName = activeStudy()->studyName().stripWhiteSpace();
QString msg = sName.isEmpty() ? tr( "INF_DOC_MODIFIED" ) : tr ( "INF_DOCUMENT_MODIFIED" ).arg( sName );
- int aAnswer = SUIT_MessageBox::warn3( desktop(), tr( "TOT_DESK_FILE_CLOSE" ), msg,
- tr( "BUT_YES" ), tr( "BUT_NO" ), tr( "BUT_CANCEL" ), 1, 2, 3, 1 );
- switch ( aAnswer )
+
+ //SRN: BugID: IPAL9021: Begin
+ STD_CloseDlg dlg(desktop());
+ switch( dlg.exec() )
{
case 1:
if ( activeStudy()->isSaved() )
case 2:
break;
case 3:
+ break;
+ case 4:
default:
return false;
}
+ //SRN: BugID: IPAL9021: End
}
}
return true;
protected:
enum { FileNewId, FileOpenId, FileCloseId, FileSaveId, FileSaveAsId,
FileExitId, EditCutId, EditCopyId, EditPasteId, ViewStatusBarId,
- NewWindowId, HelpAboutId, ViewWindowsId, UserID };
+ NewWindowId, HelpAboutId, ViewWindowsId, FileLoadId, UserID };
protected:
virtual void createActions();