Back to index

salome-med  6.5.0
MEDGUI.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  MED MEDGUI : MED component GUI implemetation
00024 //  File   : MEDGUI.h
00025 //  Module : MED
00026 //
00027 #ifndef __MEDGUI_HXX_
00028 #define __MEDGUI_HXX__
00029 
00030 #include <SalomeApp_Module.h>
00031 #include <SUIT_Desktop.h>
00032 
00033 #include <SALOMEconfig.h>
00034 #include CORBA_CLIENT_HEADER(MED_Gen)
00035 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
00036 
00037 class MEDGUIDataBaseDockWidget;
00038 
00039 class MedGUI: public SalomeApp_Module
00040 {
00041   Q_OBJECT
00042 
00043 public:
00044   MedGUI();
00045 
00046   virtual void                        initialize( CAM_Application* );
00047   virtual QString                     engineIOR() const;
00048   virtual void                        windows( QMap<int, int>& mappa ) const;
00049   
00050   virtual bool                        OnGUIEvent(int theCommandID);
00051   virtual bool                        OnKeyPress(QKeyEvent* pe, SUIT_ViewWindow* );
00052   virtual bool                        OnMousePress(QMouseEvent* pe, SUIT_ViewWindow* );
00053   virtual bool                        OnMouseMove(QMouseEvent* pe, SUIT_ViewWindow* );
00054 
00055   void createMedAction( const int, const QString&, const QString& = "" );
00056 
00057   //virtual void                        contextMenuPopup( const QString&, QMenu*, QString& );
00058 
00059   //virtual bool SetSettings       ();
00060   //virtual bool CustomPopup       ( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
00061   //                                 const QString & theParent, const QString & theObject );
00062   //virtual void DefinePopup       ( QString & theContext, QString & theParent, QString & theObject );
00063   //virtual bool ActiveStudyChanged( QAD_Desktop* parent );
00064 
00065   /*static*/ SALOME_MED::MED_Gen_ptr InitMedGen() const;
00066 
00067   static bool DumpMesh( SALOME_MED::MESH_var aMesh );
00068   static bool DumpSubMesh( SALOME_MED::FAMILY_var Fam ) ;
00069 
00070   static void setOrb();
00071 
00072   void EmitSignalCloseAllDialogs();
00073 
00074 signals :
00075   void                        SignalCloseAllDialogs();
00076 
00077 public slots:
00078   virtual bool                deactivateModule( SUIT_Study* );
00079   virtual bool                activateModule( SUIT_Study* );
00080 
00081 protected:
00082   MEDGUIDataBaseDockWidget *_data_base;
00083 
00084 private slots:
00085   void onGUIEvent();
00086   void onWindowActivated( SUIT_ViewWindow* );
00087 
00088 };
00089 
00090 #endif