Salome HOME
Added a method to disable waiting cursor in the preview operation
[modules/geom.git] / src / GEOMBase / GEOMBase_Helper.h
index 4faf7b88c163c569b073fffa7d00cdf58dec98e9..cb4c9f4158bdc7f86e4a60eafeeaa6ab7115dcd6 100755 (executable)
@@ -1,23 +1,23 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  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-2007  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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 // GEOM GEOMGUI : GUI for Geometry component
@@ -72,7 +72,8 @@ protected:
   void redisplay       ( const ObjectList&, const bool = true, const bool = true );
   void redisplay       ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true );
 
-  virtual void displayPreview ( const bool   activate = false, 
+  virtual void displayPreview ( const bool   display,
+                                const bool   activate = false, 
                                 const bool   update = true,
                                 const bool   toRemoveFromEngine = true,
                                 const double lineWidth = -1, 
@@ -104,7 +105,7 @@ protected:
   void prepareSelection( const ObjectList&, const int );
   void prepareSelection( GEOM::GEOM_Object_ptr, const int );
 
-  void addInStudy      ( GEOM::GEOM_Object_ptr, const char* theName ); 
+  QString addInStudy   ( GEOM::GEOM_Object_ptr, const char* theName ); 
 
   bool openCommand     ();
   bool abortCommand    ();
@@ -181,6 +182,15 @@ protected:
   GEOM_Displayer*             getDisplayer();
   SUIT_Desktop*               getDesktop() const;
 
+  virtual void                setIsApplyAndClose( const bool theFlag );
+  virtual bool                isApplyAndClose() const;
+
+  virtual void                setIsOptimizedBrowsing( const bool theFlag );
+  virtual bool                isOptimizedBrowsing() const;
+  
+  virtual void                setIsWaitCursorEnabled( const bool theFlag ) {myIsWaitCursorEnabled = theFlag;}
+  virtual bool                isWaitCursorEnabled() const {return myIsWaitCursorEnabled ;}
+
 private:
   QString                     getEntry( GEOM::GEOM_Object_ptr ) const;
   void                        clearShapeBuffer( GEOM::GEOM_Object_ptr );
@@ -197,6 +207,9 @@ private:
   bool                        isPreview;
   SALOME_ListIO               mySelected;
   SUIT_Desktop*               myDesktop;
+  bool                        myIsApplyAndClose;
+  bool                        myIsOptimizedBrowsing;
+  bool                        myIsWaitCursorEnabled;
 
 };