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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
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 theUpdateScalar=true);
68 int getCurrentScalarFieldNamePos();
69 QString getCurrentScalarFieldName();
70 int getCurrentScalarNbIterations();
71 VISU::TEntity getCurrentScalarEntity();
72 void SetScalarField(int theIter,QString theFieldName=QString(""));
79 void onFieldChanged(int i=0);
80 void onTimeStampChanged(int i=0);
83 QtxDblSpinBox* ScalFact;
84 VisuGUI_ScalarBarPane* myScalarPane;
85 QComboBox *myFieldsCombo;
86 QComboBox *myTimeStampsCombo;
88 typedef std::map<int,float> TTL; // Times map definition (iteration time, real value of time)
89 typedef std::pair<QString,VISU::TEntity> TFE; // pair field name and entity
90 typedef std::map<TFE,TTL> TFT; // Field name and enity to Times
91 typedef std::map<QString,TFT> TMF; // Mesh to fields map
93 TMF myMeshFieldsTimes;
94 QString myCurrMeshName;
96 _PTR(SObject) mySelectionObj;
97 VISU::ScalarMapOnDeformedShape_i* myPrs;
98 SalomeApp_Module* myVisuGUI;
101 void UpdateScalarField();
102 void SetScalarField();
103 void AddAllFieldNames();
104 void AddAllTimes(const QString& theFieldName);
105 float GetFloatValueOfTimeStamp(const char* theMeshName,
106 const char* theFieldName,
107 const int theIteration,
108 const VISU::TEntity theEntity);
111 #endif // VISUGUI_DEFORMEDSHAPEDLS_H