X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Hypotheses.cxx;fp=src%2FSMESHGUI%2FSMESHGUI_Hypotheses.cxx;h=ae38ba269a66f85c1ba33d3a2b67237fadb09632;hb=a2d993375adaeca637ffd1cd94f0fadc1bf4a868;hp=793cc17518e2b183a1fc31e78f1db8cadc332d14;hpb=ab2b169f82cb5f25afadb0bde4b38b4c8dd772ad;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index 793cc1751..ae38ba269 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -42,6 +42,8 @@ #include #include #include +#include +//#include // Qt includes #include @@ -54,7 +56,8 @@ #define MARGIN 11 SMESHGUI_GenericHypothesisCreator::SMESHGUI_GenericHypothesisCreator( const QString& theHypType ) - : myHypType( theHypType ), myIsCreate( false ), myDlg( 0 ) + : SMESHGUI_Helper( SMESHGUI::GetSMESHGUI() ), + myHypType( theHypType ), myIsCreate( false ), myDlg( 0 ) { } @@ -193,11 +196,10 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame() break; case QVariant::String: { - /* ouv: temporarily disabled if((*anIt).isVariable) { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); QString aVar = (*anIt).myValue.toString(); - if(aStudy->IsInteger(aVar.toLatin1().constData())){ + QVariant::Type aType = getNotebook()->getType( aVar ); + if(aType == QVariant::Int) { SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( GroupC1 ); sb->setObjectName( (*anIt).myName ); attuneStdWidget( sb, i ); @@ -205,7 +207,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame() connect( sb, SIGNAL( valueChanged( int ) ), this, SLOT( onValueChanged() ) ); w = sb; } - else if(aStudy->IsReal(aVar.toLatin1().constData())){ + else if( aType == QVariant::Double ) { SalomeApp_DoubleSpinBox* sb = new SMESHGUI_SpinBox( GroupC1 ); sb->setObjectName( (*anIt).myName ); attuneStdWidget( sb, i ); @@ -215,14 +217,13 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame() } } else { - */ QLineEdit* le = new QLineEdit( GroupC1 ); le->setObjectName( (*anIt).myName ); attuneStdWidget( le, i ); le->setText( (*anIt).myValue.toString() ); connect( le, SIGNAL( textChanged( const QString& ) ), this, SLOT( onValueChanged() ) ); w = le; - //} + } } break; }