X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FStdMeshersGUI%2FStdMeshersGUI_Parameters.h;h=87dc7a45be3972c95e5dda39820db187f4ff6746;hb=5c933ecde0251d3c4894d0cdeab8dc67b6c4c3a5;hp=5ec4c3a71080091148e120392e864f232444d2f7;hpb=e4737e85f0da6d3f90fd08f6be1c2825195fe16f;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI_Parameters.h b/src/StdMeshersGUI/StdMeshersGUI_Parameters.h index 5ec4c3a71..87dc7a45b 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_Parameters.h +++ b/src/StdMeshersGUI/StdMeshersGUI_Parameters.h @@ -29,10 +29,12 @@ #include #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis) +#include CORBA_SERVER_HEADER(SMESH_Mesh) #include "SMESHGUI_aParameter.h" #include +#include class StdMeshersGUI_Parameters { @@ -44,11 +46,42 @@ class StdMeshersGUI_Parameters static void GetParameters (SMESH::SMESH_Hypothesis_ptr hyp, std::list & params ); - static void GetParameters (SMESH::SMESH_Hypothesis_ptr hyp, - std::list & paramList, - QString& params); + static void GetParameters (SMESH::SMESH_Hypothesis_ptr hyp, + const std::list & paramList, + QString& params); static bool SetParameters(SMESH::SMESH_Hypothesis_ptr hyp, const std::list & params ); + + static void SetInitValue(SMESHGUI_aParameterPtr param, + int initValue); + static void SetInitValue(SMESHGUI_aParameterPtr param, + double initValue); + static void SetInitValue(SMESHGUI_aParameterPtr param, + const char* initValue); + static void SetInitValue(SMESHGUI_aParameterPtr param, + SMESH::double_array& initValue); }; + +/*! + * \brief This class provides double parameter with slider control + */ +class StdMeshersGUI_doubleSliderParameter: public SMESHGUI_doubleParameter +{ +public: + StdMeshersGUI_doubleSliderParameter(const QString& label = QString::null, + const QString& leftLabel = QString::null, + const QString& rightLabel = QString::null, + const double initValue = 0.0, + const double bottom = 0, + const double top = 1, + const double precision = 0.1); + virtual QWidget* CreateWidget( QWidget* ) const; + virtual void InitializeWidget( QWidget* ) const; + virtual void TakeValue( QWidget* ); + int toInt( double val ) const; +private: + QString _leftLabel, _rightLabel; +}; + #endif