Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/gui.git] / src / SalomeApp / SalomeApp_Application.h
1 // File:      SalomeApp_Application.h
2 // Created:   10/22/2004 3:37:25 PM
3 // Author:    Sergey LITONIN
4 // Copyright (C) CEA 2004
5
6 #ifndef SALOMEAPP_APPLICATION_H
7 #define SALOMEAPP_APPLICATION_H
8
9 #if _MSC_VER > 1000
10 #pragma once
11 #endif // _MSC_VER > 1000
12
13 #include "SalomeApp.h"
14 #include <LightApp_Application.h>
15
16 #include <CORBA.h>
17
18 #include <SALOMEconfig.h>
19 //#include CORBA_CLIENT_HEADER(SALOMEDS)
20 #include <SALOME_NamingService.hxx>
21
22 #include "SALOMEDSClient.hxx"
23
24 class QAction;
25 class QComboBox;
26 class QDockWindow;
27
28 class LightApp_Preferences;
29 class SalomeApp_Module;
30 class SalomeApp_Study;
31
32 class SALOME_LifeCycleCORBA;
33
34 class QListViewItem;
35
36 #ifdef WIN32
37 #pragma warning( disable:4251 )
38 #endif
39
40 /*!
41   Description : Application containing SalomeApp module or LightApp module
42 */
43
44 class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application
45 {
46   Q_OBJECT
47
48 public:
49   enum { MenuToolsId = 5 };
50   enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
51          CatalogGenId, RegDisplayId, SaveGUIStateId, UserID };
52
53 public:
54   SalomeApp_Application();
55   virtual ~SalomeApp_Application();
56
57   virtual void                        updateObjectBrowser( const bool = true );
58
59   virtual QString                     getFileFilter() const;
60
61   virtual void                        start();
62
63   virtual void                        contextMenuPopup( const QString&, QPopupMenu*, QString& );
64
65   static CORBA::ORB_var               orb();
66   static SALOMEDSClient_StudyManager* studyMgr();
67   static SALOME_NamingService*        namingService();
68   static SALOME_LifeCycleCORBA*       lcc();
69   static QString                      defaultEngineIOR();
70
71   SUIT_ViewManager*                   newViewManager(const QString&);
72   void                                updateSavePointDataObjects( SalomeApp_Study* );
73
74 public slots:
75   virtual bool                        onOpenDoc( const QString& );
76   virtual void                        onLoadDoc();
77   virtual bool                        onLoadDoc( const QString& );
78   virtual void                        onCopy();
79   virtual void                        onPaste();
80
81 protected slots:
82   void                                onStudySaved( SUIT_Study* );
83   void                                onStudyOpened( SUIT_Study* );
84
85 protected:
86   virtual void                        createActions();
87   virtual SUIT_Study*                 createNewStudy();
88   virtual QWidget*                    createWindow( const int );
89
90   virtual void                        updateCommandsStatus();
91   virtual void                        onSelectionChanged();
92
93   virtual void                        createPreferences( LightApp_Preferences* );
94   virtual void                        updateDesktopTitle();
95
96 private slots:
97   void                                onDeleteInvalidReferences();
98   void                                onDblClick( QListViewItem* );
99   void                                onProperties();
100   void                                onDumpStudy();
101   void                                onLoadScript(); 
102   void                                onSaveGUIState(); 
103   void                                onDeleteGUIState(); 
104
105   void                                onCatalogGen();
106   void                                onRegDisplay();
107   void                                onOpenWith();
108   void                                onRestoreGUIState();
109   void                                onRenameGUIState();
110 };
111
112 #ifdef WIN32
113 #pragma warning( default:4251 )
114 #endif
115
116 #endif