Back to index

salome-smesh  6.5.0
SMESH_ActorUtils.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 #ifndef SMESH_ACTORUTILS_H
00024 #define SMESH_ACTORUTILS_H
00025 
00026 #include "SMESH_Object.h"
00027 #include <map>
00028 
00029 #include <QColor>
00030 
00031 class vtkUnstructuredGrid;
00032 class SMESH_Actor;
00033 
00034 namespace SMESH
00035 {
00036 SMESHOBJECT_EXPORT  
00037   vtkFloatingPointType 
00038   GetFloat( const QString& theValue, 
00039             vtkFloatingPointType theDefault = 0 );
00040 
00041 SMESHOBJECT_EXPORT
00042   vtkFloatingPointType 
00043   GetFloat( const QString& theName, 
00044             const QString& theSection, 
00045             vtkFloatingPointType theDefault = 0 );
00046 
00047 SMESHOBJECT_EXPORT
00048   QColor 
00049   GetColor( const QString& theSect, 
00050             const QString& theName, 
00051             const QColor& = QColor() );
00052 
00053 SMESHOBJECT_EXPORT
00054   void
00055   GetColor( const QString& theSect, 
00056             const QString& theName, 
00057             int&, 
00058             int&, 
00059             int&, 
00060             const QColor& = QColor() );
00061 
00062 SMESHOBJECT_EXPORT
00063   void
00064   GetColor( const QString& theSect, 
00065             const QString& theName, 
00066             vtkFloatingPointType&, 
00067             vtkFloatingPointType&, 
00068             vtkFloatingPointType&, 
00069             const QColor& = QColor() );
00070 
00071  SMESHOBJECT_EXPORT
00072    void
00073    GetColor(  const QString& theSect, 
00074              const QString& theName, 
00075              QColor& color,
00076              int& delta,
00077              QString def);
00078    
00079  SMESHOBJECT_EXPORT
00080    std::map<SMDSAbs_ElementType,int>
00081    GetEntitiesFromObject(SMESH_VisualObj *theObject);
00082    
00083 SMESHOBJECT_EXPORT
00084   void 
00085   WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, 
00086                         const char* theFileName);
00087 
00088 
00089 #ifndef DISABLE_PLOT2DVIEWER
00090  
00091  typedef enum {UpdateIn2dViewer = 0, RemoveFrom2dViewer } Viewer2dActionType;
00092  
00093  SMESHOBJECT_EXPORT
00094    void ProcessIn2DViewers( SMESH_Actor* theActor, Viewer2dActionType = UpdateIn2dViewer );
00095  
00096 #endif
00097 
00098 
00099 }
00100 
00101 #endif