1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : VisuGUI_ScalarMapOnDeformedShapeDlg.h
25 // Author : Eugeny Nikolaev
28 #ifndef VISUGUI_SCALARMAPONDEFORMEDSHAPEDLS_H
29 #define VISUGUI_SCALARMAPONDEFORMEDSHAPEDLS_H
31 #include "VisuGUI_ScalarBarDlg.h"
33 #include "QtxDblSpinBox.h"
36 #include <qgroupbox.h>
37 #include <qcheckbox.h>
39 #include <qpushbutton.h>
43 class SalomeApp_Module;
48 class ScalarMapOnDeformedShape_i;
51 class VisuGUI_ScalarMapOnDeformedShapeDlg : public QDialog
56 VisuGUI_ScalarMapOnDeformedShapeDlg (SalomeApp_Module* theModule);
57 ~VisuGUI_ScalarMapOnDeformedShapeDlg() {};
60 { return ScalFact->value(); }
61 void setFactor(double theFactor)
62 { ScalFact->setValue(theFactor); }
65 void initFromPrsObject(VISU::ScalarMapOnDeformedShape_i* thePrs,bool isAnim=false);
66 int storeToPrsObject(VISU::ScalarMapOnDeformedShape_i* thePrs,bool theUpdateScalars=true,int theIter=1);
68 int getCurrentScalarFieldNamePos();
69 QString getCurrentScalarFieldName();
70 int getCurrentScalarNbIterations();
71 VISU::TEntity getCurrentScalarEntity();
72 void SetScalarField(int theIter,QString theFieldName=QString(""));
80 void onFieldChanged(int i=0);
81 void onTimeStampChanged(int i=0);
84 QtxDblSpinBox* ScalFact;
85 VisuGUI_ScalarBarPane* myScalarPane;
86 QComboBox *myFieldsCombo;
87 QComboBox *myTimeStampsCombo;
89 typedef std::map<int,float> TTL; // Times map definition (iteration time, real value of time)
90 typedef std::pair<QString,VISU::TEntity> TFE; // pair field name and entity
91 typedef std::map<TFE,TTL> TFT; // Field name and enity to Times
92 typedef std::map<QString,TFT> TMF; // Mesh to fields map
94 TMF myMeshFieldsTimes;
95 QString myCurrMeshName;
99 _PTR(SObject) mySelectionObj;
100 VISU::ScalarMapOnDeformedShape_i* myPrs;
101 SalomeApp_Module* myVisuGUI;
104 void UpdateScalarField();
105 void SetScalarField();
106 void AddAllFieldNames();
107 void AddAllTimes(const QString& theFieldName);
108 float GetFloatValueOfTimeStamp(const char* theMeshName,
109 const char* theFieldName,
110 const int theIteration,
111 const VISU::TEntity theEntity);
114 #endif // VISUGUI_DEFORMEDSHAPEDLS_H