1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef STD_MESHERS_GUI_DISTR_PREVIEW_HEADER
22 #define STD_MESHERS_GUI_DISTR_PREVIEW_HEADER
24 #include "SMESH_StdMeshersGUI.hxx"
27 #include <SALOMEconfig.h>
28 #include CORBA_SERVER_HEADER(SMESH_Mesh)
29 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
30 #include <ExprIntrp_GenExp.hxx>
31 #include <Expr_Array1OfNamedUnknown.hxx>
32 #include <TColStd_Array1OfReal.hxx>
34 class STDMESHERSGUI_EXPORT StdMeshersGUI_DistrPreview : public QwtPlot
39 typedef enum { EXPONENT, CUT_NEGATIVE } Conversion;
41 StdMeshersGUI_DistrPreview( QWidget*, StdMeshers::StdMeshers_NumberOfSegments_ptr );
42 virtual ~StdMeshersGUI_DistrPreview();
44 QString function() const;
45 bool isTableFunc() const;
46 void tableFunc( SMESH::double_array& ) const;
47 int pointsCount() const;
51 bool setParams( const QString&, const int, const int = 50, const bool = true );
52 bool setParams( const SMESH::double_array&, const int, const bool = true );
53 void setConversion( Conversion, const bool = true );
56 virtual bool init( const QString& );
57 virtual double funcValue( const double, bool& );
58 virtual bool createTable( SMESH::double_array& );
59 virtual bool convert( double& ) const;
68 int myPoints, myNbSeg;
71 SMESH::double_array myTableFunc;
72 long myDensity, myDistr, myMsg;
73 Handle(ExprIntrp_GenExp) myExpr;
74 Expr_Array1OfNamedUnknown myVars;
75 TColStd_Array1OfReal myValues;
77 StdMeshers::StdMeshers_NumberOfSegments_var myHypo;