mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
préférences
This commit is contained in:
parent
c4a98a4a6a
commit
62f81f8c27
@ -179,72 +179,48 @@ void SMESHGUI_AdaptDlg::recupPreferences()
|
|||||||
if (!CORBA::is_nil(adaptGen))
|
if (!CORBA::is_nil(adaptGen))
|
||||||
adaptGen->UpdateStudy();
|
adaptGen->UpdateStudy();
|
||||||
|
|
||||||
int defaut_i ;
|
SUIT_ResourceMgr* resMgr = mySMESHGUI->getApp()->resourceMgr();
|
||||||
std::string defaut_s ;
|
|
||||||
QString QString_v ;
|
|
||||||
//
|
|
||||||
// B. Les valeurs
|
// B. Les valeurs
|
||||||
// B.1. La langue
|
// B.1. La langue
|
||||||
//
|
|
||||||
INFOS("début de B.1.");
|
_LanguageShort = resMgr->stringValue("language", "language", "en" );
|
||||||
defaut_s = adaptGen->GetLanguageShort();
|
INFOS ("Enregistrement de LanguageShort = " << _LanguageShort.toStdString().c_str() );
|
||||||
INFOS("defaut_s OK");
|
adaptGen->SetLanguageShort(_LanguageShort.toStdString().c_str());
|
||||||
SUIT_ResourceMgr* resMgr = mySMESHGUI->getApp()->resourceMgr();
|
|
||||||
INFOS("SUIT_ResourceMgr OK");
|
|
||||||
_LanguageShort = resMgr->stringValue("language", "language", QString(defaut_s.c_str()) );
|
|
||||||
INFOS ("Récupération de LanguageShort = " << _LanguageShort.toStdString().c_str() );
|
|
||||||
//
|
|
||||||
// B.2. Les publications
|
// B.2. Les publications
|
||||||
bool publish_mesh ;
|
bool publish_mesh ;
|
||||||
//
|
|
||||||
_PublisMeshIN = adaptGen->GetPublisMeshIN();
|
publish_mesh = resMgr->booleanValue("HOMARD", "publish_mesh_in", false );
|
||||||
if ( _PublisMeshIN == 1 ) { publish_mesh = true ; }
|
|
||||||
else { publish_mesh = false ; }
|
|
||||||
publish_mesh = resMgr->booleanValue("HOMARD", "publish_mesh_in", publish_mesh );
|
|
||||||
if ( publish_mesh ) { _PublisMeshIN = 1 ; }
|
if ( publish_mesh ) { _PublisMeshIN = 1 ; }
|
||||||
else { _PublisMeshIN = 0 ; }
|
else { _PublisMeshIN = 0 ; }
|
||||||
//
|
|
||||||
_PublisMeshOUT = adaptGen->GetPublisMeshOUT();
|
publish_mesh = resMgr->booleanValue("HOMARD", "publish_mesh_out", false );
|
||||||
if ( _PublisMeshOUT == 1 ) { publish_mesh = true ; }
|
|
||||||
else { publish_mesh = false ; }
|
|
||||||
publish_mesh = resMgr->booleanValue("HOMARD", "publish_mesh_out", publish_mesh );
|
|
||||||
if ( publish_mesh ) { _PublisMeshOUT = 1 ; }
|
if ( publish_mesh ) { _PublisMeshOUT = 1 ; }
|
||||||
else { _PublisMeshOUT = 0 ; }
|
else { _PublisMeshOUT = 0 ; }
|
||||||
//
|
|
||||||
|
INFOS ("Enregistrement de PublisMeshIN = " << _PublisMeshIN<<", PublisMeshOUT = "<< _PublisMeshOUT);
|
||||||
|
adaptGen->SetPublisMesh(_PublisMeshIN, _PublisMeshOUT);
|
||||||
|
|
||||||
// B.3. Les maximum pour YACS
|
// B.3. Les maximum pour YACS
|
||||||
//
|
|
||||||
defaut_i = adaptGen->GetYACSMaxIter();
|
_YACSMaxIter = resMgr->integerValue("HOMARD", "yacs_max_iter", 0 );
|
||||||
_YACSMaxIter = resMgr->integerValue("HOMARD", "yacs_max_iter", defaut_i );
|
_YACSMaxNode = resMgr->integerValue("HOMARD", "yacs_max_node", 0 );
|
||||||
//
|
_YACSMaxElem = resMgr->integerValue("HOMARD", "yacs_max_elem", 0 );
|
||||||
defaut_i = adaptGen->GetYACSMaxNode();
|
|
||||||
_YACSMaxNode = resMgr->integerValue("HOMARD", "yacs_max_node", defaut_i );
|
INFOS ("Enregistrement de YACSMaxIter = " << _YACSMaxIter<<", YACSMaxNode = "<< _YACSMaxNode<<", YACSMaxElem = "<< _YACSMaxElem);
|
||||||
//
|
adaptGen->SetYACSMaximum(_YACSMaxIter, _YACSMaxNode, _YACSMaxElem);
|
||||||
defaut_i = adaptGen->GetYACSMaxElem();
|
|
||||||
_YACSMaxElem = resMgr->integerValue("HOMARD", "yacs_max_elem", defaut_i );
|
|
||||||
//
|
|
||||||
// B.4. La convergence pour YACS
|
// B.4. La convergence pour YACS
|
||||||
//
|
|
||||||
defaut_i = adaptGen->GetYACSConvergenceType();
|
QString QString_v = resMgr->stringValue ( "HOMARD", "yacs_type_test", "None" );
|
||||||
if ( defaut_i == 1 ) { QString_v = tr("VTest > VRef") ; }
|
|
||||||
else if ( defaut_i == 2 ) { QString_v = tr("VTest < VRef") ; }
|
|
||||||
else { QString_v = tr("None") ; }
|
|
||||||
QString_v = resMgr->stringValue ( "HOMARD", "yacs_type_test", QString_v );
|
|
||||||
if ( ( QString_v == "VTest > VRef" ) || ( QString_v == "VTest > VRef" ) ) { _YACSTypeTest = 1 ; }
|
if ( ( QString_v == "VTest > VRef" ) || ( QString_v == "VTest > VRef" ) ) { _YACSTypeTest = 1 ; }
|
||||||
else if ( ( QString_v == "VTest < VRef" ) || ( QString_v == "VTest < VRef" ) ) { _YACSTypeTest = 2 ; }
|
else if ( ( QString_v == "VTest < VRef" ) || ( QString_v == "VTest < VRef" ) ) { _YACSTypeTest = 2 ; }
|
||||||
else { _YACSTypeTest = 0 ; }
|
else { _YACSTypeTest = 0 ; }
|
||||||
//
|
|
||||||
// C. Enregistrement dans l'objet general
|
|
||||||
//
|
|
||||||
INFOS ("Enregistrement de LanguageShort = " << _LanguageShort.toStdString().c_str() );
|
|
||||||
INFOS ("Enregistrement de PublisMeshIN = " << _PublisMeshIN<<", PublisMeshOUT = "<< _PublisMeshOUT);
|
|
||||||
INFOS ("Enregistrement de YACSMaxIter = " << _YACSMaxIter<<", YACSMaxNode = "<< _YACSMaxNode<<", YACSMaxElem = "<< _YACSMaxElem);
|
|
||||||
INFOS ("Enregistrement de YACSTypeTest = " << _YACSTypeTest);
|
INFOS ("Enregistrement de YACSTypeTest = " << _YACSTypeTest);
|
||||||
//
|
|
||||||
adaptGen->SetLanguageShort(_LanguageShort.toStdString().c_str());
|
|
||||||
adaptGen->SetPublisMesh(_PublisMeshIN, _PublisMeshOUT);
|
|
||||||
adaptGen->SetYACSMaximum(_YACSMaxIter, _YACSMaxNode, _YACSMaxElem);
|
|
||||||
//
|
|
||||||
adaptGen->SetYACSConvergenceType(_YACSTypeTest);
|
adaptGen->SetYACSConvergenceType(_YACSTypeTest);
|
||||||
|
|
||||||
INFOS("Fin de recupPreferences")
|
INFOS("Fin de recupPreferences")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user