\image html view2.png
-\n SALOME GUI is based on SUIT (Salome User Interface
+\b SALOME \b GUI is based on SUIT (Salome User Interface
Toolkit) that proposes very flexible, powerful and safe mechanisms of
interaction with SALOME tool components (both CORBA and standalone),
resource management, viewers and selection handling,
-exception and signals processing. This approach brings to the top
-Salome multi-desktop dockable-windowed user interface.
-\n All Graphical User Interfaces of standard modules have plug-in
+exception and signals processing.
+
+All Graphical User Interfaces of standard modules have plug-in
structure, i.e. each module is placed in a dynamic library which is
loaded on demand. So, all modules add their own menu items, buttons
in toolbar, windows etc.
<ul>
<li>\b File menu corresponds to \subpage study_management_page "Study management" functionalities
-(creation, saving, loading, editing studies, etc.).</li>
+(creation, saving, loading, editing studies, connecting, disconnecting, etc.).</li>
<li>\b Edit menu gives access to <b> Copy/Paste</b> allowing to paste the
objects from one study into the other. The availability of this
functionality depends on the module and the nature of an operation or
\page salome_desktop_page SALOME desktop
-<b>Multi-Desktop Approach</b> used in Salome means that there is a separate Desktop
-for each Study and all windows connected to the same Study (viewers, dockable
-windows, etc.) are placed in one container.
-This approach positively differs from the classic multi document interface
-if many windows are used, i.e. when one document contains a lot of
-viewers, dialogs, etc. Each desktop also has its own menu and toolbar.
+SALOME applies <b>Single Document Interface</b> (SDI) approach. Only one
+\ref study_management_page "study (document)" can be opened at the moment.
-The main SALOME Desktop consists of the following sections and toolbars:
+The front-end of the application is represented as a single Desktop top-level window
+that embeds all GUI operations. Desktop window provides access to standard GUI elements
+like viewers, main menu, toolbars, dock windows, dialog boxes, etc.
-\image html desktop.png
+The main elements of the SALOME Desktop are represented on the picture below:
+\image html desktop.png
-<b>Basic parts of the SALOME Desktop:</b>
-<ul>
-<li><b>Main menu</b> - This is a set of context-sensitive menus, which will
+The main parts of the SALOME Desktop are:
+- <b>Main menu</b> - This is a set of context-sensitive menus, which will
be updated according to the functionality of the currently active component. In
-general, these menus contain all functional options of SALOME platform.</li>
-<li><b>Standard toolbar</b> - contains standard actions
+general, these menus contain all functional options of SALOME platform.
+- <b>Standard toolbar</b> - contains standard actions
that allow creating new or opening existing study, saving study, deleting
-objects etc.</li>
-<li><b>Components toolbar</b> - allows activating
-components in SALOME platform.</li>
-<li><b>Module toolbars</b> - contains actions specific to the
-currently active module.</li>
-<li><b>Viewer toolbar</b> - provides a set of tools destined for visualization
-of the presentations in the viewer.</li>
-</ul>
-
+objects etc.
+- <b>Components toolbar</b> - allows activating
+components in SALOME platform.
+- <b>Module toolbars</b> - contain actions specific to the
+currently active module.
+- <b>Viewer toolbar</b> - provides a set of tools destined for visualization
+of the presentations in the viewer.
All toolbars in the \b SALOME Platform are context-sensitive. Loading of a definite component
(Geometry, Mesh etc.) will automatically add some additional
By default all toolbars are located on top of the SALOME desktop, but you can relocate a toolbar by dragging it with the mouse and dropping in any place of the window.
-<b>Parts of the study window:</b>
-<ul>
-<li><b>Object browser</b> - Management of objects created or imported into
-SALOME application.</li>
-<li>\b Viewer - This window is destined for visualization of
-presentations.</li>
-<li><b>Python console</b> - Window for Python interpreter. This window
+Parts of the study window:
+- <b>Object browser</b> - Management of objects created or imported into
+SALOME application.
+- \b Viewer - This window is destined for visualization of
+presentations.
+- <b>Python console</b> - Window for Python interpreter. This window
functions like a standard document: the pop-up menu invoked by
right-click in this window gives access to
-<b>Copy/Paste/SelectAll/ClearAll</b> options.</li>
-</ul>
+<b>Copy/Paste/SelectAll/ClearAll</b> options.
Object Browser, Python Console, MenuBar, etc are, in fact, separate dockable windows.
Dockable windows can be placed in special areas, on the borders of
\image html viewmenu.png
-<ul>
-<li>\b Toolbars - allows to show and hide toolbars</li>
-<li>\b Windows - allows to show and hide dockable windows, such as
-Object Browser and Python Console</li>
-<li><b> Status Bar </b> allows showing and hiding the Status Bar.</li>
-<li>\ref themes_page "Theme" - allows to select and edit the style (colors and fonts) for Salome session.</li>
-</ul>
+- \b Toolbars - allows to show and hide toolbars.
+- \b Windows - allows to show and hide dockable windows, such as
+Object Browser and Python Console.
+- <b> Status Bar </b> allows showing and hiding the Status Bar.
+- \ref themes_page "Theme" - allows to select and edit the style (colors and fonts) for Salome session.
If there are several viewer windows in your current study and you want to display more then one at the same time, you can use the functionalities provided by the \b Window menu.
\image html windowmenu.png
-<ul>
-<li><b>New window </b> - allows to open a new instance of any viewer.</li>
-<li><b>Close</b> - closes the currently active viewer window.</li>
-<li><b>Close all</b> - closes all viewer windows.</li>
-<li><b>Group all</b> - arranges all created viewer windows on the same desktop</li>
-<li><b>Arrange Views</b> - allows choosing the necessary views and their layout.
+- <b>New window </b> - allows to open a new instance of any viewer.
+- <b>Close</b> - closes the currently active viewer window.
+- <b>Close all</b> - closes all viewer windows.
+- <b>Group all</b> - arranges all created viewer windows on the same desktop.
+- <b>Arrange Views</b> - allows choosing the necessary views and their layout (see image below).
+ - The radio-buttons in <b>Views Layout</b> section allow choosing the number of views to be arranged (2, 3 or 4). The buttons with images allow choosing the view layout (depending on the chosen number of views).
+ - <b>Views List</b> contains the list of opened view windows, where it is possible to check in the necessary views.
+ - <b>Close the remaining views</b> check-box allows closing all non-selected views.
+ - <b>Stack the remaining views</b> check-box allows stacking all non-selected views in the last tab area.
\image html arrange_views_dlg.png
-- The radio-buttons in <b>Views Layout</b> section allow choosing the number of views to be arranged (2, 3 or 4). The buttons with images allow choosing the view layout (depending on the chosen number of views).
-- <b>Views List</b> contains the list of opened view windows, where it is possible to check in the necessary views.
-- <b>Close the remaining views</b> check-box allows closing all non-selected views.
-- <b>Stack the remaining views</b> check-box allows stacking all non-selected views in the last tab area.
-
-<li><b>Split Vertically</b> and <b>Split Horizontally</b> allow splitting
-the representation area into two parts, in horizontal or vertical direction.</li>
-<li>List of all opened viewer windows provides fast access to them.</li>
-<li>\b Rename - allows renaming the currently selected viewer window. </li>
-</ul>
-
-
+- <b>Split Vertically</b> and <b>Split Horizontally</b> allow splitting
+the representation area into two parts, in horizontal or vertical direction.
+- List of all opened viewer windows provides fast access to them.
+- \b Rename - allows renaming the currently selected viewer window.
*/
\page study_management_page Study management
-Study is a document within GUI, where you can carry out all
+Study is a document within application, where you can carry out all
operations provided by the SALOME functionality.
This is a certain abstraction layer between actual
document data (probably, remote data available through CORBA) and data
presentation (in the Object Browser). The study is composed of Data
-Object instances, united in a tree-like structure.
+Object instances, combined into a tree-like structure.
-All operations with studies are available from the \b File menu.
+All operations with study are available from the \b File menu.
-\image html studymanagement.png
+\note SALOME is a single-study application. It means that only one study
+can be opened at the moment.
-\b New - creates a new study. The study will be created
-with default name \b Study1. It is possible to create
-several studies, each accessible from the task bar.
+Immediately after application start-up there is (normally) no active study.
+However, you have access to the embedded Python console, that can be used to initialize
+the study by means of Python API (see documentation on SALOME KERNEL module for more details).
-\b Open - allows to open an existing study by browsing for it in a
-standard Search File dialog box, choosing the required
-*.hdf file and clicking \b Open button.
+The following operations are available from the \b File menu:
-\b Reopen - reloads the current study from the *.hdf file. This menu command
-can be used to reverse the study to the latest saved state.
+\image html menu_file.png
-\b Connect - allows to open an unloaded study.
-\image html loadstudy2.png
-Select one of the studies, which has been previously
-created and unloaded and click \b Ok button.
+As soon as study is created, loaded from the file or from the data server,
+some additional operations become available from the \b File menu:
-\note SALOME is a multi-study platform. It means that simultaneously you can
-work with several studies.
-
-\b Close - closes the current study, alternatively it is
-possible to click on the cross in the upper right corner of the study window.
+\image html studymanagement.png
-\note If the study has not been previously saved, this option will
-call the following dialog box with several options:
+\b New - creates a new study. The study will be created
+with default name \b Study1. If there is already opened study,
+you will be asked to close it before creating new one.
-\image html closestudy.png
+\b Open - allows to open an existing study by browsing for it in a
+standard Open File dialog box, choosing the required
+*.hdf file and clicking \a Open button.
+If there is already opened study, you will be asked to close it
+before opening new one.
-Here, \b Unload option unloads the current study from the SALOME
-Desktop. It can be reloaded in the same working session, but if you quit the SALOME application, all changes
-in the unloaded study will be lost.
+\b Reopen - reloads the current study from the associated *.hdf file.
+This menu command can be used to reverse the study to the latest saved state.
\b Save - saves the current study. Saving a study you also save its layout, i.e. all positions and sizes
of dockable windows. It means that the difference in settings of the
will be displayed when this module is active.
\note If the study hasn't been previously saved, \b Save will
-call the standard Search File dialog box where you can enter the name
+call the standard Save File dialog box where you can enter the name
for your study and save it.
-\b Save \b as - allows to save the current study with a new name. Input a new name for the study in the standard
-Search File dialog box and click \b Save button.
+\b Save \b as - allows to save the current study with a new name.
+Input a new name for the study in the standard
+Search File dialog box and click \a Save button.
+
+\b Close - closes the current study; alternatively closing of the study
+can be done by clicking on the cross in the upper right corner of the desktop window.
+
+\note If the study has not been previously saved, you will be prompted
+by the following dialog box with several options:
+
+\image html closestudy.png
+
+\b Connect - allows to open an unloaded or created outside GUI study.
+
+\note Connect is available only if there is an opened study on the data server.
+
+\b Disconnect - unloads the current study from the desktop. The study stays opened
+in the data server; it can be then reloaded in the same working session
+(\b Connect operation), but if you quit SALOME application, all changes in the
+unloaded study can be lost.
+
+\note If the study has not been previously saved, you will be prompted
+by the following dialog box with several options:
+
+\image html disconnect_study.png
<b>Dump study</b> - allows to Dump a SALOME Study in one or several
Python scripts. The following dialog box allows to browse for the location and
saved in the Python file.
</li>
</ul>
-To confirm your choice click \b Save.
+To confirm your choice click \a Save.
<b>Load Script</b> - allows to load a saved Python Script.
\image html loadscript.png
-To confirm your choice click \b Open.
+To confirm your choice click \a Open.
<b>Properties</b> - allows to show/edit the properties of the current study.
updateWindows();
updateViewManagers();
+ updateCommandsStatus();
putInfo( "" );
desktop()->statusBar()->showMessage( "" );
*/
void LightApp_Application::onNewDoc()
{
- //asl: fix for 0020515
- if ( activeStudy() ) {
- saveDockWindowsState();
- }
-
#ifdef SINGLE_DESKTOP
if ( !checkExistingDoc() )
return;
#endif
+ //asl: fix for 0020515
+ saveDockWindowsState();
+
CAM_Application::onNewDoc();
}
void LightApp_Application::onOpenDoc()
{
SUIT_Study* study = activeStudy();
- saveDockWindowsState();
#ifdef SINGLE_DESKTOP
if ( !checkExistingDoc() )
if ( !checkExistingDoc() )
return false;
#endif
+
+ saveDockWindowsState();
+
// We should take mru action first because this application instance can be deleted later.
QtxMRUAction* mru = ::qobject_cast<QtxMRUAction*>( action( MRUId ) );
if ( objectBrowser() )
objectBrowser()->openLevels();
+
+#ifndef DISABLE_PYCONSOLE
+ if( pythonConsole() )
+ pythonConsole()->getInterp()->initStudy();
+#endif
}
/*!
if ( objectBrowser() )
objectBrowser()->openLevels();
+#ifndef DISABLE_PYCONSOLE
+ if( pythonConsole() )
+ pythonConsole()->getInterp()->initStudy();
+#endif
+
emit studyOpened();
}
/*!Remove all windows from study.*/
void LightApp_Application::beforeCloseDoc( SUIT_Study* s )
{
+ saveDockWindowsState();
+
if ( SUIT_DataBrowser* ob = objectBrowser() )
ob->setModel(0);
*/
void LightApp_Application::defaultWindows( QMap<int, int>& aMap ) const
{
- aMap.insert( WT_ObjectBrowser, Qt::LeftDockWidgetArea );
#ifndef DISABLE_PYCONSOLE
aMap.insert( WT_PyConsole, Qt::BottomDockWidgetArea );
#endif
- // aMap.insert( WT_LogWindow, Qt::DockBottom );
+ if ( activeStudy() ) {
+ aMap.insert( WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+ // aMap.insert( WT_LogWindow, Qt::DockBottom );
+ }
}
/*!Default view managers*/
void LightApp_Application::currentWindows( QMap<int, int>& winMap ) const
{
winMap.clear();
- if ( !activeStudy() )
- return;
-
if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
((LightApp_Module*)activeModule())->windows( winMap );
else
QMap<int, int> winMap;
currentWindows( winMap );
- if ( activeStudy() )
+ for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it )
{
- for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it )
- {
- if ( !dockWindow( it.key() ) )
- getWindow( it.key() );
- }
+ if ( !dockWindow( it.key() ) )
+ getWindow( it.key() );
}
for ( WinMap::ConstIterator it = myWin.begin(); it != myWin.end(); ++it )
{
QWidget* wid = it.value();
- if ( activeStudy() )
- wid->setVisible( winMap.contains( it.key() ) );
+ if ( winMap.contains( it.key() ) )
+ wid->setVisible( true );
else
delete wid;
}
- if ( activeStudy() )
- loadDockWindowsState();
- else
- myWin.clear();
+ loadDockWindowsState();
}
/*!
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
bool storeWin = aResMgr->booleanValue( "Study", "store_positions", true );
bool storeTb = aResMgr->booleanValue( "Study", "store_tool_positions", true );
- long version = Qtx::versionToId( aResMgr->stringValue( "salome", "version", "" ) );
QString modName;
if ( activeModule() )
modName = activeModule()->name();
+ else if ( activeStudy() )
+ modName = "nomodule";
QtxResourceMgr::WorkingMode prevMode = aResMgr->workingMode();
- aResMgr->setWorkingMode(QtxResourceMgr::IgnoreUserValues);
+ aResMgr->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
QByteArray aDefaultState;
- aResMgr->value("windows_geometry", modName , aDefaultState );
+ aResMgr->value( "windows_geometry", modName, aDefaultState );
QByteArray aDefaultVisibility;
- aResMgr->value("windows_visibility", modName , aDefaultVisibility );
+ aResMgr->value( "windows_visibility", modName, aDefaultVisibility );
bool hasDefaultVisibility = !aDefaultVisibility.isEmpty();
aResMgr->setWorkingMode(prevMode);
return;
if ( aResMgr->hasValue("windows_geometry" ,modName ) ) {
+ long version = Qtx::versionToId( aResMgr->stringValue( "windows_geometry_version", modName, "" ) );
QByteArray arr;
if ( version > Qtx::versionToId( "7.4.1" ) )
aResMgr->value( "windows_geometry", modName , arr );
QString modName;
if ( activeModule() )
modName = activeModule()->name();
+ else if ( activeStudy() )
+ modName = "nomodule";
+
+ QString versionId = GUI_VERSION_STR;
+#if GUI_DEVELOPMENT > 0
+ versionId += "dev";
+#endif
QByteArray arr = desktop()->saveState();
resourceMgr()->setValue( "windows_geometry", modName, processState(arr, storeWin, storeTb, false) );
+ resourceMgr()->setValue( "windows_geometry_version", modName, versionId );
QByteArray visArr;
if ( myWinVis.contains( modName ) )
/*!
Check existing document.
*/
-bool LightApp_Application::checkExistingDoc() {
- return true;
+bool LightApp_Application::checkExistingDoc()
+{
+ bool result = true;
+ if( activeStudy() ) {
+ int answer = SUIT_MessageBox::question( desktop(),
+ tr( "APPCLOSE_CAPTION" ),
+ tr( "STUDYCLOSE_DESCRIPTION" ),
+ tr( "APPCLOSE_SAVE" ),
+ tr( "APPCLOSE_CLOSE" ),
+ tr( "APPCLOSE_CANCEL" ), 0 );
+ if(answer == 0) {
+ if ( activeStudy()->isSaved() ) {
+ onSaveDoc();
+ closeDoc( false );
+ } else if ( onSaveAsDoc() ) {
+ if( !closeDoc( false ) ) {
+ result = false;
+ }
+ } else {
+ result = false;
+ }
+ }
+ else if( answer == 1 ) {
+ closeDoc( false );
+ } else if( answer == 2 ) {
+ result = false;
+ }
+ }
+ return result;
}
<parameter name="Developer resources" value="${DOCUMENTATION_ROOT_DIR}/index.html" />
</section>
<section name="windows_geometry">
- <parameter name="" value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #8D #FC #02 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #37 #00 #00 #02 #8D #00 #00 #00 #53 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #8D #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" />
+ <parameter name="nomodule" value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #8D #FC #02 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #37 #00 #00 #02 #8D #00 #00 #00 #53 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #8D #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" />
+ <parameter name="" value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #8D #FC #02 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #37 #00 #00 #02 #8D #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #74 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #05 #40 #00 #00 #02 #6C #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" />
</section>
<section name="windows_visibility">
- <parameter name="" value="#00 #00 #00 #00 #04 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #05 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01"/>
+ <parameter name="nomodule" value="#00 #00 #00 #00 #04 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #05 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" />
+ <parameter name="" value="#00 #00 #00 #00 #04 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #05 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" />
</section>
</document>
<source>ENTRY_COLUMN</source>
<translation>Entry</translation>
</message>
+ <message>
+ <source>APPCLOSE_CAPTION</source>
+ <translation>Close active study</translation>
+ </message>
+ <message>
+ <source>STUDYCLOSE_DESCRIPTION</source>
+ <translation>You already have an active study in your session. It has to be closed before working with another study.</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_SAVE</source>
+ <translation>&Save && Close</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_CLOSE</source>
+ <translation>&Close w/o saving</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_CANCEL</source>
+ <translation>&Cancel</translation>
+ </message>
</context>
<context>
<name>LightApp_Application</name>
<source>ENTRY_COLUMN</source>
<translation>Entrée</translation>
</message>
+ <message>
+ <source>APPCLOSE_CAPTION</source>
+ <translation>Fermer l'étude actuelle</translation>
+ </message>
+ <message>
+ <source>STUDYCLOSE_DESCRIPTION</source>
+ <translation type="unfinished">You already have an active study in your session. It has to be closed before working with another study.</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_SAVE</source>
+ <translation>&Sauvegarder && Fermer</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_CLOSE</source>
+ <translation>&Fermer sans sauvegarder</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_CANCEL</source>
+ <translation>&Annuler</translation>
+ </message>
</context>
<context>
<name>LightApp_Application</name>
<source>ENTRY_COLUMN</source>
<translation>エントリ</translation>
</message>
+ <message>
+ <source>APPCLOSE_CAPTION</source>
+ <translation>現在のスタディを閉じる</translation>
+ </message>
+ <message>
+ <source>STUDYCLOSE_DESCRIPTION</source>
+ <translation type="unfinished">You already have an active study in your
+session. It has to be closed before working with another study.</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_SAVE</source>
+ <translation>保存して閉じる(&S)</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_CLOSE</source>
+ <translation>保存せずに閉じる(&C)</translation>
+ </message>
+ <message>
+ <source>APPCLOSE_CANCEL</source>
+ <translation>キャンセル(&C)</translation>
+ </message>
</context>
<context>
<name>LightApp_Application</name>
void destroy();
virtual int run(const char *command);
+ virtual void initStudy(){};
// [ABN] - the PyLockWrapper is no more attached to the interpreter
// PyLockWrapper GetLockWrapper() const;
createMenu( FileNewId, fileMenu, 0 );
createMenu( FileOpenId, fileMenu, 0 );
createMenu( FileReopenId, fileMenu, 0 );
- createMenu( FileCloseId, fileMenu, 5 );
- createMenu( separator(), fileMenu, -1, 5 );
createMenu( FileSaveId, fileMenu, 5 );
createMenu( FileSaveAsId, fileMenu, 5 );
+ createMenu( FileCloseId, fileMenu, 5 );
createMenu( separator(), fileMenu, -1, 5 );
createMenu( separator(), fileMenu );
if ( ask && !isPossibleToClose( closePermanently ) )
return false;
+ return closeActiveDoc( closePermanently );
+}
+
+/*!Close document.*/
+bool STD_Application::closeActiveDoc( bool permanently )
+{
SUIT_Study* study = activeStudy();
beforeCloseDoc( study );
if ( study )
- study->closeDocument( closePermanently );
+ study->closeDocument( permanently );
clearViewManagers();
virtual int closeChoice( const QString& );
virtual bool closeAction( const int, bool& );
virtual bool closeDoc( bool ask = true );
+ virtual bool closeActiveDoc( bool permanently = true );
private:
ViewManagerList myViewMgrs;
<source>TOT_DESK_FILE_EXIT</source>
<translation>Exit from application</translation>
</message>
- <message>
- <source>TOT_DESK_FILE_LOAD</source>
- <translation>Load document</translation>
- </message>
<message>
<source>TOT_DESK_FILE_OPEN</source>
<translation>Open document</translation>
<source>PRP_DESK_FILE_SAVE</source>
<translation>Saves the active document</translation>
</message>
- <message>
- <source>PRP_DESK_FILE_LOAD</source>
- <translation>Loads a document</translation>
- </message>
<message>
<source>PRP_DESK_WINDOW_HTILE</source>
<translation>Arranges the windows as nonoverlapping horizontal tiles</translation>
<source>MEN_DESK_FILE_REOPEN</source>
<translation>Reopen</translation>
</message>
- <message>
- <source>MEN_DESK_FILE_LOAD</source>
- <translation>Conn&ect...</translation>
- </message>
<message>
<source>MEN_DESK_FILE_SAVE</source>
<translation>&Save</translation>
<source>TOT_DESK_FILE_EXIT</source>
<translation>Quitter l'application</translation>
</message>
- <message>
- <source>TOT_DESK_FILE_LOAD</source>
- <translation>Charger le document</translation>
- </message>
<message>
<source>TOT_DESK_FILE_OPEN</source>
<translation>Ouvrir un document</translation>
<source>PRP_DESK_FILE_SAVE</source>
<translation>Sauvegarder le document actuel</translation>
</message>
- <message>
- <source>PRP_DESK_FILE_LOAD</source>
- <translation>Charge un document</translation>
- </message>
<message>
<source>PRP_DESK_WINDOW_HTILE</source>
<translation>Ranger les fenêtres en mosaïque horizontale</translation>
<source>MEN_DESK_FILE_REOPEN</source>
<translation>&Réouvrir</translation>
</message>
- <message>
- <source>MEN_DESK_FILE_LOAD</source>
- <translation>Connec&ter...</translation>
- </message>
<message>
<source>MEN_DESK_FILE_SAVE</source>
<translation>&Enregistrer</translation>
<source>TOT_DESK_FILE_EXIT</source>
<translation>アプリケーションを終了</translation>
</message>
- <message>
- <source>TOT_DESK_FILE_LOAD</source>
- <translation>ドキュメントを読み込む</translation>
- </message>
<message>
<source>TOT_DESK_FILE_OPEN</source>
<translation>文書を開く</translation>
<source>PRP_DESK_FILE_SAVE</source>
<translation>現在のドキュメントを保存</translation>
</message>
- <message>
- <source>PRP_DESK_FILE_LOAD</source>
- <translation>ドキュメントを読み込み</translation>
- </message>
<message>
<source>PRP_DESK_WINDOW_HTILE</source>
<translation>ウィンドウを左右に並べて表示</translation>
<source>MEN_DESK_FILE_REOPEN</source>
<translation>再読み込み</translation>
</message>
- <message>
- <source>MEN_DESK_FILE_LOAD</source>
- <translation>接続...(&e)</translation>
- </message>
<message>
<source>MEN_DESK_FILE_SAVE</source>
<translation>保存(&S)</translation>
SalomeApp_Application::SalomeApp_Application()
: LightApp_Application()
{
- connect( desktop(), SIGNAL( message( const QString& ) ),
- this, SLOT( onLoadDocMessage( const QString& ) ), Qt::UniqueConnection );
myIsSiman = false; // default
}
tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ),
/*Qt::SHIFT+Qt::Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) );
- //rnv commented : implementation of the mono-study in GUI
- //
- //createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ),
- // resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ),
- // tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ),
- // Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+ createAction( ConnectId, tr( "TOT_DESK_CONNECT_STUDY" ), QIcon(),
+ tr( "MEN_DESK_CONNECT" ), tr( "PRP_DESK_CONNECT" ),
+ Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+
+ createAction( DisconnectId, tr( "TOT_DESK_DISCONNECT_STUDY" ), QIcon(),
+ tr( "MEN_DESK_DISCONNECT" ), tr( "PRP_DESK_DISCONNECT" ),
+ Qt::CTRL+Qt::Key_U, desk, false, this, SLOT( onUnloadDoc() ) );
#ifdef WITH_SIMANIO
// creation of menu item is moved to VISU
// createMenu( SaveGUIStateId, fileMenu, 10, -1 );
- // createMenu( FileLoadId, fileMenu, 0 );
+ createMenu( ConnectId, fileMenu, 5 );
+ createMenu( DisconnectId, fileMenu, 5 );
+ createMenu( separator(), fileMenu, -1, 5 );
#ifdef WITH_SIMANIO
if (myIsSiman) {
}
#endif
createMenu( DumpStudyId, fileMenu, 10, -1 );
- createMenu( separator(), fileMenu, -1, 10, -1 );
createMenu( LoadScriptId, fileMenu, 10, -1 );
createMenu( separator(), fileMenu, -1, 10, -1 );
createMenu( PropertiesId, fileMenu, 10, -1 );
}
-
-/*!Set desktop:*/
-void SalomeApp_Application::setDesktop( SUIT_Desktop* desk )
-{
- LightApp_Application::setDesktop( desk );
-
- if ( desk ) {
- connect( desk, SIGNAL( message( const QString& ) ),
- this, SLOT( onLoadDocMessage( const QString& ) ), Qt::UniqueConnection );
- }
-}
-
/*!
\brief Close application.
*/
}
}
+/*!SLOT. Unload document.*/
+void SalomeApp_Application::onUnloadDoc( bool ask )
+{
+ if ( ask ) {
+ activeStudy()->abortAllOperations();
+ if ( activeStudy()->isModified() ) {
+ QString docName = activeStudy()->studyName().trimmed();
+ int answer = SUIT_MessageBox::question( desktop(), tr( "DISCONNECT_CAPTION" ),
+ tr( "DISCONNECT_DESCRIPTION" ),
+ tr( "DISCONNECT_SAVE" ),
+ tr( "DISCONNECT_WO_SAVE" ),
+ tr( "APPCLOSE_CANCEL" ), 0 );
+ if ( answer == 0 ) { // save before unload
+ if ( activeStudy()->isSaved() )
+ onSaveDoc();
+ else if ( !onSaveAsDoc() )
+ return;
+ }
+ else if ( answer == 2 ) // Cancel
+ return;
+ }
+ }
+ closeActiveDoc( false );
+}
+
/*!SLOT. Create new study and load script*/
void SalomeApp_Application::onNewWithScript()
{
return res;
}
-/*!SLOT. Load document with a name, specified in \a aMessage.*/
-void SalomeApp_Application::onLoadDocMessage(const QString& aMessage)
+/*!SLOT. Parse message for desktop.*/
+void SalomeApp_Application::onDesktopMessage( const QString& message )
{
- if (aMessage.indexOf("simanCheckoutDone ") == 0) {
+ if (message.indexOf("simanCheckoutDone ") == 0) {
#ifdef WITH_SIMANIO
- onLoadDoc(aMessage.section(' ', 1));
+ // Load document with a name, specified in aMessage.
+ onLoadDoc(message.section(' ', 1));
#else
printf( "****************************************************************\n" );
printf( "* Warning: SALOME is built without SIMAN support.\n" );
printf( "****************************************************************\n" );
#endif
}
+ else if (message.indexOf("studyCreated:") == 0) {
+ // Enable 'Connect' action
+ updateCommandsStatus();
+ }
+ else if (message.indexOf("studyClosed:") == 0) {
+ /* message also contains ID of the closed study,
+ but as soon as SALOME is mono-study application for the moment,
+ this ID is not needed now.*/
+ //long aStudyId = message.section(':', 1).toLong();
+ // Disconnect GUI from active study, because it was closed on DS side.
+ closeActiveDoc( false );
+ // Disable 'Connect' action
+ QAction* a = action( ConnectId );
+ if ( a )
+ a->setEnabled( false );
+ }
+ LightApp_Application::onDesktopMessage( message );
}
/*!SLOT. Copy objects to study maneger from selection maneger..*/
}
}
-
LightApp_Application::onCloseDoc( ask );
}
// Load script menu
a = action( LoadScriptId );
- if ( a )
- a->setEnabled( activeStudy() );
+ if( a )
+ a->setEnabled( pythonConsole() );
// Properties menu
a = action( PropertiesId );
if( a )
a->setEnabled( activeStudy() );
+ // Connect study menu
+ a = action( ConnectId );
+ if( a )
+ a->setEnabled( !activeStudy() && studyMgr()->GetOpenStudies().size() > 0 );
+
+ // Disconnect study menu
+ a = action( DisconnectId );
+ if( a )
+ a->setEnabled( activeStudy() );
+
// update state of Copy/Paste menu items
onSelectionChanged();
}
void SalomeApp_Application::onLoadScript( )
{
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( !appStudy ) return;
- _PTR(Study) aStudy = appStudy->studyDS();
-
- if ( aStudy->GetProperties()->IsLocked() ) {
- SUIT_MessageBox::warning( desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED") );
- return;
+ if ( appStudy ) {
+ _PTR(Study) aStudy = appStudy->studyDS();
+ if ( aStudy->GetProperties()->IsLocked() ) {
+ SUIT_MessageBox::warning( desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED") );
+ return;
+ }
}
QStringList filtersList;
{
QMap<int, QString> opmap = LightApp_Application::activateModuleActions();
- // rnv commented : implementation of the mono-study in GUI
- // opmap.insert( LoadStudyId, tr( "ACTIVATE_MODULE_OP_LOAD" ) );
+ opmap.insert( LoadStudyId, tr( "ACTIVATE_MODULE_OP_LOAD" ) );
opmap.insert( NewAndScriptId, tr( "ACTIVATE_MODULE_OP_SCRIPT" ) );
return opmap;
/*
Asks to close existing document.
*/
-bool SalomeApp_Application::checkExistingDoc() {
- bool result = true;
- if( activeStudy() ) {
- int answer = SUIT_MessageBox::question( desktop(),
- tr( "APPCLOSE_CAPTION" ),
- tr( "STUDYCLOSE_DESCRIPTION" ),
- tr( "APPCLOSE_SAVE" ),
- tr( "APPCLOSE_CLOSE" ),
- tr( "APPCLOSE_CANCEL" ), 0 );
- if(answer == 0) {
- if ( activeStudy()->isSaved() ) {
- onSaveDoc();
- closeDoc( false );
- } else if ( onSaveAsDoc() ) {
- if( !closeDoc( false ) ) {
- result = false;
- }
- } else {
- result = false;
- }
- }
- else if( answer == 1 ) {
- closeDoc( false );
- } else if( answer == 2 ) {
- result = false;
- }
- } else {
+bool SalomeApp_Application::checkExistingDoc()
+{
+ bool result = LightApp_Application::checkExistingDoc();
+ if ( result && !activeStudy() ) {
SALOMEDSClient_StudyManager* aMgr = studyMgr();
- if( aMgr ) {
+ if ( aMgr ) {
std::vector<std::string> List = studyMgr()->GetOpenStudies();
if( List.size() > 0 ) {
- int answer = SUIT_MessageBox::question( desktop(), tr( "WRN_WARNING" ), tr( "QUE_ACTIVEDOC_LOAD" ),
- SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No );
- if ( answer == SUIT_MessageBox::Yes ) {
- onLoadDoc();
- }
+ SUIT_MessageBox::critical( desktop(), tr( "WRN_WARNING" ), tr( "ERR_ACTIVEDOC_LOAD" ));
result = false;
}
}
public:
enum { MenuToolsId = 5 };
enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
- CatalogGenId, RegDisplayId, SaveGUIStateId, FileLoadId, UserID,
- SimanCheckInId, SimanLocalCheckInId };
+ CatalogGenId, RegDisplayId, SaveGUIStateId, ConnectId, DisconnectId,
+ SimanCheckInId, SimanLocalCheckInId,
+ UserID };
typedef enum { WT_NoteBook = LightApp_Application::WT_User,
WT_User
virtual void contextMenuPopup( const QString&, QMenu*, QString& );
virtual bool checkDataObject(LightApp_DataObject* theObj);
-
- virtual void setDesktop( SUIT_Desktop* );
virtual bool checkExistingDoc();
virtual void onLoadDoc();
virtual void onNewWithScript();
virtual bool onLoadDoc( const QString& );
+ virtual void onUnloadDoc( bool ask = true);
virtual void onCloseDoc( bool ask = true);
- virtual void onLoadDocMessage(const QString&);
virtual void onExit();
virtual void onCopy();
protected slots:
void onStudyCreated( SUIT_Study* );
void onStudyOpened( SUIT_Study* );
+ void onDesktopMessage( const QString& );
protected:
virtual void createActions();
* initstate & initcontext redefined here.
*/
SalomeApp_PyInterp::SalomeApp_PyInterp():
- PyConsole_EnhInterp(), myFirstRun( true )
+ PyConsole_EnhInterp(), myFirstRun( true ), myFirstInitStudy( false )
{
}
int ret = simpleRun( "from Help import *", false );
if ( ret )
return ret;
- ret = simpleRun( "import salome", false );
+ }
+ if( myFirstInitStudy ) {
+ myFirstInitStudy = false;
+ int ret = simpleRun( "import salome", false );
if (ret)
return ret;
ret = simpleRun( "salome.salome_init(0,1)", false );
return true;
}
+void SalomeApp_PyInterp::initStudy()
+{
+ myFirstInitStudy = true;
+}
+
void SalomeApp_PyInterp::closeContext()
{
- simpleRun( "import salome", false );
- simpleRun( "salome.salome_close()", false );
+ myFirstInitStudy = false;
+ simpleRun( "import salome", false );
+ simpleRun( "salome.salome_close()", false );
}
virtual ~SalomeApp_PyInterp();
virtual void initPython();
+ virtual void initStudy();
virtual void closeContext();
protected:
private:
bool myFirstRun;
+ bool myFirstInitStudy;
};
#endif
#include <LightApp_Displayer.h>
+#ifndef DISABLE_PYCONSOLE
+ #include "SalomeApp_PyInterp.h" // WARNING! This include must be the first!
+ #include <PyConsole_Console.h>
+#endif
+
#include "utilities.h"
#include "SALOMEDS_Tool.hxx"
if ( myObserver )
myStudyDS->detach( myObserver->_this() );
if ( permanently ) {
+ SUIT_Desktop* desk = SUIT_Session::session()->activeApplication()->desktop();
+ bool isBlocked = desk->signalsBlocked();
+ desk->blockSignals( true );
SalomeApp_Application::studyMgr()->Close( studyPtr );
+ desk->blockSignals( isBlocked );
+#ifndef DISABLE_PYCONSOLE
+ SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( application() );
+ if( app->pythonConsole() )
+ app->pythonConsole()->getInterp()->destroy();
+#endif
}
SALOMEDSClient_Study* aStudy = 0;
setStudyDS( _PTR(Study)(aStudy) );
<translation>The file %1 does not exist.</translation>
</message>
<message>
- <source>QUE_ACTIVEDOC_LOAD</source>
- <translation>There is an active study in the session.
-Do you want to load it?
-</translation>
- </message>
- <message>
- <source>STUDYCLOSE_DESCRIPTION</source>
- <translation>You should close an existing study before.
-Do you want to close it?
-</translation>
+ <source>ERR_ACTIVEDOC_LOAD</source>
+ <translation>A study is already active in your session, but you are not connected to it. Use the Connect button to load it in the interface.</translation>
</message>
<message>
<source>WRN_STUDY_LOCKED</source>
<source>CREATE_DOCUMENT_PROBLEM</source>
<translation>Unknown problem during creation of the document</translation>
</message>
+ <message>
+ <source>TOT_DESK_CONNECT_STUDY</source>
+ <translation>Connect study</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_DISCONNECT_STUDY</source>
+ <translation>Disconnect study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_CONNECT</source>
+ <translation>Connect active study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_DISCONNECT</source>
+ <translation>Disconnect the current study</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_CONNECT</source>
+ <translation>Conn&ect</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_DISCONNECT</source>
+ <translation>D&isconnect</translation>
+ </message>
</context>
<context>
<name>SalomeApp_Application</name>
<source>APPCLOSE_UNLOAD</source>
<translation>&Unload</translation>
</message>
- <message>
- <source>APPCLOSE_CLOSE</source>
- <translation>&Close w/o saving</translation>
- </message>
<message>
<source>MEN_WINDOWS_NEW</source>
<translation>New Window</translation>
<source>MEN_DESK_REGISTRY_DISPLAY</source>
<translation>Registry &Display</translation>
</message>
- <message>
- <source>APPCLOSE_SAVE</source>
- <translation>&Save && Close</translation>
- </message>
<message>
<source>TOT_DESK_FILE_LOAD_SCRIPT</source>
<translation>Load python script</translation>
<source>STUDY_LOCKED</source>
<translation>LOCKED</translation>
</message>
- <message>
- <source>APPCLOSE_CANCEL</source>
- <translation>&Cancel</translation>
- </message>
<message>
<source>OBJ_BROWSER_NAME</source>
<translation>Object</translation>
<source>MEN_DESK_ADD_VARS_TO_NOTEBOOK</source>
<translation>Add vars to NoteBook</translation>
</message>
- <message>
- <source>APPCLOSE_CAPTION</source>
- <translation>Close active study</translation>
- </message>
<message>
<source>MEN_DESK_MRU</source>
<translation>Most Recently Used</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_LOAD</source>
- <translation>&Load...</translation>
+ <translation>&Connect</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_SCRIPT</source>
<source>PRP_SIMAN_LOCAL_CHECK_IN</source>
<translation>Check In for module</translation>
</message>
+ <message>
+ <source>DISCONNECT_CAPTION</source>
+ <translation>Disconnect active study</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_DESCRIPTION</source>
+ <translation>Do you want to save study before disconnect?</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_SAVE</source>
+ <translation>&Save && Disconnect</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_WO_SAVE</source>
+ <translation>&Disconnect w/o saving</translation>
+ </message>
</context>
<context>
<name>SalomeApp_StudyPropertiesDlg</name>
<source>WRN_FILE_NOT_EXIST</source>
<translation>Le fichier %1 n'existe pas.</translation>
</message>
+ <message>
+ <source>ERR_ACTIVEDOC_LOAD</source>
+ <translation type="unfinished">A study is already active in your session, but you are not connected to it. Use the Connect button to load it in the interface.</translation>
+ </message>
<message>
<source>WRN_STUDY_LOCKED</source>
<translation>L'étude est verrouillée</translation>
<translation>Impossible d'ouvrir l'étude car il y en a déjà une d'active.
Lancez une nouvelle session ou fermez l'étude en cours.</translation>
</message>
+ <message>
+ <source>TOT_DESK_CONNECT_STUDY</source>
+ <translation type="unfinished">Connect study</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_DISCONNECT_STUDY</source>
+ <translation type="unfinished">Disconnect study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_CONNECT</source>
+ <translation type="unfinished">Connect active study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_DISCONNECT</source>
+ <translation type="unfinished">Disconnect the current study</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_CONNECT</source>
+ <translation type="unfinished">Conn&ect</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_DISCONNECT</source>
+ <translation type="unfinished">D&isconnect</translation>
+ </message>
</context>
<context>
<name>SalomeApp_Application</name>
<source>APPCLOSE_UNLOAD</source>
<translation>&Déconnecter</translation>
</message>
- <message>
- <source>APPCLOSE_CLOSE</source>
- <translation>&Fermer sans sauvegarder</translation>
- </message>
<message>
<source>MEN_WINDOWS_NEW</source>
<translation>Nouvelle fenêtre</translation>
<source>MEN_DESK_REGISTRY_DISPLAY</source>
<translation>Affichage du registre CORBA</translation>
</message>
- <message>
- <source>APPCLOSE_SAVE</source>
- <translation>&Sauvegarder && Fermer</translation>
- </message>
<message>
<source>TOT_DESK_FILE_LOAD_SCRIPT</source>
<translation>Exécuter un script python</translation>
<source>STUDY_LOCKED</source>
<translation>VERROUILLEE</translation>
</message>
- <message>
- <source>APPCLOSE_CANCEL</source>
- <translation>&Annuler</translation>
- </message>
<message>
<source>OBJ_BROWSER_NAME</source>
<translation>Objet</translation>
<source>MEN_DESK_ADD_VARS_TO_NOTEBOOK</source>
<translation>Ajouter les variables au registre</translation>
</message>
- <message>
- <source>APPCLOSE_CAPTION</source>
- <translation>Fermer l'étude actuelle</translation>
- </message>
<message>
<source>MEN_DESK_MRU</source>
<translation>Dernières études ouvertes</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_LOAD</source>
- <translation>&Charger...</translation>
+ <translation type="unfinished">&Connect</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_SCRIPT</source>
<source>PRP_SIMAN_LOCAL_CHECK_IN</source>
<translation>Check In pour la module"</translation>
</message>
+ <message>
+ <source>DISCONNECT_CAPTION</source>
+ <translation type="unfinished">Disconnect active study</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_DESCRIPTION</source>
+ <translation type="unfinished">Do you want to save study before disconnect?</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_SAVE</source>
+ <translation type="unfinished">&Save && Disconnect</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_WO_SAVE</source>
+ <translation type="unfinished">&Disconnect w/o saving</translation>
+ </message>
</context>
<context>
<name>SalomeApp_StudyPropertiesDlg</name>
<translation>ファイル %1 は存在しません。</translation>
</message>
<message>
- <source>QUE_ACTIVEDOC_LOAD</source>
- <translation>セッションにスタディがあります。読み込みますか?</translation>
- </message>
- <message>
- <source>STUDYCLOSE_DESCRIPTION</source>
- <translation>既存のスタディを閉じる必要があります。閉じますか?
-</translation>
+ <source>ERR_ACTIVEDOC_LOAD</source>
+ <translation type="unfinished">A study is already active in your session, but you are not connected to it. Use the Connect button to load it in the interface.</translation>
</message>
<message>
<source>WRN_STUDY_LOCKED</source>
<source>CREATE_DOCUMENT_PROBLEM</source>
<translation>ドキュメント作成中に不明な問題が発生しました</translation>
</message>
+ <message>
+ <source>TOT_DESK_CONNECT_STUDY</source>
+ <translation type="unfinished">Connect study</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_DISCONNECT_STUDY</source>
+ <translation type="unfinished">Disconnect study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_CONNECT</source>
+ <translation type="unfinished">Connect active study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_DISCONNECT</source>
+ <translation type="unfinished">Disconnect the current study</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_CONNECT</source>
+ <translation type="unfinished">Conn&ect</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_DISCONNECT</source>
+ <translation type="unfinished">D&isconnect</translation>
+ </message>
</context>
<context>
<name>SalomeApp_Application</name>
<source>APPCLOSE_UNLOAD</source>
<translation>アンロード(&U)</translation>
</message>
- <message>
- <source>APPCLOSE_CLOSE</source>
- <translation>保存せずに閉じる(&C)</translation>
- </message>
<message>
<source>MEN_WINDOWS_NEW</source>
<translation>新しいウィンドウ</translation>
<source>MEN_DESK_REGISTRY_DISPLAY</source>
<translation>レジストリの表示(&D)</translation>
</message>
- <message>
- <source>APPCLOSE_SAVE</source>
- <translation>保存して閉じる(&S)</translation>
- </message>
<message>
<source>TOT_DESK_FILE_LOAD_SCRIPT</source>
<translation>Python スクリプトを実行</translation>
<source>STUDY_LOCKED</source>
<translation>ロック</translation>
</message>
- <message>
- <source>APPCLOSE_CANCEL</source>
- <translation>キャンセル(&C)</translation>
- </message>
<message>
<source>OBJ_BROWSER_NAME</source>
<translation>オブジェクト</translation>
<source>MEN_DESK_ADD_VARS_TO_NOTEBOOK</source>
<translation>変数をレジストリに追加します。</translation>
</message>
- <message>
- <source>APPCLOSE_CAPTION</source>
- <translation>現在のスタディを閉じる</translation>
- </message>
<message>
<source>MEN_DESK_MRU</source>
<translation>最近のスタディ</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_LOAD</source>
- <translation>読込み(&L)</translation>
+ <translation type="unfinished">&Connect</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_SCRIPT</source>
<source>PRP_SIMAN_LOCAL_CHECK_IN</source>
<translation>モジュールにチェックイン</translation>
</message>
+ <message>
+ <source>DISCONNECT_CAPTION</source>
+ <translation type="unfinished">Disconnect active study</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_DESCRIPTION</source>
+ <translation type="unfinished">Do you want to save study before disconnect?</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_SAVE</source>
+ <translation type="unfinished">&Save && Disconnect</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_WO_SAVE</source>
+ <translation type="unfinished">&Disconnect w/o saving</translation>
+ </message>
</context>
<context>
<name>SalomeApp_StudyPropertiesDlg</name>