Salome HOME
0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.h
index c99de05d20cb84cd1a3cc098313d8d3047dc0467..51781c5a7c21eed7a7a2169a424b414738696929 100644 (file)
@@ -1,34 +1,35 @@
-//  SMESH SMESHGUI : GUI for SMESH component
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 //  Lesser General Public License for more details.
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
 //
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+//  SMESH SMESHGUI : GUI for SMESH component
 //  File   : SMESHGUI.h
 //  Author : Nicolas REJNERI
 //  Module : SMESH
 //  $Header$
-
+//
 #ifndef SMESHGUI_HeaderFile
 #define SMESHGUI_HeaderFile
 
+#include "SMESH_SMESHGUI.hxx"
+
 // SALOME Includes
 #include <SalomeApp_Module.h>
 #include <SALOME_InteractiveObject.hxx>
@@ -44,15 +45,18 @@ class SUIT_ViewWindow;
 class SUIT_ResourceMgr;
 class SUIT_ViewManager;
 
+class LightApp_Operation;
 class SalomeApp_Study;
-class SalomeApp_SelectionMgr;
+class LightApp_SelectionMgr;
+
+class SMESHGUI_FilterLibraryDlg;
 
 
 //=================================================================================
 // class    : SMESHGUI
 // purpose  :
 //=================================================================================
-class SMESHGUI : public SalomeApp_Module
+class SMESHGUI_EXPORT SMESHGUI : public SalomeApp_Module
 {
   Q_OBJECT;
 
@@ -62,12 +66,15 @@ public :
 
   static SMESH::SMESH_Gen_var     GetSMESHGen();
   static SMESHGUI*                GetSMESHGUI();
-  static SalomeApp_SelectionMgr*  selectionMgr();
+  static LightApp_SelectionMgr*   selectionMgr();
   static SUIT_ResourceMgr*        resourceMgr();
   static SUIT_Desktop*            desktop() ;
   static SalomeApp_Study*         activeStudy();
   bool                            isActiveStudyLocked();
 
+  static bool                     automaticUpdate();
+
+  virtual LightApp_Displayer*     displayer();
   virtual QString     engineIOR() const;
   virtual void        initialize( CAM_Application* );
   virtual void        windows( QMap<int, int>& ) const;
@@ -79,6 +86,7 @@ public :
   void                ResetState() ;
   void                SetState(int aState) ;
   bool                DefineDlgPosition(QWidget* aDlg, int& x, int& y) ;
+  void                switchToOperation(int id) ;
 
   virtual bool OnGUIEvent        ( int id );
   virtual bool OnMousePress      ( QMouseEvent*, SUIT_ViewWindow* );
@@ -87,7 +95,6 @@ public :
 
   virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
 
-  virtual bool SetSettings       ( SUIT_Desktop* );
   virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)&,
                                    SUIT_ViewWindow* = 0 );
 
@@ -96,12 +103,24 @@ public :
   void EmitSignalStudyFrameChanged() ;
   void EmitSignalCloseAllDialogs() ;
 
+  virtual void                createPreferences();
+  virtual void                preferencesChanged( const QString&, const QString& );
+  
+  virtual void                update( const int );
+
+  static SALOMEDS::Color      getUniqueColor( const QValueList<SALOMEDS::Color>& );
+
 public slots:
   virtual bool                deactivateModule( SUIT_Study* );
   virtual bool                activateModule( SUIT_Study* );
+  virtual void                studyClosed( SUIT_Study* );
 
 private slots:
-  void OnGUIEvent();
+  void                        OnGUIEvent();
+  void                        onViewManagerActivated( SUIT_ViewManager* );
+  void                        onOperationCommited( SUIT_Operation* );
+  void                        onOperationAborted( SUIT_Operation* );
+
 
 signals:
   void SignalDeactivateActiveDialog() ;
@@ -113,14 +132,22 @@ protected:
                           const int = 0, const bool = false );
   void createPopupItem( const int, const QString&, const QString&,
                         const QString& = QString::null, const int = -1 );
+  
+  virtual LightApp_Operation*      createOperation( const int ) const;
+
+  virtual bool                     isSelectionCompatible();
+
+private:
+  void OnEditDelete();
 
 private :
   static SMESH::SMESH_Gen_var      myComponentSMESH;
   QDialog*                         myActiveDialogBox;
   int                              myState;
-  bool                             myAutomaticUpdate;
   QMap<int,QString>                myRules;
-};
+  LightApp_Displayer*              myDisplayer;
 
+  SMESHGUI_FilterLibraryDlg*       myFilterLibraryDlg;
+};
 
 #endif