Version: 9.16.0
StdMeshersGUI_DistrPreview.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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, or (at your option) any later version.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// File : StdMeshersGUI_DistrPreview.h
24// Author : Open CASCADE S.A.S.
25//
26#ifndef STDMESHERSGUI_DISTRPREVIEW_H
27#define STDMESHERSGUI_DISTRPREVIEW_H
28
29// SMESH includes
31
32// Qwt includes
33#include <qwt_plot.h>
34
35// IDL includes
36#include <SALOMEconfig.h>
37#include CORBA_SERVER_HEADER(SMESH_Mesh)
38#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
39
40// OCCT includes
41#include <ExprIntrp_GenExp.hxx>
42#include <Expr_Array1OfNamedUnknown.hxx>
43#include <TColStd_Array1OfReal.hxx>
44
45class QwtPlotCurve;
46class QwtPlotMarker;
47
49{
50 Q_OBJECT
51
52public:
53 typedef enum { EXPONENT, CUT_NEGATIVE } Conversion;
54
55 StdMeshersGUI_DistrPreview( QWidget*, StdMeshers::StdMeshers_NumberOfSegments_ptr );
57
58 QString function() const;
59 bool isTableFunc() const;
60 void tableFunc( SMESH::double_array& ) const;
61 int pointsCount() const;
62 int nbSeg() const;
63 bool isDone() const;
64
65 bool setParams( const QString&, const int, const int = 50, const bool = true );
66 bool setParams( const SMESH::double_array&, const int, const bool = true );
67 void setConversion( Conversion, const bool = true );
68
69protected:
70 virtual bool init( const QString& );
71 virtual double funcValue( const double, bool& );
72 virtual bool createTable( SMESH::double_array& );
73 virtual bool convert( double& ) const;
74 void update();
75
76private:
77 double calc( bool& );
78 void showError();
79
80private:
81 QString myFunction;
82 int myPoints, myNbSeg;
86 QwtPlotCurve* myDensity;
87 QwtPlotCurve* myDistr;
88 QwtPlotMarker* myMsg;
89 Handle(ExprIntrp_GenExp) myExpr;
90 Expr_Array1OfNamedUnknown myVars;
91 TColStd_Array1OfReal myValues;
93 StdMeshers::StdMeshers_NumberOfSegments_var myHypo;
94};
95
96#endif // STDMESHERSGUI_DISTRPREVIEW_H
#define STDMESHERSGUI_EXPORT
Definition: SMESH_StdMeshersGUI.hxx:36
Definition: StdMeshersGUI_DistrPreview.h:49
bool myIsTable
Definition: StdMeshersGUI_DistrPreview.h:83
QString myFunction
Definition: StdMeshersGUI_DistrPreview.h:81
SMESH::double_array myTableFunc
Definition: StdMeshersGUI_DistrPreview.h:85
bool myIsDone
Definition: StdMeshersGUI_DistrPreview.h:92
QwtPlotCurve * myDistr
Definition: StdMeshersGUI_DistrPreview.h:87
Handle(ExprIntrp_GenExp) myExpr
QwtPlotCurve * myDensity
Definition: StdMeshersGUI_DistrPreview.h:86
int myNbSeg
Definition: StdMeshersGUI_DistrPreview.h:82
Conversion
Definition: StdMeshersGUI_DistrPreview.h:53
TColStd_Array1OfReal myValues
Definition: StdMeshersGUI_DistrPreview.h:91
QwtPlotMarker * myMsg
Definition: StdMeshersGUI_DistrPreview.h:88
StdMeshers::StdMeshers_NumberOfSegments_var myHypo
Definition: StdMeshersGUI_DistrPreview.h:93
Expr_Array1OfNamedUnknown myVars
Definition: StdMeshersGUI_DistrPreview.h:90
Conversion myConv
Definition: StdMeshersGUI_DistrPreview.h:84
sequence< double > double_array
Definition: SMESH_Mesh.idl:43