Back to index

salome-smesh  6.5.0
SMESHGUI_Selection.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // SMESH SMESHGUI_Selection
00024 // File   : SMESHGUI_Selection.h
00025 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_SELECTION_H
00028 #define SMESHGUI_SELECTION_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 
00033 // SALOME GUI includes
00034 #include <LightApp_Selection.h>
00035 
00036 // SALOME KERNEL includes
00037 #include <SALOMEDSClient_definitions.hxx>
00038 
00039 class LightApp_SelectionMgr;
00040 class LightApp_DataOwner;
00041 class SALOMEDSClient_Study;
00042 class SMESH_Actor;
00043 
00044 class SMESHGUI_EXPORT SMESHGUI_Selection : public LightApp_Selection
00045 {
00046 public:
00047   SMESHGUI_Selection();
00048   virtual ~SMESHGUI_Selection();
00049 
00050   virtual void            init( const QString&, LightApp_SelectionMgr* );
00051   virtual QVariant        parameter( const int, const QString& ) const;
00052   virtual bool            processOwner( const LightApp_DataOwner* );
00053 
00054   // got from object, not from actor
00055   virtual bool            isAutoColor( int ) const;
00056   virtual int             numberOfNodes( int ) const;
00057   virtual int             dim( int ) const;
00058   virtual QVariant        isComputable( int ) const;
00059   virtual QVariant        isPreComputable( int ) const;
00060   virtual QVariant        hasReference( int ) const;
00061   virtual QVariant        isVisible( int ) const;
00062 
00063   virtual QString         quadratic2DMode(int ) const;
00064 
00065   virtual bool            isDistributionVisible(int ) const;
00066 
00067   // parameters got from actor return nothing if an actor is not visible
00068   virtual QList<QVariant> elemTypes( int ) const;
00069   virtual QList<QVariant> labeledTypes( int ) const;
00070   virtual QString         displayMode( int ) const;
00071   virtual QString         shrinkMode( int ) const;
00072   virtual QList<QVariant> entityMode( int ) const;
00073   virtual QString         controlMode( int ) const;
00074   virtual bool            isNumFunctor( int ) const;
00075   virtual QString         facesOrientationMode( int ) const;
00076   virtual QString         groupType( int ) const;
00077   
00078   SMESH_Actor*            getActor( int ) const;
00079 
00080   static int              type( const QString&, _PTR(Study) );
00081   static QString          typeName( const int );
00082 
00083   bool                    isImported( const int ) const;
00084 
00085 private:
00086   QStringList             myTypes;
00087   QList<SMESH_Actor*>     myActors;
00088 };
00089 
00090 #endif // SMESHGUI_SELECTION_H