1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File: SalomeApp_Application.h
20 // Created: 10/22/2004 3:37:25 PM
21 // Author: Sergey LITONIN
22 // Copyright (C) CEA 2004
24 #ifndef SALOMEAPP_APPLICATION_H
25 #define SALOMEAPP_APPLICATION_H
29 #endif // _MSC_VER > 1000
31 #include "SalomeApp.h"
32 #include <LightApp_Application.h>
36 #include <SALOMEconfig.h>
37 //#include CORBA_CLIENT_HEADER(SALOMEDS)
38 #include <SALOME_NamingService.hxx>
40 #include "SALOMEDSClient.hxx"
46 class LightApp_Preferences;
47 class SalomeApp_Module;
48 class SalomeApp_Study;
50 class SALOME_LifeCycleCORBA;
55 #pragma warning( disable:4251 )
59 \class SalomeApp_Application
60 \brief Application containing SalomeApp module or LightApp module
63 class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application
68 enum { MenuToolsId = 5 };
69 enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
70 CatalogGenId, RegDisplayId, SaveGUIStateId, UserID };
73 SalomeApp_Application();
74 virtual ~SalomeApp_Application();
76 virtual void updateObjectBrowser( const bool = true );
78 virtual QString getFileFilter() const;
82 virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
84 static CORBA::ORB_var orb();
85 static SALOMEDSClient_StudyManager* studyMgr();
86 static SALOME_NamingService* namingService();
87 static SALOME_LifeCycleCORBA* lcc();
88 static QString defaultEngineIOR();
90 SUIT_ViewManager* newViewManager(const QString&);
91 void updateSavePointDataObjects( SalomeApp_Study* );
94 virtual bool onOpenDoc( const QString& );
95 virtual void onLoadDoc();
96 virtual bool onLoadDoc( const QString& );
97 virtual void onCopy();
98 virtual void onPaste();
99 void onSaveGUIState();// called from VISU
102 void onStudySaved( SUIT_Study* );
103 void onStudyOpened( SUIT_Study* );
106 virtual void createActions();
107 virtual SUIT_Study* createNewStudy();
108 virtual QWidget* createWindow( const int );
110 virtual void updateCommandsStatus();
111 virtual void onSelectionChanged();
113 virtual void createPreferences( LightApp_Preferences* );
114 virtual void updateDesktopTitle();
117 void onDeleteInvalidReferences();
118 void onDblClick( QListViewItem* );
123 void onDeleteGUIState();
124 void onRestoreGUIState();
125 void onRenameGUIState();
133 #pragma warning( default:4251 )