Salome HOME
merging the main trunk with the BrForComp branch to build a pre V3_0_1
[modules/med.git] / src / MEDGUI / MedGUI.h
1 //  MED MEDGUI : MED component GUI implemetation
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : MEDGUI.h
8 //  Module : MED
9
10 #ifndef _MEDGUI_H_
11 #define _MEDGUI_H_
12
13 #include <SalomeApp_Module.h>
14 #include <SUIT_Desktop.h>
15
16 #include <SALOMEconfig.h>
17 #include CORBA_CLIENT_HEADER(MED_Gen)
18 //#include CORBA_CLIENT_HEADER(SMESH_Mesh)
19 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
20
21 class MedGUI: public SalomeApp_Module
22 {
23   Q_OBJECT
24
25 public:
26   MedGUI();
27
28   virtual void initialize        ( CAM_Application* );
29   virtual QString                engineIOR() const;
30   virtual void windows( QMap<int, int>& mappa ) const;
31   virtual bool OnGUIEvent        (int theCommandID);
32   virtual bool OnKeyPress        (QKeyEvent* pe, SUIT_ViewWindow* );
33   virtual bool OnMousePress      (QMouseEvent* pe, SUIT_ViewWindow* );
34   virtual bool OnMouseMove       (QMouseEvent* pe, SUIT_ViewWindow* );
35
36   void createMedAction( const int, const QString&, const QString& = "" );
37   void createPopupItem( const int, const QString&, const QString&, const QString& = "", const int = -1 );
38
39   virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
40
41   //virtual bool SetSettings       ();
42   //virtual bool CustomPopup       ( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
43   //                                 const QString & theParent, const QString & theObject );
44   //virtual void DefinePopup       ( QString & theContext, QString & theParent, QString & theObject );
45   //virtual bool ActiveStudyChanged( QAD_Desktop* parent );
46
47   /*static*/ SALOME_MED::MED_Gen_ptr InitMedGen() const;
48
49   static bool DumpMesh( SALOME_MED::MESH_var aMesh );
50   //  static bool DumpSubMesh( SMESH::SMESH_subMesh_ptr aSubMesh ) ;
51   static bool DumpSubMesh( SALOME_MED::FAMILY_var Fam ) ;
52
53   static void setOrb();
54
55   void EmitSignalCloseAllDialogs();
56
57 signals :
58   void                        SignalCloseAllDialogs();
59
60 public slots:
61   virtual bool                deactivateModule( SUIT_Study* );
62   virtual bool                activateModule( SUIT_Study* );
63
64 protected:
65 private slots:
66   void onGUIEvent();
67   void onWindowActivated( SUIT_ViewWindow* );
68
69 };
70
71 #endif