X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ProfileInterpolateDlg.cxx;h=c7594b45bae9aa06f283a76b438944b487dca047;hb=35d2822e3e33ca225dcc1ba24e6684a43e3bb2d1;hp=622a18af6772a7b667e6dd39ebe55c0ad2e89008;hpb=0df953327ef66ec8f0d1ac3a625b569ba1a6a3c2;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.cxx b/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.cxx index 622a18af..c7594b45 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.cxx @@ -1,8 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -56,7 +52,7 @@ HYDROGUI_ProfileInterpolateDlg::HYDROGUI_ProfileInterpolateDlg( HYDROGUI_Module* addWidget( main ); - base->addWidget( new QLabel( tr( "RIVER_OBJECT" ), main ), 0, 0, 1, 1 ); + base->addWidget( new QLabel( tr( "STREAM_OBJECT" ), main ), 0, 0, 1, 1 ); base->addWidget( myRiver = new HYDROGUI_ObjComboBox( theModule, QString::null, KIND_STREAM, main ), 0, 1, 1, 1 ); base->addWidget( new QLabel( tr( "INTERPOLATOR" ), main ), 1, 0, 1, 1 ); @@ -91,7 +87,7 @@ HYDROGUI_ProfileInterpolateDlg::HYDROGUI_ProfileInterpolateDlg( HYDROGUI_Module* connect( myProfileFinish, SIGNAL( objectSelected( const QString& ) ), this, SIGNAL( profileFinishChanged( const QString& ) ) ); connect( myProfileNumber, SIGNAL( valueChanged( int ) ), this, SIGNAL( profileNumberChanged( int ) ) ); - connect( myParams, SIGNAL( myParams->textChanged( const QString& ) ), this, SIGNAL( interpolatorParametersChanged( const QString& ) ) ); + connect( myParams, SIGNAL( editingFinished() ), this, SIGNAL( onParametersEditingFinished() ) ); new HYDROGUI_OCCSelector( module(), viewer(), selectionMgr() ); @@ -216,8 +212,13 @@ void HYDROGUI_ProfileInterpolateDlg::reset() myRiver->reset(); myProfileStart->reset(); myProfileFinish->reset(); + myParams->clear(); + myDescr->clear(); +} - myDescr->setText( QString::null ); +void HYDROGUI_ProfileInterpolateDlg::onParametersEditingFinished() +{ + emit interpolatorParametersChanged( myParams->text() ); } void HYDROGUI_ProfileInterpolateDlg::onRiverChanged( const QString& theName ) @@ -244,7 +245,7 @@ void HYDROGUI_ProfileInterpolateDlg::onProfileChanged( const QString& ) void HYDROGUI_ProfileInterpolateDlg::updateState() { - setApplyEnabled( !river().isEmpty() && !profileStart().isEmpty() && !profileFinish().isEmpty() ); + setApplyEnabled( !river().isEmpty() && !profileStart().isEmpty() && !profileFinish().isEmpty() && profileStart() != profileFinish() ); } HYDROGUI_ObjComboBox* HYDROGUI_ProfileInterpolateDlg::activeProfile() const