Salome HOME
projects
/
modules
/
homard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a02a79e
)
Messages de validation du nom de la zone
author
GERALD NICOLAS
<gerald.nicolas@edf.fr>
Mon, 7 Jan 2019 09:56:05 +0000
(10:56 +0100)
committer
GERALD NICOLAS
<gerald.nicolas@edf.fr>
Mon, 7 Jan 2019 09:56:05 +0000
(10:56 +0100)
src/HOMARDGUI/HOMARD_msg_en.ts
patch
|
blob
|
history
src/HOMARDGUI/HOMARD_msg_fr.ts
patch
|
blob
|
history
src/HOMARDGUI/HOMARD_msg_ja.ts
patch
|
blob
|
history
src/HOMARDGUI/MonCreateZone.cxx
patch
|
blob
|
history
diff --git
a/src/HOMARDGUI/HOMARD_msg_en.ts
b/src/HOMARDGUI/HOMARD_msg_en.ts
index 9238ac685fe5caea156fea6edc6f61ee1e59621d..4d40ad891df35f7eb9fc33de0cdc7ce77bdfd541 100644
(file)
--- a/
src/HOMARDGUI/HOMARD_msg_en.ts
+++ b/
src/HOMARDGUI/HOMARD_msg_en.ts
@@
-159,6
+159,10
@@
<source>HOM_SELECT_OBJECT_3</source>
<translation>Select an object with type %1.</translation>
</message>
<source>HOM_SELECT_OBJECT_3</source>
<translation>Select an object with type %1.</translation>
</message>
+ <message>
+ <source>HOM_SELECT_OBJECT_4</source>
+ <translation>The name of the object is already selected. Modify it or cancel.</translation>
+ </message>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>File selection</translation>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>File selection</translation>
diff --git
a/src/HOMARDGUI/HOMARD_msg_fr.ts
b/src/HOMARDGUI/HOMARD_msg_fr.ts
index b97e3c16a7ec3cc105721f04f4896bf8ebf2b93d..3306a69e73c6d64656947f5027af401cd1ef1dfb 100644
(file)
--- a/
src/HOMARDGUI/HOMARD_msg_fr.ts
+++ b/
src/HOMARDGUI/HOMARD_msg_fr.ts
@@
-211,6
+211,10
@@
<source>HOM_SELECT_OBJECT_3</source>
<translation>Sélectionner un objet de type %1.</translation>
</message>
<source>HOM_SELECT_OBJECT_3</source>
<translation>Sélectionner un objet de type %1.</translation>
</message>
+ <message>
+ <source>HOM_SELECT_OBJECT_4</source>
+ <translation>Le nom est déjà choisi. Modifiez le ou annulez la saisie.</translation>
+ </message>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>Choix de fichier</translation>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>Choix de fichier</translation>
diff --git
a/src/HOMARDGUI/HOMARD_msg_ja.ts
b/src/HOMARDGUI/HOMARD_msg_ja.ts
index 68ef230686ca319092a6c35b3fd4ee2e5e80301f..e60a20c76e175f2f19fbedd71df7b8e971326849 100644
(file)
--- a/
src/HOMARDGUI/HOMARD_msg_ja.ts
+++ b/
src/HOMARDGUI/HOMARD_msg_ja.ts
@@
-211,6
+211,10
@@
<source>HOM_SELECT_OBJECT_3</source>
<translation>型 %1 のオブジェクトを選択します。</translation>
</message>
<source>HOM_SELECT_OBJECT_3</source>
<translation>型 %1 のオブジェクトを選択します。</translation>
</message>
+ <message>
+ <source>HOM_SELECT_OBJECT_4</source>
+ <translation>The name of the object is already selected. Modify it or cancel.</translation>
+ </message>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>ファイル選択</translation>
<message>
<source>HOM_SELECT_FILE_0</source>
<translation>ファイル選択</translation>
diff --git
a/src/HOMARDGUI/MonCreateZone.cxx
b/src/HOMARDGUI/MonCreateZone.cxx
index 2c823168273926cc944a846e4086c777b15770e6..9eaa02e8588f7972955610c80b8f32416c8b6acb 100644
(file)
--- a/
src/HOMARDGUI/MonCreateZone.cxx
+++ b/
src/HOMARDGUI/MonCreateZone.cxx
@@
-481,7
+481,7
@@
bool MonCreateZone:: CreateOrUpdateZone()
//----------------------------------------------------
// Creation de la zone
{
//----------------------------------------------------
// Creation de la zone
{
- MESSAGE("
CreateOrUpdateZone _Type ="<<_Type
);
+ MESSAGE("
Debut de CreateOrUpdateZone avec _Type ="<<_Type<<", _Name ="<<_Name.toStdString().c_str()<<" et LEName ="<<LEName->text().trimmed().toStdString().c_str()
);
if (_Name != LEName->text().trimmed())
{
_Name = LEName->text().trimmed() ;
if (_Name != LEName->text().trimmed())
{
_Name = LEName->text().trimmed() ;
@@
-489,17
+489,17
@@
bool MonCreateZone:: CreateOrUpdateZone()
{
switch (_Type)
{
{
switch (_Type)
{
- case 11 : // il s agit d un rectangle
+ case 11 : // il s agit d un rectangle
, dans le plan (X,Y)
{ aZone = myHomardGen->CreateZoneBox2D(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _Orient );
break;
}
{ aZone = myHomardGen->CreateZoneBox2D(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneXmin, _ZoneXmax, _ZoneYmin, _ZoneYmax, _Orient );
break;
}
- case 12 : // il s agit d un rectangle
+ case 12 : // il s agit d un rectangle
, dans le plan (Y,Z)
{ aZone = myHomardGen->CreateZoneBox2D(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax, _Orient );
break;
}
{ aZone = myHomardGen->CreateZoneBox2D(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneYmin, _ZoneYmax, _ZoneZmin, _ZoneZmax, _Orient );
break;
}
- case 13 : // il s agit d un rectangle
+ case 13 : // il s agit d un rectangle
, dans le plan (Z,X)
{ aZone = myHomardGen->CreateZoneBox2D(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneZmin, _ZoneZmax, _ZoneXmin, _ZoneXmax, _Orient );
break;
{ aZone = myHomardGen->CreateZoneBox2D(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneZmin, _ZoneZmax, _ZoneXmin, _ZoneXmax, _Orient );
break;
@@
-514,17
+514,17
@@
bool MonCreateZone:: CreateOrUpdateZone()
_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon );
break;
}
_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneRayon );
break;
}
- case 31 : // il s agit d un disque issu d'un cylindre
+ case 31 : // il s agit d un disque issu d'un cylindre
, dans le plan (X,Y)
{ aZone = myHomardGen->CreateZoneDisk(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneXcentre, _ZoneYcentre, _ZoneRayon, _Orient );
break;
}
{ aZone = myHomardGen->CreateZoneDisk(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneXcentre, _ZoneYcentre, _ZoneRayon, _Orient );
break;
}
- case 32 : // il s agit d un disque issu d'un cylindre
+ case 32 : // il s agit d un disque issu d'un cylindre
, dans le plan (Y,Z)
{ aZone = myHomardGen->CreateZoneDisk(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneYcentre, _ZoneZcentre, _ZoneRayon, _Orient );
break;
}
{ aZone = myHomardGen->CreateZoneDisk(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneYcentre, _ZoneZcentre, _ZoneRayon, _Orient );
break;
}
- case 33 : // il s agit d un disque issu d'un cylindre
+ case 33 : // il s agit d un disque issu d'un cylindre
, dans le plan (Z,X)
{ aZone = myHomardGen->CreateZoneDisk(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneZcentre, _ZoneXcentre, _ZoneRayon, _Orient );
break;
{ aZone = myHomardGen->CreateZoneDisk(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneZcentre, _ZoneXcentre, _ZoneRayon, _Orient );
break;
@@
-534,17
+534,17
@@
bool MonCreateZone:: CreateOrUpdateZone()
_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut );
break;
}
_ZoneXcentre, _ZoneYcentre, _ZoneZcentre, _ZoneXaxis, _ZoneYaxis, _ZoneZaxis, _ZoneRayon, _ZoneHaut );
break;
}
- case 61 : // il s agit d un disque avec trou
+ case 61 : // il s agit d un disque avec trou
, dans le plan (X,Y)
{ aZone = myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneXcentre, _ZoneYcentre, _ZoneRayon, _ZoneRayonInt, _Orient );
break;
}
{ aZone = myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneXcentre, _ZoneYcentre, _ZoneRayon, _ZoneRayonInt, _Orient );
break;
}
- case 62 : // il s agit d un disque avec trou
+ case 62 : // il s agit d un disque avec trou
, dans le plan (Y,Z)
{ aZone = myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneYcentre, _ZoneZcentre, _ZoneRayon, _ZoneRayonInt, _Orient );
break;
}
{ aZone = myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneYcentre, _ZoneZcentre, _ZoneRayon, _ZoneRayonInt, _Orient );
break;
}
- case 63 : // il s agit d un disque avec trou
+ case 63 : // il s agit d un disque avec trou
, dans le plan (Z,X)
{ aZone = myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneZcentre, _ZoneXcentre, _ZoneRayon, _ZoneRayonInt, _Orient );
break;
{ aZone = myHomardGen->CreateZoneDiskWithHole(CORBA::string_dup(_Name.toStdString().c_str()), \
_ZoneZcentre, _ZoneXcentre, _ZoneRayon, _ZoneRayonInt, _Orient );
break;
@@
-568,13
+568,18
@@
bool MonCreateZone:: CreateOrUpdateZone()
return true;
}
return true;
}
- else { return false ; }
+ else {
+ QMessageBox::warning( 0, QObject::tr("HOM_WARNING"),
+ QObject::tr("HOM_SELECT_OBJECT_4") );
+ return false ;
+ }
+ MESSAGE("Fin de CreateOrUpdateZone");
}
// ------------------------------------------------------------------------
void MonCreateZone::PushOnOK()
// ------------------------------------------------------------------------
{
}
// ------------------------------------------------------------------------
void MonCreateZone::PushOnOK()
// ------------------------------------------------------------------------
{
-
if (PushOnApply()) this->close() ;
+ if (PushOnApply()) this->close() ;
}
// ------------------------------------------------------------------------
void MonCreateZone::PushOnHelp()
}
// ------------------------------------------------------------------------
void MonCreateZone::PushOnHelp()
@@
-588,6
+593,7
@@
void MonCreateZone::PushOnHelp()
void MonCreateZone::SetNewName()
// -----------------------------------
{
void MonCreateZone::SetNewName()
// -----------------------------------
{
+ MESSAGE("SetNewName");
// Recherche d'un nom par defaut qui n'existe pas encore
HOMARD::listeZones_var MyObjects = myHomardGen->GetAllZonesName() ;
// Recherche d'un nom par defaut qui n'existe pas encore
HOMARD::listeZones_var MyObjects = myHomardGen->GetAllZonesName() ;
@@
-607,11
+613,13
@@
void MonCreateZone::SetNewName()
}
}
LEName->setText(aName);
}
}
LEName->setText(aName);
+ MESSAGE("SetNewName aName ="<<aName.toStdString().c_str());
}
// ------------------------------------------------------------------------
void MonCreateZone::SetBox()
// ------------------------------------------------------------------------
{
}
// ------------------------------------------------------------------------
void MonCreateZone::SetBox()
// ------------------------------------------------------------------------
{
+ MESSAGE("Debut de SetBox")
gBBox->setVisible(1) ;
gBSphere->setVisible(0) ;
gBCylindre->setVisible(0) ;
gBBox->setVisible(1) ;
gBSphere->setVisible(0) ;
gBCylindre->setVisible(0) ;
@@
-629,6
+637,7
@@
void MonCreateZone::SetBox()
if ( _Zincr > 0 ) { SpinBox_Zmini->setValue(_Zcentre-10*_Zincr) ;
SpinBox_Zmaxi->setValue(_Zcentre+10*_Zincr) ; }
else { _Type=11 ; }
if ( _Zincr > 0 ) { SpinBox_Zmini->setValue(_Zcentre-10*_Zincr) ;
SpinBox_Zmaxi->setValue(_Zcentre+10*_Zincr) ; }
else { _Type=11 ; }
+ MESSAGE("Fin de SetBox")
}
// ------------------------------------------------------------------------
void MonCreateZone::SetSphere()
}
// ------------------------------------------------------------------------
void MonCreateZone::SetSphere()