X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FHOMARDGUI%2FMonEditZone.cxx;h=16369ffb7db12a29ec85bb670a6b60131a48df76;hb=499468132a2c35186f4f1f44ea9004b4f7c13589;hp=1ade5d603a3c65bec1eecb5cc6473ac4b41ca060;hpb=a3b974f0f68b4ea42bbfadb42106996e9a1842c8;p=modules%2Fhomard.git diff --git a/src/HOMARDGUI/MonEditZone.cxx b/src/HOMARDGUI/MonEditZone.cxx index 1ade5d60..16369ffb 100644 --- a/src/HOMARDGUI/MonEditZone.cxx +++ b/src/HOMARDGUI/MonEditZone.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// Copyright (C) 2011-2016 CEA/DEN, 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 -// 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 @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditZone.h" #include "SalomeApp_Tools.h" @@ -30,21 +28,22 @@ using namespace std; #include #include +using namespace std; // ------------------------------------------------------------------------ MonEditZone::MonEditZone( MonCreateHypothesis* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, - QString caseName, QString zoneName ): + QString caseName, QString Name ): // ------------------------------------------------------------------------ /* Constructs a MonEditZone herite de MonCreateZone */ MonCreateZone(parent, myHomardGen, caseName) { - MESSAGE("Debut de MonEditZone pour " << zoneName.toStdString().c_str()); + MESSAGE("Debut de MonEditZone pour " << Name.toStdString().c_str()); setWindowTitle(QObject::tr("HOM_ZONE_EDIT_WINDOW_TITLE")); - _aZoneName=zoneName; - aZone = _myHomardGen->GetZone(_aZoneName.toStdString().c_str()); + _Name=Name; + aZone = myHomardGen->GetZone(_Name.toStdString().c_str()); InitValEdit(); } // ------------------------------------------------------------------------ @@ -58,8 +57,8 @@ void MonEditZone::InitValEdit() // ------------------------------------------------------------------------ { MESSAGE("InitValEdit "); - LEZoneName->setText(_aZoneName); - LEZoneName->setReadOnly(true); + LEName->setText(_Name); + LEName->setReadOnly(true); _Type = aZone->GetType(); MESSAGE("InitValEdit _Type ="<<_Type); InitValZoneLimit(); @@ -191,8 +190,8 @@ void MonEditZone::SetBox() RBPipe->setDisabled(true); if ( _Type == 2 ) { RBSphere->setDisabled(true); } else { RBSphere->setVisible(0); - RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); - RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0)); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; QPixmap pix = resMgr->loadPixmap( "HOMARD", "boxdxy.png" ) ; QIcon IS=QIcon(pix) ; @@ -253,7 +252,6 @@ void MonEditZone::SetSphere() if ( _Zincr > 0) { SpinBox_Zcentre->setSingleStep(_Zincr); } else { SpinBox_Zcentre->setSingleStep(1);} - SpinBox_Rayon->setMinimum(0.); SpinBox_Rayon->setValue(_ZoneRayon); } // ------------------------------------------------------------------------ @@ -270,11 +268,11 @@ void MonEditZone::SetCylinder() RBPipe->setDisabled(true); if ( _Type == 5 ) { RBSphere->setDisabled(true); } else { RBSphere->setVisible(0); - RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); - RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); - TLXbase->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); - TLYbase->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); - TLZbase->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0)); + TLXbase->setText(QApplication::translate("CreateZone", "X centre", 0)); + TLYbase->setText(QApplication::translate("CreateZone", "Y centre", 0)); + TLZbase->setText(QApplication::translate("CreateZone", "Z centre", 0)); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; QPixmap pix = resMgr->loadPixmap( "HOMARD", "disk.png" ) ; QIcon IS=QIcon(pix) ; @@ -293,7 +291,6 @@ void MonEditZone::SetCylinder() if ( _Zincr > 0) { SpinBox_Zbase->setSingleStep(_Zincr); } else { SpinBox_Zbase->setSingleStep(1) ;} - SpinBox_Radius->setMinimum(0.); SpinBox_Radius->setValue(_ZoneRayon); if ( _Type == 5 ) @@ -330,11 +327,11 @@ void MonEditZone::SetPipe() RBCylinder->setDisabled(true); if ( _Type == 7 ) { RBSphere->setDisabled(true); } else { RBSphere->setVisible(0); - RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0, QApplication::UnicodeUTF8)); - RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0, QApplication::UnicodeUTF8)); - TLXbase_p->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); - TLYbase_p->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); - TLZbase_p->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + RBPipe->setText(QApplication::translate("CreateZone", "Disk with hole", 0)); + RBCylinder->setText(QApplication::translate("CreateZone", "Disk", 0)); + TLXbase_p->setText(QApplication::translate("CreateZone", "X centre", 0)); + TLYbase_p->setText(QApplication::translate("CreateZone", "Y centre", 0)); + TLZbase_p->setText(QApplication::translate("CreateZone", "Z centre", 0)); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr() ; QPixmap pix = resMgr->loadPixmap( "HOMARD", "diskwithhole.png" ) ; QIcon IS=QIcon(pix) ; @@ -353,9 +350,7 @@ void MonEditZone::SetPipe() if ( _Zincr > 0) { SpinBox_Zbase_p->setSingleStep(_Zincr); } else { SpinBox_Zbase_p->setSingleStep(1) ;} - SpinBox_Radius_int->setMinimum(0.); SpinBox_Radius_int->setValue(_ZoneRayonInt); - SpinBox_Radius_ext->setMinimum(0.); SpinBox_Radius_ext->setValue(_ZoneRayon); if ( _Type == 7 ) @@ -425,7 +420,7 @@ bool MonEditZone::CreateOrUpdateZone() break; } } - if (Chgt) _myHomardGen->InvalideZone(_aZoneName.toStdString().c_str()); + if (Chgt) myHomardGen->InvalideZone(_Name.toStdString().c_str()); HOMARD_UTILS::updateObjBrowser(); } catch( const SALOME::SALOME_Exception& S_ex ) {