1 // SMESH StdMeshersGUI : GUI for standard meshers
3 // Copyright (C) 2003 CEA
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
23 // File : StdMeshersGUI_Parameters.h
27 #ifndef STDMESHERSGUI_PARAMETERS_H
28 #define STDMESHERSGUI_PARAMETERS_H
30 #include <SALOMEconfig.h>
31 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
32 #include CORBA_SERVER_HEADER(SMESH_Mesh)
34 #include "SMESHGUI_aParameter.h"
39 class StdMeshersGUI_Parameters
42 static bool HasParameters (const QString& hypType);
44 static void GetParameters (const QString& hypType,
45 std::list<SMESHGUI_aParameterPtr> & params );
47 static void GetParameters (SMESH::SMESH_Hypothesis_ptr hyp,
48 std::list<SMESHGUI_aParameterPtr> & params );
49 static void GetParameters (SMESH::SMESH_Hypothesis_ptr hyp,
50 const std::list<SMESHGUI_aParameterPtr> & paramList,
53 static bool SetParameters(SMESH::SMESH_Hypothesis_ptr hyp,
54 const std::list<SMESHGUI_aParameterPtr> & params );
56 static void SetInitValue(SMESHGUI_aParameterPtr param,
58 static void SetInitValue(SMESHGUI_aParameterPtr param,
60 static void SetInitValue(SMESHGUI_aParameterPtr param,
61 const char* initValue);
62 static void SetInitValue(SMESHGUI_aParameterPtr param,
63 SMESH::double_array& initValue);
67 * \brief This class provides double parameter with slider control
69 class StdMeshersGUI_doubleSliderParameter: public SMESHGUI_doubleParameter
72 StdMeshersGUI_doubleSliderParameter(const QString& label = QString::null,
73 const QString& leftLabel = QString::null,
74 const QString& rightLabel = QString::null,
75 const double initValue = 0.0,
76 const double bottom = 0,
78 const double precision = 0.1);
79 virtual QWidget* CreateWidget( QWidget* ) const;
80 virtual void InitializeWidget( QWidget* ) const;
81 virtual void TakeValue( QWidget* );
82 int toInt( double val ) const;
84 QString _leftLabel, _rightLabel;