]> SALOME platform Git repositories - modules/gui.git/blob - src/SalomeApp/SalomeApp_Application.h
Salome HOME
083cd6a9044b1a854905e1f00eb02e58e6c31a3b
[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   \class SalomeApp_Application
42   \brief Application containing SalomeApp module or LightApp module
43 */
44
45 class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application
46 {
47   Q_OBJECT
48
49 public:
50   enum { MenuToolsId = 5 };
51   enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
52          CatalogGenId, RegDisplayId, SaveGUIStateId, UserID };
53
54 public:
55   SalomeApp_Application();
56   virtual ~SalomeApp_Application();
57
58   virtual void                        updateObjectBrowser( const bool = true );
59
60   virtual QString                     getFileFilter() const;
61
62   virtual void                        start();
63
64   virtual void                        contextMenuPopup( const QString&, QPopupMenu*, QString& );
65
66   static CORBA::ORB_var               orb();
67   static SALOMEDSClient_StudyManager* studyMgr();
68   static SALOME_NamingService*        namingService();
69   static SALOME_LifeCycleCORBA*       lcc();
70   static QString                      defaultEngineIOR();
71
72   SUIT_ViewManager*                   newViewManager(const QString&);
73   void                                updateSavePointDataObjects( SalomeApp_Study* );
74
75 public slots:
76   virtual bool                        onOpenDoc( const QString& );
77   virtual void                        onLoadDoc();
78   virtual bool                        onLoadDoc( const QString& );
79   virtual void                        onCopy();
80   virtual void                        onPaste();
81   void                                onSaveGUIState();// called from VISU
82
83 protected slots:
84   void                                onStudySaved( SUIT_Study* );
85   void                                onStudyOpened( SUIT_Study* );
86
87 protected:
88   virtual void                        createActions();
89   virtual SUIT_Study*                 createNewStudy();
90   virtual QWidget*                    createWindow( const int );
91
92   virtual void                        updateCommandsStatus();
93   virtual void                        onSelectionChanged();
94
95   virtual void                        createPreferences( LightApp_Preferences* );
96   virtual void                        updateDesktopTitle();
97
98 private slots:
99   void                                onDeleteInvalidReferences();
100   void                                onDblClick( QListViewItem* );
101   void                                onProperties();
102   void                                onDumpStudy();
103   void                                onLoadScript(); 
104
105   void                                onDeleteGUIState(); 
106   void                                onRestoreGUIState();
107   void                                onRenameGUIState();
108
109   void                                onCatalogGen();
110   void                                onRegDisplay();
111   void                                onOpenWith();
112 };
113
114 #ifdef WIN32
115 #pragma warning( default:4251 )
116 #endif
117
118 #endif