]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
update() and updateControls() methods added
authorsln <sln@opencascade.com>
Fri, 1 Jul 2005 08:25:10 +0000 (08:25 +0000)
committersln <sln@opencascade.com>
Fri, 1 Jul 2005 08:25:10 +0000 (08:25 +0000)
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI.h

index 55224d1596ab7362da5ab9c1b50aaec7a9557e71..b1ac0aa3c6f8d95b96d5c7d5b820452dba6d8d85 100644 (file)
 #include "SalomeApp_Preferences.h"
 #include "SalomeApp_VTKSelector.h"
 #include "SalomeApp_Operation.h"
+#include "SalomeApp_UpdateFlags.h"
 
 #include "SalomeApp_ImportOperation.h"
 
@@ -3277,9 +3278,26 @@ SalomeApp_Operation* SMESHGUI::getOperation( const int theId )
   return anOp;
 }
 
+//=======================================================================
+// function : update
+// purpose  : Update something
+//=======================================================================
+void SMESHGUI::update( const int flags )
+{
+  if ( flags & UF_Viewer | flag & UF_Forced )
+    SMESH::UpdateView();
+  else
+    SalomeApp_Module::update( flags );
+}
 
-
-
+//=======================================================================
+// function : updateControls
+// purpose  : Update state of controls
+//=======================================================================
+void SMESHGUI::updateControls()
+{
+  // to do
+}
 
 
 
index 2c9680017dd277903451f0ff7ba478fb8da04b3e..eb04e5d745e4dd23e3023f7a7a6c226e331b85da 100644 (file)
@@ -60,71 +60,83 @@ class SMESHGUI : public SalomeApp_Module
 
 public :
   SMESHGUI();
-  ~SMESHGUI();
+  virtual ~SMESHGUI();
 
-  static SMESH::SMESH_Gen_var     GetSMESHGen();
-  static SMESHGUI*                GetSMESHGUI();
-  static SalomeApp_SelectionMgr*  selectionMgr();
-  static SUIT_ResourceMgr*        resourceMgr();
-  static SUIT_Desktop*            desktop() ;
-  static SalomeApp_Study*         activeStudy();
-  bool                            isActiveStudyLocked();
+  static SMESH::SMESH_Gen_var       GetSMESHGen();
+  static SMESHGUI*                  GetSMESHGUI();
+  static SalomeApp_SelectionMgr*    selectionMgr();
+  static SUIT_ResourceMgr*          resourceMgr();
+  static SUIT_Desktop*              desktop();
+  static SalomeApp_Study*           activeStudy();
+  bool                              isActiveStudyLocked();
 
-  static bool                     automaticUpdate();
+  static bool                       automaticUpdate();
 
-  virtual QString     engineIOR() const;
-  virtual void        initialize( CAM_Application* );
-  virtual void        windows( QMap<int, int>& ) const;
-  virtual void        viewManagers( QStringList& ) const;
+  virtual QString                   engineIOR() const;
+  virtual void                      initialize( CAM_Application* );
+  virtual void                      windows( QMap<int, int>& ) const;
+  virtual void                      viewManagers( QStringList& ) const;
 
-  QDialog*            GetActiveDialogBox() ;
-  void                SetActiveDialogBox(QDialog* aDlg) ;
+  QDialog*                          GetActiveDialogBox();
+  void                              SetActiveDialogBox(QDialog* aDlg);
 
-  void                ResetState() ;
-  void                SetState(int aState) ;
-  bool                DefineDlgPosition(QWidget* aDlg, int& x, int& y) ;
+  void                              ResetState();
+  void                              SetState( int aState );
+  bool                              DefineDlgPosition( QWidget* aDlg, int& x, int& y);
 
-  virtual bool OnGUIEvent        ( int id );
-  virtual bool OnMousePress      ( QMouseEvent*, SUIT_ViewWindow* );
-  virtual bool OnMouseMove       ( QMouseEvent*, SUIT_ViewWindow* );
-  virtual bool OnKeyPress        ( QKeyEvent*, SUIT_ViewWindow* );
+  virtual bool                      OnGUIEvent( int id );
+  virtual bool                      OnMousePress( QMouseEvent*, SUIT_ViewWindow* );
+  virtual bool                      OnMouseMove( QMouseEvent*, SUIT_ViewWindow* );
+  virtual bool                      OnKeyPress( QKeyEvent*, SUIT_ViewWindow* );
 
-  virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
+  virtual void                      contextMenuPopup( const QString&, QPopupMenu*, QString& );
 
-  virtual bool SetSettings       ( SUIT_Desktop* );
-  virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)&,
-                                   SUIT_ViewWindow* = 0 );
+  virtual bool                      SetSettings( SUIT_Desktop* );
+  virtual void                      BuildPresentation( const Handle(SALOME_InteractiveObject)&,
+                                                       SUIT_ViewWindow* = 0 );
 
   /* Non modal dialog boxes management */
-  void EmitSignalDeactivateDialog() ;
-  void EmitSignalStudyFrameChanged() ;
-  void EmitSignalCloseAllDialogs() ;
+  void                              EmitSignalDeactivateDialog();
+  void                              EmitSignalStudyFrameChanged();
+  void                              EmitSignalCloseAllDialogs();
 
-  virtual void                createPreferences();
-  virtual void                preferencesChanged( const QString&, const QString& );
+  virtual void                      createPreferences();
+  virtual void                      preferencesChanged( const QString&, const QString& );
+
+  virtual void                      update( const int );
 
 public slots:
-  virtual bool                deactivateModule( SUIT_Study* );
-  virtual bool                activateModule( SUIT_Study* );
+
+  virtual bool                      deactivateModule( SUIT_Study* );
+  virtual bool                      activateModule( SUIT_Study* );
 
 private slots:
-  void OnGUIEvent();
-  void onViewManagerAdded( SUIT_ViewManager* );
-  void onOperationCommited( SUIT_Operation* );
-  void onOperationAborted( SUIT_Operation* );
+
+  void                              OnGUIEvent();
+  void                              onViewManagerAdded( SUIT_ViewManager* );
+  void                              onOperationCommited( SUIT_Operation* );
+  void                              onOperationAborted( SUIT_Operation* );
 
 signals:
-  void SignalDeactivateActiveDialog() ;
-  void SignalStudyFrameChanged() ;
-  void SignalCloseAllDialogs() ;
+  void                              SignalDeactivateActiveDialog();
+  void                              SignalStudyFrameChanged();
+  void                              SignalCloseAllDialogs();
 
 protected:
-  void createSMESHAction( const int, const QString&, const QString& = QString(""),
-                          const int = 0, const bool = false );
-  void createPopupItem( const int, const QString&, const QString&,
-                        const QString& = QString::null, const int = -1 );
+
+  void                              createSMESHAction( const int,
+                                                       const QString&,
+                                                       const QString& = "",
+                                                       const int = 0,
+                                                       const bool = false );
+  void                              createPopupItem( const int,
+                                                     const QString&,
+                                                     const QString&,
+                                                     const QString& = QString::null,
+                                                     const int = -1 );
 
   SalomeApp_Operation*             getOperation( const int );
+  virtual void                     updateControls();
 
 private :
   static SMESH::SMESH_Gen_var      myComponentSMESH;