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
25 #include <SALOMEconfig.h>
26 #include CORBA_SERVER_HEADER(SMESH_Mesh)
27 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
28 #include <ExprIntrp_GenExp.hxx>
29 #include <Expr_Array1OfNamedUnknown.hxx>
30 #include <TColStd_Array1OfReal.hxx>
32 class StdMeshersGUI_DistrPreview : public QwtPlot
37 typedef enum { EXPONENT, CUT_NEGATIVE } Conversion;
39 StdMeshersGUI_DistrPreview( QWidget*, StdMeshers::StdMeshers_NumberOfSegments_ptr );
40 virtual ~StdMeshersGUI_DistrPreview();
42 QString function() const;
43 bool isTableFunc() const;
44 void tableFunc( SMESH::double_array& ) const;
45 int pointsCount() const;
49 bool setParams( const QString&, const int, const int = 50, const bool = true );
50 bool setParams( const SMESH::double_array&, const int, const bool = true );
51 void setConversion( Conversion, const bool = true );
54 virtual bool init( const QString& );
55 virtual double funcValue( const double, bool& );
56 virtual bool createTable( SMESH::double_array& );
57 virtual bool convert( double& ) const;
66 int myPoints, myNbSeg;
69 SMESH::double_array myTableFunc;
70 long myDensity, myDistr, myMsg;
71 Handle(ExprIntrp_GenExp) myExpr;
72 Expr_Array1OfNamedUnknown myVars;
73 TColStd_Array1OfReal myValues;
75 StdMeshers::StdMeshers_NumberOfSegments_var myHypo;