-// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
-// 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.
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// 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
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// 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
//
#ifndef SUIT_SELECTIONMGR_H
#define SUIT_SELECTIONMGR_H
-#include "SUIT_Selector.h"
#include "SUIT_DataOwner.h"
-#include "SUIT_SelectionFilter.h"
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <QList>
+#include <QObject>
+
+class SUIT_Selector;
+class SUIT_SelectionFilter;
#ifdef WIN32
#pragma warning ( disable : 4251 )
virtual ~SUIT_SelectionMgr();
void clearSelected();
- virtual void selected( SUIT_DataOwnerPtrList&, const QString& = QString::null ) const;
+ virtual void selected( SUIT_DataOwnerPtrList&, const QString& = QString() ) const;
virtual void setSelected( const SUIT_DataOwnerPtrList&, const bool = false );
- void selectors( QPtrList<SUIT_Selector>& ) const;
- void selectors( const QString&, QPtrList<SUIT_Selector>& ) const;
+ void selectors( QList<SUIT_Selector*>& ) const;
+ void selectors( const QString&, QList<SUIT_Selector*>& ) const;
- void setEnabled( const bool, const QString& = QString::null );
+ void setEnabled( const bool, const QString& = QString() );
bool hasSelectionMode( const int ) const;
- void selectionModes( QValueList<int>& ) const;
+ void selectionModes( QList<int>& ) const;
void setSelectionModes( const int );
- virtual void setSelectionModes( const QValueList<int>& );
+ virtual void setSelectionModes( const QList<int>& );
void appendSelectionModes( const int );
- virtual void appendSelectionModes( const QValueList<int>& );
+ virtual void appendSelectionModes( const QList<int>& );
void removeSelectionModes( const int );
- virtual void removeSelectionModes( const QValueList<int>& );
+ virtual void removeSelectionModes( const QList<int>& );
bool isOk( const SUIT_DataOwner* ) const;
protected:
virtual void selectionChanged( SUIT_Selector* );
- typedef QPtrListIterator<SUIT_Selector> SelectorListIterator;
-
virtual void installSelector( SUIT_Selector* );
virtual void removeSelector( SUIT_Selector* );
private:
void filterOwners( const SUIT_DataOwnerPtrList&, SUIT_DataOwnerPtrList& ) const;
- typedef QPtrList<SUIT_Selector> SelectorList;
- typedef QPtrList<SUIT_SelectionFilter> SelFilterList;
- typedef QPtrListIterator<SUIT_SelectionFilter> SelFilterListIterator;
-
-protected:
- SelectorList mySelectors;
+ typedef QList<SUIT_Selector*> SelectorList;
+ typedef QList<SUIT_SelectionFilter*> SelFilterList;
private:
SelFilterList myFilters;
- QValueList<int> mySelModes;
+ QList<int> mySelModes;
+ SelectorList mySelectors;
int myIterations;
+ bool myAutoDelFilter;
bool myIsSelChangeEnabled;
friend class SUIT_Selector;