1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : VISU_Evolution.h
21 // Author : Oleg UVAROV
24 #ifndef VISU_EVOLUTION_H
25 #define VISU_EVOLUTION_H
27 #include "VISUConfig.hh"
29 #include <VISU_ConvertorDef_impl.hxx>
30 #include <SALOMEDSClient_Study.hxx>
40 class Plot2d_ViewFrame;
49 typedef QMap< vtkIdType, vtkFloatingPointType > Comp2Value;
50 typedef QMapIterator< vtkIdType, vtkFloatingPointType > Comp2ValueIterator;
52 typedef QMap< vtkIdType, Comp2Value > Elem2Comp2Value;
53 typedef QMapIterator< vtkIdType, Comp2Value > Elem2Comp2ValueIterator;
55 typedef QPair< double, std::string > TimeStampData;
56 typedef QList< TimeStampData > TimeStampDataList;
57 typedef QListIterator< TimeStampData > TimeStampDataListIterator;
59 typedef QPair< QString, QString > ComponentData;
60 typedef QList< ComponentData > ComponentDataList;
61 typedef QListIterator< ComponentData > ComponentDataListIterator;
63 typedef QList< vtkFloatingPointType > TimeStampValueList;
64 typedef QListIterator< vtkFloatingPointType > TimeStampValueListIterator;
67 class VISU_I_EXPORT VISU_Evolution
70 bool _showEvolution();
73 VISU_Evolution( _PTR(Study) theStudy,
74 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
77 virtual VISU::VISUType GetType() { return VISU::TNONE; }
79 _PTR(Study) getStudy() const { return myStudy; }
81 bool setField( _PTR(SObject) theField );
82 bool setField( SALOMEDS::SObject_ptr theField );
84 int getNbPoints() const;
86 void setPointId( int thePointId );
87 int getPointId() const { return myPointId; }
89 void setComponentId( int theComponentId );
90 int getComponentId() const { return myComponentId; }
94 void setViewer( Plot2d_ViewFrame* theView ) { myView = theView; }
95 Plot2d_ViewFrame* getViewer() const { return myView; }
97 VISU::Result_i* getResult() const { return myResult; }
98 const VISU::PFieldImpl& getField() const { return myFieldImpl; }
100 std::string getFieldEntry() const { return myFieldEntry; }
101 std::string getEvolutionEntry() const { return myEvolutionEntry; }
102 std::string getMeshName() const { return myMeshName; }
103 VISU::TEntity getEntity() const { return myEntity; }
104 std::string getFieldName() const { return myFieldName; }
106 const VISU::TimeStampDataList& getTimeStampDataList() const { return myTimeStampDataList; }
107 const VISU::ComponentDataList& getComponentDataList() const { return myComponentDataList; }
109 void restoreFromStudy( SALOMEDS::SObject_ptr theObj );
110 void restoreFromStudy( _PTR(SObject) theObj );
113 bool extractData( int thePointId,
115 VISU::TimeStampValueList& theTimeStampValueList );
119 _PTR(SObject) myField;
124 Plot2d_ViewFrame* myView;
126 VISU::Result_i* myResult;
127 VISU::PFieldImpl myFieldImpl;
129 std::string myFieldEntry;
130 std::string myEvolutionEntry;
131 std::string myMeshName;
132 VISU::TEntity myEntity;
133 std::string myFieldName;
135 VISU::TimeStampDataList myTimeStampDataList;
136 VISU::ComponentDataList myComponentDataList;
140 class VISU_I_EXPORT VISU_Evolution_i: public virtual POA_VISU::Evolution,
141 public virtual VISU::Base_i
143 VISU_Evolution* myEngine;
145 VISU_Evolution_i( SALOMEDS::Study_ptr theStudy,
146 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
149 virtual VISU::VISUType GetType() { return VISU::TEVOLUTION; }
151 virtual bool setField(SALOMEDS::SObject_ptr theField);
153 virtual void setPointId(CORBA::Long thePointId);
155 virtual void setComponentId(CORBA::Long theComponentId);
157 virtual CORBA::Boolean showEvolution();
159 virtual void restoreFromStudy(SALOMEDS::SObject_ptr theField);
162 #endif //VISU_EVOLUTION_H