Salome HOME
Bug IPAL19348 : Qt4 porting: Error message is shown after pressing of ?Filter? button...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Filter.h
index a3fcf83b3adab2e0c39c4e89c819d3fde9d12315..8fdbc5a2f5e22b474071e1a6a485187eaaa5d97d 100755 (executable)
@@ -1,65 +1,70 @@
-//  SMESHGUI_Filter : Filters for VTK viewer
+// SMESHGUI_Filter : Filters for VTK viewer
 //
-//  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 
-//  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 
+// 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 
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File   : SMESHGUI_Filter.h
+// Author : Sergey LITONIN, Open CASCADE S.A.S.
 //
-//  File   : SMESHGUI_Filter.h
-//  Author : Sergey LITONIN
-//  Module : SMESH
 
-#ifndef SMESHGUI_Filter_HeaderFile
-#define SMESHGUI_Filter_HeaderFile
+#ifndef SMESHGUI_FILTER_H
+#define SMESHGUI_FILTER_H
 
-#include "VTKViewer_Filter.h"
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
 
+// SALOME GUI includes
+#include <VTKViewer_Filter.h>
+
+// IDL includes
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Filter)
 
 class SALOME_Actor;
 
-enum SMESHGUI_FilterType
+namespace SMESH
 {
-  SMESHGUI_UnknownFilter      = -1,
-  SMESHGUI_NodeFilter         =  0,
-  SMESHGUI_EdgeFilter         =  1,
-  SMESHGUI_FaceFilter         =  2,
-  SMESHGUI_VolumeFilter       =  3,
-  SMESHGUI_AllElementsFilter  =  4,
-  SMESHGUI_QuadFilter         =  5,
-  SMESHGUI_TriaFilter         =  6
+  enum SMESHGUI_FilterType {
+    UnknownFilter      = -1,
+    NodeFilter         =  0,
+    EdgeFilter         =  1,
+    FaceFilter         =  2,
+    VolumeFilter       =  3,
+    AllElementsFilter  =  4,
+    QuadFilter         =  5,
+    TriaFilter         =  6,
+    LastFilter
+  };
 };
 
 /*
   Class       : SMESHGUI_Filter
-  Description : Base class for SMESH selection filters for VTK viewer. 
+  Description : Base class for SMESH selection filters for VTK viewer.
 */
 
 DEFINE_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter)
 
-class SMESHGUI_Filter : public VTKViewer_Filter
+class SMESHGUI_EXPORT SMESHGUI_Filter : public VTKViewer_Filter
 {
-
 public:
+  virtual bool                IsObjValid( const int ) const = 0;
 
-  virtual bool                IsObjValid( const int theObjId ) const = 0;
 public:
   DEFINE_STANDARD_RTTI(SMESHGUI_Filter)
 };
@@ -72,15 +77,14 @@ public:
 
 DEFINE_STANDARD_HANDLE(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
 
-class SMESHGUI_PredicateFilter : public SMESHGUI_Filter
+class SMESHGUI_EXPORT SMESHGUI_PredicateFilter : public SMESHGUI_Filter
 {
-
 public:
-                              SMESHGUI_PredicateFilter();
-  virtual                     ~SMESHGUI_PredicateFilter();
+  SMESHGUI_PredicateFilter();
+  virtual ~SMESHGUI_PredicateFilter();
 
-  virtual bool                IsValid( const int theCellId ) const;
-  virtual bool                IsObjValid( const int theObjId ) const;
+  virtual bool                IsValid( const int ) const;
+  virtual bool                IsObjValid( const int ) const;
   virtual int                 GetId() const;
   virtual bool                IsNodeFilter() const;
   void                        SetPredicate( SMESH::Predicate_ptr );
@@ -88,7 +92,6 @@ public:
   void                        SetActor( SALOME_Actor* );
 
 private:
-
   SMESH::Predicate_var        myPred;
 
 public:
@@ -102,15 +105,14 @@ public:
 
 DEFINE_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
 
-class SMESHGUI_QuadrangleFilter : public SMESHGUI_Filter
+class SMESHGUI_EXPORT SMESHGUI_QuadrangleFilter : public SMESHGUI_Filter
 {
-
 public:
-                              SMESHGUI_QuadrangleFilter();
-  virtual                     ~SMESHGUI_QuadrangleFilter();
+  SMESHGUI_QuadrangleFilter();
+  virtual ~SMESHGUI_QuadrangleFilter();
 
-  virtual bool                IsValid( const int theCellId ) const;
-  virtual bool                IsObjValid( const int theObjId ) const;
+  virtual bool                IsValid( const int ) const;
+  virtual bool                IsObjValid( const int ) const;
   virtual int                 GetId() const;
   virtual bool                IsNodeFilter() const;
 
@@ -125,15 +127,14 @@ public:
 
 DEFINE_STANDARD_HANDLE(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
 
-class SMESHGUI_TriangleFilter : public SMESHGUI_Filter
+class SMESHGUI_EXPORT SMESHGUI_TriangleFilter : public SMESHGUI_Filter
 {
-
 public:
-                              SMESHGUI_TriangleFilter();
-  virtual                     ~SMESHGUI_TriangleFilter();
+  SMESHGUI_TriangleFilter();
+  virtual ~SMESHGUI_TriangleFilter();
 
-  virtual bool                IsValid( const int theCellId ) const;
-  virtual bool                IsObjValid( const int theObjId ) const;
+  virtual bool                IsValid( const int ) const;
+  virtual bool                IsObjValid( const int ) const;
   virtual int                 GetId() const;
   virtual bool                IsNodeFilter() const;  
 
@@ -141,4 +142,48 @@ public:
   DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter)
 };
 
-#endif
+/*
+  Class       : SMESHGUI_FacesFilter
+  Description : Verify whether selected cell is any face
+*/
+
+DEFINE_STANDARD_HANDLE(SMESHGUI_FacesFilter, SMESHGUI_Filter)
+
+class SMESHGUI_EXPORT SMESHGUI_FacesFilter : public SMESHGUI_Filter
+{
+public:
+  SMESHGUI_FacesFilter();
+  virtual ~SMESHGUI_FacesFilter();
+
+  virtual bool                IsValid( const int ) const;
+  virtual bool                IsObjValid( const int ) const;
+  virtual int                 GetId() const;
+  virtual bool                IsNodeFilter() const;  
+
+public:
+  DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter)
+};
+
+/*
+  Class       : SMESHGUI_VolumesFilter
+  Description : Verify whether selected cell is any volume
+*/
+
+DEFINE_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
+
+class SMESHGUI_EXPORT SMESHGUI_VolumesFilter : public SMESHGUI_Filter
+{
+public:
+  SMESHGUI_VolumesFilter();
+  virtual ~SMESHGUI_VolumesFilter();
+
+  virtual bool                IsValid( const int ) const;
+  virtual bool                IsObjValid( const int ) const;
+  virtual int                 GetId() const;
+  virtual bool                IsNodeFilter() const;  
+
+public:
+  DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter)
+};
+
+#endif // SMESHGUI_FILTER_H