mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 10:20:34 +05:00
Automatic Length GUI: replaced slider by SMESHGUI_SpinBox. Previously the value was unknown until study was dumped.
This commit is contained in:
parent
13069ea51d
commit
39599f24f0
@ -187,10 +187,10 @@ namespace {
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
class TDoubleSliderWith2Lables: public QWidget
|
class TDoubleSliderWith2Labels: public QWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TDoubleSliderWith2Lables( const QString& leftLabel, const QString& rightLabel,
|
TDoubleSliderWith2Labels( const QString& leftLabel, const QString& rightLabel,
|
||||||
const double initValue, const double bottom,
|
const double initValue, const double bottom,
|
||||||
const double top , const double precision,
|
const double top , const double precision,
|
||||||
QWidget * parent=0 , const char * name=0 )
|
QWidget * parent=0 , const char * name=0 )
|
||||||
@ -860,8 +860,10 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
|
|||||||
item.myName = tr( "SMESH_FINENESS_PARAM" );
|
item.myName = tr( "SMESH_FINENESS_PARAM" );
|
||||||
//item.myValue = h->GetFineness();
|
//item.myValue = h->GetFineness();
|
||||||
p.append( item );
|
p.append( item );
|
||||||
customWidgets()->append
|
SMESHGUI_SpinBox* _autoLengthSpinBox = new SMESHGUI_SpinBox(dlg());
|
||||||
( new TDoubleSliderWith2Lables( "0 ", " 1", h->GetFineness(), 0, 1, 0.01, 0 ));
|
_autoLengthSpinBox->RangeStepAndValidator(0, 1, 0.01, "length_precision");
|
||||||
|
_autoLengthSpinBox->SetValue(h->GetFineness());
|
||||||
|
customWidgets()->append( _autoLengthSpinBox);
|
||||||
}
|
}
|
||||||
else if( hypType()=="NumberOfLayers" )
|
else if( hypType()=="NumberOfLayers" )
|
||||||
{
|
{
|
||||||
@ -1181,9 +1183,9 @@ bool StdMeshersGUI_StdHypothesisCreator::getParamFromCustomWidget( StdParam & pa
|
|||||||
QWidget* widget) const
|
QWidget* widget) const
|
||||||
{
|
{
|
||||||
if ( hypType()=="AutomaticLength" ) {
|
if ( hypType()=="AutomaticLength" ) {
|
||||||
TDoubleSliderWith2Lables* w = dynamic_cast<TDoubleSliderWith2Lables*>( widget );
|
SMESHGUI_SpinBox* w = dynamic_cast<SMESHGUI_SpinBox*>( widget );
|
||||||
if ( w ) {
|
if ( w ) {
|
||||||
param.myValue = w->value();
|
param.myValue = w->GetValue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user