X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARDGUI%2FMonEditYACS.cxx;h=a346596006b8c8bf209011225caa76143fd691aa;hb=refs%2Ftags%2FV9_13_0b1;hp=6d2571dd69596e8419e472655d945d7f31ae4368;hpb=a98a6c26b86d7c1b952e4a04de60a04e15fc5183;p=modules%2Fhomard.git diff --git a/src/HOMARDGUI/MonEditYACS.cxx b/src/HOMARDGUI/MonEditYACS.cxx index 6d2571dd..a3465960 100644 --- a/src/HOMARDGUI/MonEditYACS.cxx +++ b/src/HOMARDGUI/MonEditYACS.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// Copyright (C) 2011-2024 CEA, EDF // // 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 -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -55,54 +55,94 @@ void MonEditYACS::InitValEdit() LEName->setText(_Name); LEName->setReadOnly(true); - QString _aCaseName = aYACS->GetCaseName(); + _aCaseName = aYACS->GetCaseName(); LECaseName->setText(_aCaseName); LECaseName->setReadOnly(true); PBCaseName->setVisible(0); - QString aScriptFile = aYACS->GetScriptFile(); - LEScriptFile->setText(aScriptFile); + _aScriptFile = aYACS->GetScriptFile(); + LEScriptFile->setText(_aScriptFile); - QString aDirName = aYACS->GetDirName(); - LEDirName->setText(aDirName); + _aDirName = aYACS->GetDirName(); + LEDirName->setText(_aDirName); + LEDirName->setReadOnly(true); - QString aMeshFile = aYACS->GetMeshFile(); - LEMeshFile->setText(aMeshFile); + _aMeshFile = aYACS->GetMeshFile(); + LEMeshFile->setText(_aMeshFile); - int Type=aYACS->GetType(); - if(Type==1) { RBConstant->setChecked(true); } - else { RBVariable->setChecked(true); }; + _Type=aYACS->GetType(); + if(_Type==1) { RBConstant->setChecked(true); } + else { RBVariable->setChecked(true); }; RBConstant->setEnabled(false); RBVariable->setEnabled(false); + + _MaxIter = aYACS->GetMaxIter(); + SpinBoxMaxIter->setValue(_MaxIter) ; + _MaxNode = aYACS->GetMaxNode(); + SpinBoxMaxNode->setValue(_MaxNode) ; + _MaxElem = aYACS->GetMaxElem(); + SpinBoxMaxElem->setValue(_MaxElem) ; // } // --------------------------------------------------- bool MonEditYACS:: CreateOrUpdate() //---------------------------------------------------- -// Modification du schema +// Edition/modification du schema { MESSAGE("CreateOrUpdate"); - - // Les donnees + bool chgt = false ; + int valeur_i ; + // A. Recuperation et comparaison des valeurs + // A.1. Le script de lancement QString aScriptFile=LEScriptFile->text().trimmed(); if ( aScriptFile != _aScriptFile ) { +// MESSAGE("modification de ScriptFile : "<<_aScriptFile.toStdString()<<" devient "<SetScriptFile(CORBA::string_dup(_aScriptFile.toStdString().c_str())) ; + chgt = true ; } - QString aDirName=LEDirName->text().trimmed(); - if ( aDirName != _aDirName ) - { - _aDirName = aDirName ; - aYACS->SetDirName(CORBA::string_dup(_aDirName.toStdString().c_str())) ; - } + // A.2. Le maillage initial QString aMeshFile=LEMeshFile->text().trimmed(); if ( aMeshFile != _aMeshFile ) { +// MESSAGE("modification de aMeshFile : "<<_aMeshFile.toStdString()<<" devient "<SetMeshFile(CORBA::string_dup(_aMeshFile.toStdString().c_str())) ; + chgt = true ; + } + // A.3. La convergence + valeur_i = SpinBoxMaxIter->value() ; + if ( valeur_i != _MaxIter ) + { +// MESSAGE("modification de MaxIter : "<<_MaxIter<<" devient "<SetMaxIter(_MaxIter) ; + chgt = true ; + } + valeur_i = SpinBoxMaxNode->value() ; + if ( valeur_i != _MaxNode ) + { +// MESSAGE("modification de MaxNode : "<<_MaxNode<<" devient "<SetMaxNode(_MaxNode) ; + chgt = true ; + } + valeur_i = SpinBoxMaxElem->value() ; + if ( valeur_i != _MaxElem ) + { +// MESSAGE("modification de MaxElem : "<<_MaxElem<<" devient "<SetMaxElem(_MaxElem) ; + chgt = true ; + } +// B. Si changement + if ( chgt ) + { + myHomardGen->InvalideYACS(_Name.toStdString().c_str()); } + HOMARD_UTILS::updateObjBrowser(); return true ; }