Salome HOME
#include SMESH_MeshEditor.hxx via SMESH_MesherHelper.hxx
[modules/smesh.git] / src / SMESHFiltersSelection / SMESH_LogicalFilter.hxx
index ec10f865b062eb2781fb3cefdd6962ed25e862d6..928313f80507414d1fbbb8f94259f8232470adf1 100644 (file)
-//  SALOME SALOMEGUI : implementation of desktop and GUI kernel
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  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-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 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   : SMESH_LogicalFilter.hxx
-//  Author : Sergey LITONIN
 //  Module : SMESH
-
+//
 #ifndef _SMESH_LogicalFilter_HeaderFile
 #define _SMESH_LogicalFilter_HeaderFile
 
-#include "SALOME_Filter.hxx"
-
-#include <Standard_DefineHandle.hxx>
-#include <NCollection_StdBase.hxx>
-#include <NCollection_DefineList.hxx>
+#include "SMESH_Type.h"
 
-DEFINE_STANDARD_HANDLE( SMESH_LogicalFilter, SALOME_Filter )
+#include <SUIT_SelectionFilter.h>
 
-DEFINE_BASECOLLECTION( SMESH_FilterColl, Handle(SALOME_Filter) )
-DEFINE_LIST( SMESH_ListOfFilter, SMESH_FilterColl, Handle(SALOME_Filter) )
+#include <QList>
 
-
-/*
-  Class       : SMESH_LogicalFilter
-  Description : Filter for combaining several filters with logical operation (OR or AND)
-*/
-
-class SMESH_LogicalFilter : public SALOME_Filter
+class SMESHFILTERSSELECTION_EXPORT SMESH_LogicalFilter : public SUIT_SelectionFilter
 {
-public:
-
-  enum { LO_OR, LO_AND, LO_UNDEFINED };
-
-public:
-
-                              SMESH_LogicalFilter( const SMESH_ListOfFilter&, const int  );
+ public:
+  enum { LO_OR, LO_AND, LO_NOT, LO_UNDEFINED };
 
+ public:
+  SMESH_LogicalFilter( const QList<SUIT_SelectionFilter*>&, const int );
+  virtual ~SMESH_LogicalFilter();
 
-  virtual                     ~SMESH_LogicalFilter();
-  virtual                     Standard_Boolean IsOk( const Handle(SALOME_InteractiveObject)& ) const;
+  virtual bool isOk (const SUIT_DataOwner*) const;
 
-  void                        SetFilters( const SMESH_ListOfFilter& );
-  void                        SetLogOp( const int );
-  const SMESH_ListOfFilter&    GetFilters() const;
-  int                         GetLogOp() const;
+  void                                 setFilters (const QList<SUIT_SelectionFilter*>&);
+  void                                 setOperation (const int);
+  const QList<SUIT_SelectionFilter*>   getFilters() const;
+  int                                  getOperation() const;
 
 private:
-
-  SMESH_ListOfFilter           myFilters;
-  int                         myLogOp;
-
-public:
-  DEFINE_STANDARD_RTTI( SMESH_LogicalFilter )
+  QList<SUIT_SelectionFilter*>  myFilters;
+  int                           myOperation;
 };
 
 #endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-