1 // File: SalomeApp_Application.cxx
2 // Created: 10/22/2004 3:23:45 PM
3 // Author: Sergey LITONIN
4 // Copyright (C) CEA 2004
6 #include "SalomeApp_PyInterp.h" // WARNING! This include must be the first!
8 #include "SalomeApp_Application.h"
10 #include "SalomeApp_Study.h"
11 #include "SalomeApp_Module.h"
12 #include "SalomeApp_GLSelector.h"
13 #include "SalomeApp_OBSelector.h"
14 #include "SalomeApp_OCCSelector.h"
15 #include "SalomeApp_VTKSelector.h"
16 #include "SalomeApp_EventFilter.h"
17 #include "SalomeApp_SelectionMgr.h"
18 #include "SalomeApp_EventFilter.h"
19 #include "SalomeApp_WidgetContainer.h"
20 #include "SalomeApp_ModuleDlg.h"
22 #include <LogWindow.h>
24 #include <GLViewer_Viewer.h>
25 #include <GLViewer_ViewManager.h>
27 #include <Plot2d_ViewManager.h>
29 #include <OCCViewer_ViewManager.h>
30 #include <SOCC_ViewModel.h>
32 #include "SVTK_ViewManager.h"
33 #include "SVTK_ViewModel.h"
35 #include <STD_TabDesktop.h>
37 #include <SUIT_Tools.h>
38 #include <SUIT_Session.h>
40 #include <QtxDockAction.h>
42 #include <OB_Browser.h>
44 #include <PythonConsole_PyConsole.h>
46 #include <SUIT_MessageBox.h>
47 #include <SUIT_ResourceMgr.h>
48 #include <SUIT_ActionOperation.h>
50 #include <Utils_ORB_INIT.hxx>
51 #include <Utils_SINGLETON.hxx>
52 #include <SALOME_ModuleCatalog_impl.hxx>
59 #include <qcombobox.h>
60 #include <qmessagebox.h>
61 #include <qapplication.h>
63 #include "SALOMEDS_StudyManager.hxx"
65 #define OBJECT_BROWSER_WIDTH 300
67 static const char* imageEmptyIcon[] = {
70 "....................",
71 "....................",
72 "....................",
73 "....................",
74 "....................",
75 "....................",
76 "....................",
77 "....................",
78 "....................",
79 "....................",
80 "....................",
81 "....................",
82 "....................",
83 "....................",
84 "....................",
85 "....................",
86 "....................",
87 "....................",
88 "....................",
89 "...................."};
91 extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication()
93 return new SalomeApp_Application();
97 Class : SalomeApp_Application
98 Description : Application containing SalomeApp module
101 SalomeApp_Application::SalomeApp_Application()
102 : CAM_Application( false )
104 STD_TabDesktop* desk = new STD_TabDesktop();
108 SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
109 QPixmap aLogo = aResMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ) );
111 desktop()->setIcon( aLogo );
112 desktop()->setDockableMenuBar( true );
113 desktop()->setDockableStatusBar( false );
117 mySelMgr = new SalomeApp_SelectionMgr( this );
119 connect( desk, SIGNAL( closing( SUIT_Desktop*, QCloseEvent* ) ),
120 this, SLOT( onDesktopClosing( SUIT_Desktop*, QCloseEvent* ) ) );
122 connect( mySelMgr, SIGNAL( selectionChanged() ), this, SLOT( onSelection() ) );
125 SalomeApp_Application::~SalomeApp_Application()
127 saveWindowsGeometry();
132 desktop()->saveGeometry( resourceMgr(), "desktop" );
133 resourceMgr()->save();
138 SalomeApp_EventFilter::Destroy();
141 void SalomeApp_Application::start()
144 desktop()->loadGeometry( resourceMgr(), "desktop" );
146 CAM_Application::start();
148 QAction* a = action( ViewWindowsId );
149 if ( a && a->inherits( "QtxDockAction" ) )
150 ((QtxDockAction*)a)->setAutoPlace( true );
152 SalomeApp_EventFilter::Init();
155 updateViewManagers();
160 QString SalomeApp_Application::applicationName() const
165 CAM_Module* SalomeApp_Application::loadModule( const QString& name )
167 CAM_Module* mod = CAM_Application::loadModule( name );
170 connect( this, SIGNAL( studyOpened() ), mod, SLOT( onModelOpened() ) );
171 connect( this, SIGNAL( studySaved() ), mod, SLOT( onModelSaved() ) );
172 connect( this, SIGNAL( studyClosed() ), mod, SLOT( onModelClosed() ) );
177 bool SalomeApp_Application::activateModule( const QString& modName )
180 CAM_Module* prevMod = activeModule();
183 actName = prevMod->moduleName();
185 if ( actName == modName )
188 saveWindowsGeometry();
190 bool status = CAM_Application::activateModule( modName );
192 updateModuleActions();
198 updateViewManagers();
203 SalomeApp_SelectionMgr* SalomeApp_Application::selectionMgr() const
208 void SalomeApp_Application::createActions()
210 STD_Application::createActions();
212 SUIT_Desktop* desk = desktop();
213 SUIT_ResourceMgr* resMgr = resourceMgr();
215 // default icon for neutral point ('SALOME' module)
216 QPixmap defIcon = resMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ) );
217 if ( defIcon.isNull() )
218 defIcon = QPixmap( imageEmptyIcon );
219 // default icon for any module
220 QPixmap modIcon = resMgr->loadPixmap( "SalomeApp", tr( "APP_MODULE_ICO" ) );
221 if ( modIcon.isNull() )
222 modIcon = QPixmap( imageEmptyIcon );
224 int modTBar = createTool( tr( "INF_TOOLBAR_MODULES" ) );
226 QActionGroup* modGroup = new QActionGroup( this );
227 modGroup->setExclusive( true );
228 modGroup->setUsesDropDown( true );
230 QAction* a = createAction( -1, tr( "APP_NAME" ), defIcon, tr( "APP_NAME" ),
231 tr( "PRP_APP_MODULE" ), 0, desk, true );
233 myActions.insert( QString(), a );
235 QMap<QString, QString> iconMap;
236 moduleIconNames( iconMap );
238 const int iconSize = 20;
240 createTool( modGroup, modTBar );
241 createTool( separator(), modTBar );
244 modules( modList, false );
246 for ( QStringList::Iterator it = modList.begin(); it != modList.end(); ++it )
248 if ( (*it).isEmpty() )
252 if ( iconMap.contains( *it ) )
253 iconName = iconMap[*it];
255 QString modName = moduleName( *it );
257 QPixmap icon = resMgr->loadPixmap( modName, iconName );
261 icon.convertFromImage( icon.convertToImage().smoothScale( iconSize, iconSize, QImage::ScaleMin ) );
263 QAction* a = createAction( -1, *it, icon, *it, tr( "PRP_MODULE" ).arg( *it ), 0, desk, true );
264 createTool( a, modTBar );
267 myActions.insert( *it, a );
270 int windowMenu = createMenu( tr( "MEN_DESK_WINDOW" ), -1, 100 );
271 int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 );
272 createMenu( separator(), windowMenu, -1, 1 );
274 for ( int id = NewGLViewId; id <= NewVTKViewId; id++ )
276 QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), QIconSet(),
277 tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ),
278 tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ),
279 0, desk, false, this, SLOT( onNewWindow() ) );
280 createMenu( a, newWinMenu, -1 );
283 connect( modGroup, SIGNAL( selected( QAction* ) ), this, SLOT( onModuleActivation( QAction* ) ) );
286 void SalomeApp_Application::onModuleActivation( QAction* a )
291 QString modName = a->menuText();
292 if ( modName == tr( "APP_NAME" ) )
293 modName = QString::null;
295 // Force user to create/open a study before module activation
296 QMap<QString, QString> iconMap;
297 moduleIconNames( iconMap );
298 QPixmap icon = resourceMgr()->loadPixmap( moduleName( modName ), iconMap[ modName ] );
300 bool cancelled = false;
301 while ( !modName.isEmpty() && !activeStudy() && !cancelled ){
302 SalomeApp_ModuleDlg aDlg( desktop(), modName, icon );
303 int res = aDlg.exec();
317 putInfo( tr("INF_CANCELLED") );
318 myActions[QString()]->setOn( true );
324 activateModule( modName );
327 QString SalomeApp_Application::defaultModule() const
329 QStringList aModuleNames;
330 modules( aModuleNames, false ); // obtain a complete list of module names for the current configuration
331 // If there's the one and only module --> activate it automatically
332 // TODO: Possible improvement - default module can be taken from preferences
333 return aModuleNames.count() > 1 ? "" : ( aModuleNames.count() ? aModuleNames.first() : "" );
336 void SalomeApp_Application::onNewWindow()
338 const QObject* obj = sender();
339 if ( !obj || !obj->inherits( "QAction" ) )
343 int id = actionId( (QAction*)obj );
347 type = GLViewer_Viewer::Type();
350 type = Plot2d_Viewer::Type();
353 type = OCCViewer_Viewer::Type();
356 type = VTKViewer_Viewer::Type();
360 if ( !type.isEmpty() )
361 createViewManager( type );
364 //=======================================================================
366 // Purpose : SLOT. Create new document
367 //=======================================================================
368 void SalomeApp_Application::onNewDoc()
370 SUIT_Study* study = activeStudy();
372 saveWindowsGeometry();
374 CAM_Application::onNewDoc();
376 if ( !study ) // new study will be create in THIS application
379 updateViewManagers();
383 //=======================================================================
385 // Purpose : SLOT. Open new document
386 //=======================================================================
387 void SalomeApp_Application::onOpenDoc()
389 SUIT_Study* study = activeStudy();
390 saveWindowsGeometry();
392 CAM_Application::onOpenDoc();
394 if ( !study ) // new study will be create in THIS application
397 updateViewManagers();
401 void SalomeApp_Application::onSelection()
403 onSelectionChanged();
405 if ( activeModule() && activeModule()->inherits( "SalomeApp_Module" ) )
406 ((SalomeApp_Module*)activeModule())->selectionChanged();
409 void SalomeApp_Application::onSelectionChanged()
413 void SalomeApp_Application::setActiveStudy( SUIT_Study* study )
415 CAM_Application::setActiveStudy( study );
420 //=======================================================================
421 // name : createNewStudy
422 // Purpose : Create new study
423 //=======================================================================
424 SUIT_Study* SalomeApp_Application::createNewStudy()
426 SalomeApp_Study* aStudy = new SalomeApp_Study( this );
428 // Set up processing of major study-related events
429 connect( aStudy, SIGNAL( created( SUIT_Study* ) ), this, SLOT( onStudyCreated( SUIT_Study* ) ) );
430 connect( aStudy, SIGNAL( opened ( SUIT_Study* ) ), this, SLOT( onStudyOpened ( SUIT_Study* ) ) );
431 connect( aStudy, SIGNAL( saved ( SUIT_Study* ) ), this, SLOT( onStudySaved ( SUIT_Study* ) ) );
432 connect( aStudy, SIGNAL( closed ( SUIT_Study* ) ), this, SLOT( onStudyClosed ( SUIT_Study* ) ) );
437 //=======================================================================
438 // name : createNewStudy
439 // Purpose : Enable/Disable menu items and toolbar buttons. Rebuild menu
440 //=======================================================================
441 void SalomeApp_Application::updateCommandsStatus()
443 CAM_Application::updateCommandsStatus();
445 for ( int id = NewGLViewId; id <= NewVTKViewId; id++ )
447 QAction* a = action( id );
449 a->setEnabled( activeStudy() );
453 //=======================================================================
454 // name : onHelpAbout
455 // Purpose : SLOT. Display "About" message box
456 //=======================================================================
457 void SalomeApp_Application::onHelpAbout()
459 //QAD_MessageBox::info1( myDesktop, tr( "ABOUT" ), tr( "APP_NAME_LONG" ).arg( APP_VERSION ), tr( "BUT_OK" ) );
461 QMessageBox aDlg( desktop(), "AboutDlg" );
463 SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
464 QPixmap aPixmap = aResMgr->loadPixmap( "SalomeApp", tr( "ABOUT_ICO" ) );
466 QFontMetrics m( aDlg.font() );
467 QImage anImage = aPixmap.convertToImage();
468 int w = m.height() * 3;
469 anImage = anImage.scale( w, w );
470 aPixmap.convertFromImage( anImage );
472 aDlg.setCaption( tr( "ABOUT" ) );
473 aDlg.setText( tr( "APP_NAME_LONG" ).arg( APP_VERSION ) );
474 aDlg.setIconPixmap( aPixmap );
478 QWidget* SalomeApp_Application::window( const int flag, const int studyId ) const
485 if ( !activeStudy() )
488 sId = activeStudy()->id();
491 if ( myWindows.contains( flag ) )
492 wid = myWindows[flag]->widget( sId );
497 void SalomeApp_Application::addWindow( QWidget* wid, const int flag, const int studyId )
505 if ( !activeStudy() )
508 sId = activeStudy()->id();
511 if ( !myWindows.contains( flag ) )
513 QMap<int, int> winMap;
514 currentWindows( winMap );
516 myWindows.insert( flag, new SalomeApp_WidgetContainer( flag, desktop() ) );
517 if ( winMap.contains( flag ) )
518 desktop()->moveDockWindow( myWindows[flag], (Dock)winMap[flag] );
520 myWindows[flag]->setResizeEnabled( true );
521 myWindows[flag]->setCloseMode( QDockWindow::Always );
522 myWindows[flag]->setName( QString( "dock_window_%1" ).arg( flag ) );
525 myWindows[flag]->insert( sId, wid );
527 setWindowShown( flag, !myWindows[flag]->isEmpty() );
530 void SalomeApp_Application::removeWindow( const int flag, const int studyId )
532 if ( !myWindows.contains( flag ) )
538 if ( !activeStudy() )
541 sId = activeStudy()->id();
544 myWindows[flag]->remove( sId );
546 setWindowShown( flag, !myWindows[flag]->isEmpty() );
549 QWidget* SalomeApp_Application::getWindow( const int flag, const int studyId )
551 QWidget* wid = window( flag, studyId );
553 addWindow( wid = createWindow( flag ), flag, studyId );
558 bool SalomeApp_Application::isWindowVisible( const int type ) const
561 if ( myWindows.contains( type ) )
563 SUIT_Desktop* desk = ((SalomeApp_Application*)this)->desktop();
564 res = desk && desk->appropriate( myWindows[type] );
569 void SalomeApp_Application::setWindowShown( const int type, const bool on )
571 if ( !desktop() || !myWindows.contains( type ) )
574 QDockWindow* dw = myWindows[type];
575 desktop()->setAppropriate( dw, on );
576 on ? dw->show() : dw->hide();
579 OB_Browser* SalomeApp_Application::objectBrowser()
582 QWidget* wid = getWindow( WT_ObjectBrowser );
583 if ( wid->inherits( "OB_Browser" ) )
584 ob = (OB_Browser*)wid;
588 LogWindow* SalomeApp_Application::logWindow()
591 QWidget* wid = getWindow( WT_LogWindow );
592 if ( wid->inherits( "LogWindow" ) )
593 lw = (LogWindow*)wid;
597 SUIT_ViewManager* SalomeApp_Application::getViewManager( const QString& vmType, const bool create )
599 SUIT_ViewManager* aVM = viewManager( vmType );
600 SUIT_ViewManager* anActiveVM = CAM_Application::activeViewManager();
601 if ( anActiveVM && anActiveVM->getType() == vmType )
605 if ( !aVM->getActiveView() )
609 aVM = createViewManager( vmType );
613 SUIT_ViewManager* SalomeApp_Application::createViewManager( const QString& vmType )
615 SUIT_ViewManager* viewMgr = 0;
616 if ( vmType == GLViewer_Viewer::Type() )
618 viewMgr = new GLViewer_ViewManager( activeStudy(), desktop() );
619 new SalomeApp_GLSelector( (GLViewer_Viewer2d*)viewMgr->getViewModel(), mySelMgr );
621 else if ( vmType == Plot2d_Viewer::Type() )
622 viewMgr = new Plot2d_ViewManager( activeStudy(), desktop() );
623 else if ( vmType == OCCViewer_Viewer::Type() )
625 viewMgr = new OCCViewer_ViewManager( activeStudy(), desktop() );
626 viewMgr->setViewModel( new SOCC_Viewer() );// custom view model, which extends SALOME_View interface
627 new SalomeApp_OCCSelector( (OCCViewer_Viewer*)viewMgr->getViewModel(), mySelMgr );
629 else if ( vmType == SVTK_Viewer::Type() )
631 viewMgr = new SVTK_ViewManager( activeStudy(), desktop() );
632 new SalomeApp_VTKSelector((SVTK_Viewer*)viewMgr->getViewModel(),mySelMgr);
638 addViewManager( viewMgr );
639 SUIT_ViewWindow* viewWin = viewMgr->createViewWindow();
641 if ( viewWin && desktop() )
642 viewWin->resize( (int)( desktop()->width() * 0.6 ), (int)( desktop()->height() * 0.6 ) );
644 connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ),
645 this, SLOT( onCloseView( SUIT_ViewManager* ) ) );
650 void SalomeApp_Application::onCloseView( SUIT_ViewManager* theVM )
652 removeViewManager( theVM );
655 void SalomeApp_Application::onStudyCreated( SUIT_Study* theStudy )
657 SUIT_DataObject* aRoot = 0;
658 if ( theStudy && theStudy->root() )
660 aRoot = theStudy->root();
661 //aRoot->setName( tr( "DATA_MODELS" ) );
663 if ( objectBrowser() != 0 )
664 objectBrowser()->setRootObject( aRoot );
666 activateModule( defaultModule() );
669 void SalomeApp_Application::onStudyOpened( SUIT_Study* theStudy )
671 SUIT_DataObject* aRoot = 0;
672 if ( theStudy && theStudy->root() )
674 aRoot = theStudy->root();
677 if ( objectBrowser() != 0 ) {
678 objectBrowser()->setRootObject( aRoot );
683 activateModule( defaultModule() );
688 void SalomeApp_Application::onStudySaved( SUIT_Study* )
693 void SalomeApp_Application::onStudyClosed( SUIT_Study* )
697 activateModule( "" );
698 if ( objectBrowser() != 0 )
700 objectBrowser()->setRootObject( 0 );
703 saveWindowsGeometry();
706 QString SalomeApp_Application::getFileFilter() const
711 void SalomeApp_Application::updateActions()
713 updateCommandsStatus();
716 QWidget* SalomeApp_Application::createWindow( const int flag )
720 if ( flag == WT_ObjectBrowser )
722 OB_Browser* ob = new OB_Browser( desktop() );
724 ob->setCaption( tr( "OBJECT_BROWSER" ) );
725 ob->resize( OBJECT_BROWSER_WIDTH, ob->height() );
726 ob->setAutoUpdate( true );
729 new SalomeApp_OBSelector( ob, mySelMgr );
733 ob->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
735 else if ( flag == WT_PyConsole )
737 PythonConsole* pyCons = new PythonConsole( desktop(), new SalomeApp_PyInterp() );
738 pyCons->setCaption( tr( "PYTHON_CONSOLE" ) );
741 // pyCons->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
743 else if ( flag == WT_LogWindow )
745 LogWindow* logWin = new LogWindow( desktop() );
746 logWin->setCaption( tr( "LOG_WINDOW" ) );
749 logWin->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
755 void SalomeApp_Application::defaultWindows( QMap<int, int>& aMap ) const
757 aMap.insert( WT_ObjectBrowser, Qt::DockLeft );
758 aMap.insert( WT_PyConsole, Qt::DockBottom );
761 void SalomeApp_Application::defaultViewManagers( QStringList& ) const
765 CORBA::ORB_var SalomeApp_Application::orb()
767 ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
768 CORBA::ORB_var& orb = init( qApp->argc(), qApp->argv() );
773 SALOMEDSClient_StudyManager* SalomeApp_Application::studyMgr()
775 static SALOMEDSClient_StudyManager* aStudyManager = NULL;
778 aStudyManager = new SALOMEDS_StudyManager();
780 return aStudyManager;
783 SALOME_NamingService* SalomeApp_Application::namingService()
785 return new SALOME_NamingService( orb() );
788 QString SalomeApp_Application::defaultEngineIOR()
790 // Look for a default module engine (needed for CORBAless modules to use SALOMEDS persistence)
792 CORBA::Object_ptr anEngine = namingService()->Resolve( "/SalomeAppEngine" );
793 if ( !CORBA::is_nil( anEngine ) )
794 anIOR = orb()->object_to_string( anEngine );
798 void SalomeApp_Application::moduleIconNames( QMap<QString, QString>& iconMap ) const
802 SUIT_ResourceMgr* resMgr = resourceMgr();
807 modules( modList, false );
809 for ( QStringList::const_iterator it = modList.begin(); it != modList.end(); ++it )
811 QString modName = *it;
812 QString modIntr = moduleName( modName );
813 QString modIcon = resMgr->stringValue( modIntr, "icon", QString::null );
815 if ( modIcon.isEmpty() )
818 if ( SUIT_Tools::extension( modIcon ).isEmpty() )
819 modIcon += QString( ".png" );
821 iconMap.insert( modName, modIcon );
825 void SalomeApp_Application::updateModuleActions()
828 if ( activeModule() )
829 modName = activeModule()->moduleName();
831 if ( myActions.contains( modName ) )
832 myActions[modName]->setOn( true );
835 void SalomeApp_Application::currentWindows( QMap<int, int>& winMap ) const
838 if ( !activeStudy() )
841 if ( activeModule() && activeModule()->inherits( "SalomeApp_Module" ) )
842 ((SalomeApp_Module*)activeModule())->windows( winMap );
844 defaultWindows( winMap );
847 void SalomeApp_Application::currentViewManagers( QStringList& lst ) const
850 if ( !activeStudy() )
853 if ( activeModule() && activeModule()->inherits( "SalomeApp_Module" ) )
854 ((SalomeApp_Module*)activeModule())->viewManagers( lst );
856 defaultViewManagers( lst );
859 void SalomeApp_Application::updateWindows()
861 QMap<int, int> winMap;
862 currentWindows( winMap );
864 for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it )
865 getWindow( it.key() );
867 loadWindowsGeometry();
869 for ( WindowMap::ConstIterator itr = myWindows.begin(); itr != myWindows.end(); ++itr )
870 setWindowShown( itr.key(), !itr.data()->isEmpty() && winMap.contains( itr.key() ) );
873 void SalomeApp_Application::updateViewManagers()
876 currentViewManagers( lst );
878 for ( QStringList::const_iterator it = lst.begin(); it != lst.end(); ++it )
879 getViewManager( *it, true );
882 void SalomeApp_Application::loadWindowsGeometry()
884 QtxDockAction* dockMgr = 0;
886 QAction* a = action( ViewWindowsId );
887 if ( a && a->inherits( "QtxDockAction" ) )
888 dockMgr = (QtxDockAction*)a;
894 if ( activeModule() )
895 modName = moduleLibrary( activeModule()->moduleName(), false );
897 QString section = QString( "windows_geometry" );
898 if ( !modName.isEmpty() )
899 section += QString( "." ) + modName;
902 dockMgr->loadGeometry( resourceMgr(), section, false );
903 dockMgr->restoreGeometry();
906 void SalomeApp_Application::saveWindowsGeometry()
908 QtxDockAction* dockMgr = 0;
910 QAction* a = action( ViewWindowsId );
911 if ( a && a->inherits( "QtxDockAction" ) )
912 dockMgr = (QtxDockAction*)a;
918 if ( activeModule() )
919 modName = moduleLibrary( activeModule()->moduleName(), false );
921 QString section = QString( "windows_geometry" );
922 if ( !modName.isEmpty() )
923 section += QString( "." ) + modName;
925 dockMgr->storeGeometry();
926 dockMgr->saveGeometry( resourceMgr(), section, false );
929 void SalomeApp_Application::activateWindows()
933 for ( WindowMap::Iterator itr = myWindows.begin(); itr != myWindows.end(); ++itr )
934 itr.data()->activate( activeStudy()->id() );