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