1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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
22 // VISU VISUGUI : GUI of VISU component
23 // File : VisuGUI_DeformedShapeAndScalarMapDlg.h
24 // Author : Eugeny Nikolaev
27 #ifndef VISUGUI_DEFORMEDSHAPEANDSCALARMAPDLS_H
28 #define VISUGUI_DEFORMEDSHAPEANDSCALARMAPDLS_H
30 #include "VisuGUI_Prs3dDlg.h"
32 #include "VISUConfig.hh"
39 class SalomeApp_Module;
40 class VisuGUI_InputPane;
41 class QtxDoubleSpinBox;
47 class DeformedShapeAndScalarMap_i;
50 class VisuGUI_DeformedShapeAndScalarMapDlg : public VisuGUI_ScalarBarBaseDlg
55 VisuGUI_DeformedShapeAndScalarMapDlg (SalomeApp_Module* theModule);
56 ~VisuGUI_DeformedShapeAndScalarMapDlg();
58 double getFactor() const;
59 void setFactor(double theFactor);
61 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
64 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
66 int getCurrentScalarFieldNamePos();
67 QString getCurrentScalarFieldName();
68 int getCurrentScalarNbIterations();
69 VISU::Entity getCurrentScalarEntity();
70 void SetScalarField(int theIter,QString theFieldName=QString(""), const bool = true );
73 virtual QString GetContextHelpFilePath();
80 void onFieldChanged(int i=0);
81 void onTimeStampChanged(int i=0);
84 QtxDoubleSpinBox* ScalFact;
86 VisuGUI_ScalarBarPane* myScalarPane;
87 VisuGUI_InputPane* myInputPane;
88 QComboBox *myFieldsCombo;
89 QComboBox *myTimeStampsCombo;
91 typedef std::map<int, QString> TTimeStampNumber2Time; // Times map definition (iteration time, real value of time)
92 typedef std::map<QString, TTimeStampNumber2Time> TFieldName2TimeStamps; // Field name and enity to Times
93 typedef std::map<VISU::Entity, TFieldName2TimeStamps> TEntity2Fields; // Mesh to fields map
95 TEntity2Fields myEntity2Fields;
99 std::vector<int> myTimeStampID;
101 _PTR(SObject) mySelectionObj;
102 SALOME::GenericObjPtr<VISU::DeformedShapeAndScalarMap_i> myPrsCopy;
103 SalomeApp_Module* myVisuGUI;
106 void UpdateScalarField();
107 void SetScalarField( const bool = true );
108 void AddAllFieldNames();
109 void AddAllTimes(const QString& theFieldName);
110 QString GetFloatValueOfTimeStamp(VISU::Entity theEntity,
111 const std::string& theFieldName,
112 int theTimeStampNumber);
115 #endif // VISUGUI_DEFORMEDSHAPEDLS_H