Back to index

salome-geom  6.5.0
BlocksGUI_TrsfDlg.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : BlocksGUI_TrsfDlg.cxx
00025 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S. (julia.dorovskikh@opencascade.com)
00026 //
00027 #include "BlocksGUI_TrsfDlg.h"
00028 
00029 #include <DlgRef.h>
00030 #include <GeometryGUI.h>
00031 #include <GEOMBase.h>
00032 
00033 #include <SUIT_Session.h>
00034 #include <SUIT_Desktop.h>
00035 #include <SUIT_ResourceMgr.h>
00036 #include <SUIT_ViewWindow.h>
00037 #include <SUIT_ViewManager.h>
00038 #include <SalomeApp_Application.h>
00039 #include <LightApp_SelectionMgr.h>
00040 #include <OCCViewer_ViewModel.h>
00041 
00042 // OCCT Includes
00043 #include <TColStd_IndexedMapOfInteger.hxx>
00044 
00045 //=================================================================================
00046 // class    : BlocksGUI_TrsfDlg()
00047 // purpose  : Constructs a BlocksGUI_TrsfDlg which is a child of 'parent'.
00048 //=================================================================================
00049 BlocksGUI_TrsfDlg::BlocksGUI_TrsfDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
00050   : GEOMBase_Skeleton(theGeometryGUI, parent),
00051     myInitial(true)
00052 {
00053   SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
00054   QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_BLOCK_MULTITRSF_SIMPLE")));
00055   QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_BLOCK_MULTITRSF_DOUBLE")));
00056   QPixmap imageS (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
00057 
00058   setWindowTitle(tr("GEOM_BLOCK_MULTITRSF_TITLE"));
00059 
00060   /***************************************************************/
00061   mainFrame()->GroupConstructors->setTitle(tr("GEOM_BLOCK_MULTITRSF"));
00062 
00063   mainFrame()->RadioButton1->setIcon(image1);
00064   mainFrame()->RadioButton2->setIcon(image2);
00065   mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
00066   mainFrame()->RadioButton3->close();
00067 
00068   // Create first group
00069   myGrp1 = new QGroupBox(tr("GEOM_BLOCK_MULTITRSF_SIMPLE"), centralWidget());
00070 
00071   createSelWg(tr("GEOM_MAIN_OBJECT"), imageS, myGrp1, MainObj1);
00072   createSelWg(tr("FACE_1"),           imageS, myGrp1, Face1);
00073   createSelWg(tr("FACE_2"),           imageS, myGrp1, Face2);
00074   createSpinWg(tr("GEOM_NB_TIMES"),           myGrp1, SpinBox1);
00075 
00076   // Create second group
00077   myGrp2 = new QGroupBox(tr("GEOM_BLOCK_MULTITRSF_DOUBLE"), centralWidget());
00078 
00079   createSelWg(tr("GEOM_MAIN_OBJECT"), imageS, myGrp2, MainObj2);
00080   createSelWg(tr("FACE_1U"),          imageS, myGrp2, Face1U);
00081   createSelWg(tr("FACE_2U"),          imageS, myGrp2, Face2U);
00082   createSpinWg(tr("GEOM_NB_TIMES_U"),         myGrp2, SpinBox2U);
00083   createSelWg(tr("FACE_1V"),          imageS, myGrp2, Face1V);
00084   createSelWg(tr("FACE_2V"),          imageS, myGrp2, Face2V);
00085   createSpinWg(tr("GEOM_NB_TIMES_V"),         myGrp2, SpinBox2V);
00086 
00087   // Add groups to layout
00088   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
00089   layout->setMargin(0); layout->setSpacing(6);
00090   layout->addWidget(myGrp1);
00091   layout->addWidget(myGrp2);
00092   /***************************************************************/
00093 
00094   setHelpFileName("multi_transformation_operation_page.html");
00095 
00096   Init();
00097 }
00098 
00099 //=================================================================================
00100 // function : ~BlocksGUI_TrsfDlg()
00101 // purpose  : Destroys the object and frees any allocated resources
00102 //=================================================================================
00103 BlocksGUI_TrsfDlg::~BlocksGUI_TrsfDlg()
00104 {
00105   // no need to delete child widgets, Qt does it all for us
00106 }
00107 
00108 //=================================================================================
00109 // function : Init()
00110 // purpose  :
00111 //=================================================================================
00112 void BlocksGUI_TrsfDlg::Init()
00113 {
00114   // Set range of spinboxes
00115   int SpecificStep = 1;
00116   QMap<int, SalomeApp_IntSpinBox*>::iterator anIter;
00117   for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
00118     initSpinBox(anIter.value(), 1, 999, SpecificStep);
00119   }
00120 
00121   showOnlyPreviewControl();
00122   
00123   // signals and slots connections
00124   connect(buttonOk(),    SIGNAL(clicked()), this, SLOT(ClickOnOk()));
00125   connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
00126 
00127   connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
00128 
00129   QMap<int, QPushButton*>::iterator anIterBtn;
00130   for (anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn)
00131     connect(anIterBtn.value(), SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
00132 
00133   QMap<int, SalomeApp_IntSpinBox*>::iterator anIterSpin;
00134   for (anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin)
00135     connect(anIterSpin.value(), SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
00136 
00137   // init controls and fields
00138   initName(tr("GEOM_BLOCK_MULTITRSF"));
00139 
00140   myConstructorId = -1;
00141   ConstructorsClicked(0);
00142 }
00143 
00144 //=================================================================================
00145 // function : ConstructorsClicked()
00146 // purpose  : Radio button management
00147 //=================================================================================
00148 void BlocksGUI_TrsfDlg::ConstructorsClicked (int constructorId)
00149 {
00150   if (myConstructorId == constructorId)
00151     return;
00152 
00153   myConstructorId = constructorId;
00154 
00155   // init fields
00156   myShape = GEOM::GEOM_Object::_nil();
00157   myFaces[Face1] = myFaces[Face2] = -1;
00158   myFaces[Face1U] = myFaces[Face2U] = -1;
00159   myFaces[Face1V] = myFaces[Face2V] = -1;
00160 
00161   // clear line edits
00162   QMap<int, QLineEdit*>::iterator anIterLE;
00163   for (anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE)
00164     anIterLE.value()->setText("");
00165 
00166   switch (constructorId) {
00167   case 0:
00168     myGrp2->hide();
00169     myGrp1->show();
00170     mySpinBox[SpinBox1]->setValue(2);
00171     mySelBtn[MainObj1]->click();
00172     break;
00173   case 1:
00174     myGrp1->hide();
00175     myGrp2->show();
00176     mySpinBox[SpinBox2U]->setValue(2);
00177     mySpinBox[SpinBox2V]->setValue(2);
00178     mySelBtn[MainObj2]->click();
00179     break;
00180   default:
00181     break;
00182   }
00183 
00184   qApp->processEvents();
00185   updateGeometry();
00186   resize(minimumSizeHint());
00187 
00188   // on dialog initialization we init the first field with a selected object (if any)
00189   SelectionIntoArgument();
00190 }
00191 
00192 //=================================================================================
00193 // function : ClickOnOk()
00194 // purpose  :
00195 //=================================================================================
00196 void BlocksGUI_TrsfDlg::ClickOnOk()
00197 {
00198   setIsApplyAndClose( true );
00199   if (ClickOnApply())
00200     ClickOnCancel();
00201 }
00202 
00203 //=================================================================================
00204 // function : ClickOnApply()
00205 // purpose  :
00206 //=================================================================================
00207 bool BlocksGUI_TrsfDlg::ClickOnApply()
00208 {
00209   if (!onAccept())
00210     return false;
00211 
00212   initName();
00213   return true;
00214 }
00215 
00216 //=================================================================================
00217 // function : SelectionIntoArgument()
00218 // purpose  : Called when selection is changed or on dialog initialization or activation
00219 //=================================================================================
00220 void BlocksGUI_TrsfDlg::SelectionIntoArgument()
00221 {
00222   erasePreview();
00223   myEditCurrentArgument->setText("");
00224 
00225   // Get index of current selection focus
00226   int aCurrFocus = -1;
00227   QMap<int, QLineEdit*>::iterator anIter;
00228   for (anIter = mySelName.begin(); anIter != mySelName.end(); ++anIter) {
00229     if (myEditCurrentArgument == anIter.value()) {
00230       aCurrFocus = anIter.key();
00231       break;
00232     }
00233   }
00234 
00235   LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
00236   SALOME_ListIO aSelList;
00237   aSelMgr->selectedObjects(aSelList);
00238 
00239   QString aName;
00240   GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_nil();
00241 
00242   if (aCurrFocus == MainObj1 || aCurrFocus == MainObj2)
00243   {
00244     // If selection of main object is activated
00245     if (aSelList.Extent() == 1) {
00246       anObj = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
00247 
00248       if ( GEOMBase::IsShape(anObj) ) {
00249         aName = GEOMBase::GetName(anObj);
00250       }
00251     }
00252     myEditCurrentArgument->setText(aName);
00253     myShape = anObj;
00254     enableWidgets();
00255   }
00256   else if (aCurrFocus == Face1  || aCurrFocus == Face2  ||
00257            aCurrFocus == Face1U || aCurrFocus == Face2U ||
00258            aCurrFocus == Face1V || aCurrFocus == Face2V) {
00259     // If face selection is activated
00260     int anIndex = -1;
00261     if (aSelList.Extent() == 1) {
00262       anObj = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
00263       if ( GEOMBase::IsShape(anObj) ) {
00264         aName = GEOMBase::GetName(anObj);
00265         TColStd_IndexedMapOfInteger anIndexes;
00266         aSelMgr->GetIndexes(aSelList.First(), anIndexes);
00267 
00268         if (anIndexes.Extent() == 1) {
00269           anIndex = anIndexes(1);
00270           aName += QString(":face_%1").arg(anIndex);
00271         }
00272       }
00273     }
00274     myEditCurrentArgument->setText(aName);
00275     myFaces[aCurrFocus] = anIndex;
00276     processPreview();
00277   }
00278 
00279   switch (aCurrFocus) {
00280     // 1D
00281   case MainObj1:
00282     if (!myShape->_is_nil() && myFaces[Face1] == -1)
00283       mySelBtn[Face1]->click();
00284     break;
00285   case Face1:
00286     if (myFaces[Face1] != -1 && myFaces[Face2] == -1)
00287       mySelBtn[Face2]->click();
00288     break;
00289   case Face2:
00290     if (myFaces[Face2] != -1 && myShape->_is_nil())
00291       mySelBtn[MainObj1]->click();
00292     break;
00293 
00294     // 2D
00295   case MainObj2:
00296     if (!myShape->_is_nil() && myFaces[Face1U] == -1)
00297       mySelBtn[Face1U]->click();
00298     break;
00299   case Face1U:
00300     if (myFaces[Face1U] != -1 && myFaces[Face2U] == -1)
00301       mySelBtn[Face2U]->click();
00302     break;
00303   case Face2U:
00304     if (myFaces[Face2U] != -1 && myFaces[Face1V] == -1)
00305       mySelBtn[Face1V]->click();
00306     break;
00307   case Face1V:
00308     if (myFaces[Face1V] != -1 && myFaces[Face2V] == -1)
00309       mySelBtn[Face2V]->click();
00310     break;
00311   case Face2V:
00312     if (myFaces[Face2V] != -1 && myShape->_is_nil())
00313       mySelBtn[MainObj1]->click();
00314     break;
00315 
00316   default:
00317     break;
00318   }
00319 }
00320 
00321 //=================================================================================
00322 // function : SetEditCurrentArgument()
00323 // purpose  :
00324 //=================================================================================
00325 void BlocksGUI_TrsfDlg::SetEditCurrentArgument()
00326 {
00327   QPushButton* aSender = (QPushButton*)sender();
00328 
00329   // clear selection
00330   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
00331   if (myInitial)
00332     myInitial = false;
00333   else
00334     myGeomGUI->getApp()->selectionMgr()->clearSelected();
00335 
00336   // disable all
00337   switch (myConstructorId) {
00338   case 0:
00339     mySelBtn[MainObj1]->setDown(false);
00340     mySelBtn[Face1]->setDown(false);
00341     mySelBtn[Face2]->setDown(false);
00342 
00343     mySelName[MainObj1]->setEnabled(false);
00344     mySelName[Face1]->setEnabled(false);
00345     mySelName[Face2]->setEnabled(false);
00346     break;
00347   case 1:
00348     mySelBtn[MainObj2]->setDown(false);
00349     mySelBtn[Face1U]->setDown(false);
00350     mySelBtn[Face2U]->setDown(false);
00351     mySelBtn[Face1V]->setDown(false);
00352     mySelBtn[Face2V]->setDown(false);
00353 
00354     mySelName[MainObj2]->setEnabled(false);
00355     mySelName[Face1U]->setEnabled(false);
00356     mySelName[Face2U]->setEnabled(false);
00357     mySelName[Face1V]->setEnabled(false);
00358     mySelName[Face2V]->setEnabled(false);
00359     break;
00360   default:
00361     break;
00362   }
00363 
00364   // set line edit as current argument
00365   QMap<int, QPushButton*>::iterator anIter;
00366   for (anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter) {
00367     if (anIter.value() == aSender) {
00368       myEditCurrentArgument = mySelName[anIter.key()];
00369       break;
00370     }
00371   }
00372 
00373   // enable line edit
00374   myEditCurrentArgument->setEnabled(true);
00375   myEditCurrentArgument->setFocus();
00376 
00377   // enable push button
00378   // after setFocus(), because it will be setDown(false) when loses focus
00379   aSender->setDown(true);
00380 
00381   activateSelection();
00382 }
00383 
00384 //=================================================================================
00385 // function : ActivateThisDialog()
00386 // purpose  :
00387 //=================================================================================
00388 void BlocksGUI_TrsfDlg::ActivateThisDialog()
00389 {
00390   GEOMBase_Skeleton::ActivateThisDialog();
00391   activateSelection();
00392 
00393   // ??
00394   processPreview();
00395 }
00396 
00397 //=================================================================================
00398 // function : enterEvent()
00399 // purpose  :
00400 //=================================================================================
00401 void BlocksGUI_TrsfDlg::enterEvent (QEvent*)
00402 {
00403   if (!mainFrame()->GroupConstructors->isEnabled())
00404     ActivateThisDialog();
00405 }
00406 
00407 //=================================================================================
00408 // function : ValueChangedInSpinBox()
00409 // purpose  :
00410 //=================================================================================
00411 void BlocksGUI_TrsfDlg::ValueChangedInSpinBox(int)
00412 {
00413   processPreview();
00414 }
00415 
00416 //=================================================================================
00417 // function : createSelWg()
00418 // purpose  :
00419 //=================================================================================
00420 void BlocksGUI_TrsfDlg::createSelWg (const QString& theLbl,
00421                                      QPixmap&       thePix,
00422                                      QWidget*       theParent,
00423                                      const int      theId)
00424 {
00425   QLabel* lab = new QLabel(theLbl, theParent);
00426   mySelBtn[theId] = new QPushButton(theParent);
00427   mySelBtn[theId]->setIcon(thePix);
00428   mySelBtn[theId]->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
00429   mySelName[theId] = new QLineEdit(theParent);
00430   mySelName[theId]->setReadOnly(true);
00431   QGridLayout* l = 0;
00432   if (!theParent->layout()) {
00433     l = new QGridLayout(theParent);
00434     l->setMargin(9); l->setSpacing(6);
00435   }
00436   else {
00437     l = qobject_cast<QGridLayout*>(theParent->layout());
00438   }
00439   int row = l->rowCount();
00440   l->addWidget(lab,              row, 0);
00441   l->addWidget(mySelBtn[theId],  row, 1);
00442   l->addWidget(mySelName[theId], row, 2);
00443 }
00444 
00445 //=================================================================================
00446 // function : createSpinWg()
00447 // purpose  :
00448 //=================================================================================
00449 void BlocksGUI_TrsfDlg::createSpinWg (const QString& theLbl,
00450                                       QWidget*       theParent,
00451                                       const int      theId)
00452 {
00453   QLabel* lab = new QLabel(theLbl, theParent);
00454   mySpinBox[theId] = new SalomeApp_IntSpinBox(theParent);
00455   QGridLayout* l = 0;
00456   if (!theParent->layout()) {
00457     l = new QGridLayout(theParent);
00458     l->setMargin(9); l->setSpacing(6);
00459   }
00460   else {
00461     l = qobject_cast<QGridLayout*>(theParent->layout());
00462   }
00463   int row = l->rowCount();
00464   l->addWidget(lab,              row, 0);
00465   l->addWidget(mySpinBox[theId], row, 2);
00466 }
00467 
00468 //=================================================================================
00469 // function : activateSelection
00470 // purpose  : Activate selection in accordance with myEditCurrentArgument
00471 //=================================================================================
00472 void BlocksGUI_TrsfDlg::activateSelection()
00473 {
00474   globalSelection(GEOM_ALLSHAPES);
00475   if (!myShape->_is_nil() &&
00476       (myEditCurrentArgument == mySelName[Face1 ] ||
00477        myEditCurrentArgument == mySelName[Face2 ] ||
00478        myEditCurrentArgument == mySelName[Face1U] ||
00479        myEditCurrentArgument == mySelName[Face2U] ||
00480        myEditCurrentArgument == mySelName[Face1V] ||
00481        myEditCurrentArgument == mySelName[Face2V]))
00482   {
00483     // Local selection is available only in the OCC Viewer
00484     if (getDesktop()->activeWindow()->getViewManager()->getType() == OCCViewer_Viewer::Type()) {
00485       localSelection(myShape, TopAbs_FACE);
00486     }
00487   }
00488   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
00489           this, SLOT(SelectionIntoArgument()));
00490 }
00491 
00492 //=================================================================================
00493 // function : enableWidgets
00494 // purpose  : Enable widgets of faces in accordance with value of main object
00495 //=================================================================================
00496 void BlocksGUI_TrsfDlg::enableWidgets()
00497 {
00498   int anId = getConstructorId();
00499 
00500   bool toEnable = !myShape->_is_nil();
00501 
00502   if (anId == 0) {
00503     //mySelName[Face1]->setEnabled(toEnable);
00504     //mySelName[Face2]->setEnabled(toEnable);
00505     //mySelBtn[Face1]->setEnabled(toEnable);
00506     //mySelBtn[Face2]->setEnabled(toEnable);
00507 
00508     if (!toEnable)  {
00509       mySelName[Face1]->setText("");
00510       mySelName[Face2]->setText("");
00511       myFaces[Face1] = -1;
00512       myFaces[Face2] = -1;
00513     }
00514   }
00515   else if (anId == 1) {
00516     //mySelName[Face1U]->setEnabled(toEnable);
00517     //mySelName[Face2U]->setEnabled(toEnable);
00518     //mySelName[Face1V]->setEnabled(toEnable);
00519     //mySelName[Face2V]->setEnabled(toEnable);
00520     //mySelBtn[Face1U]->setEnabled(toEnable);
00521     //mySelBtn[Face2U]->setEnabled(toEnable);
00522     //mySelBtn[Face1V]->setEnabled(toEnable);
00523     //mySelBtn[Face2V]->setEnabled(toEnable);
00524 
00525     if (!toEnable) {
00526       mySelName[Face1U]->setText("");
00527       mySelName[Face2U]->setText("");
00528       mySelName[Face1V]->setText("");
00529       mySelName[Face2V]->setText("");
00530       myFaces[Face1U] = -1;
00531       myFaces[Face2U] = -1;
00532       myFaces[Face1V] = -1;
00533       myFaces[Face2V] = -1;
00534     }
00535   }
00536 }
00537 
00538 //=================================================================================
00539 // function : createOperation
00540 // purpose  :
00541 //=================================================================================
00542 GEOM::GEOM_IOperations_ptr BlocksGUI_TrsfDlg::createOperation()
00543 {
00544   return getGeomEngine()->GetIBlocksOperations(getStudyId());
00545 }
00546 
00547 //=================================================================================
00548 // function : isValid
00549 // purpose  : Verify validity of input data
00550 //=================================================================================
00551 bool BlocksGUI_TrsfDlg::isValid (QString& msg)
00552 {
00553   bool ok = false, okSP = true;
00554   switch (getConstructorId()) {
00555   case 0:
00556     ok = !myShape->_is_nil() && myFaces[Face1] > 0;
00557     okSP = mySpinBox[SpinBox1]->isValid( msg, !IsPreview() );
00558     break;
00559   case 1:
00560     ok = !myShape->_is_nil() && myFaces[Face1U] > 0 && myFaces[Face1V] > 0;
00561     okSP = mySpinBox[SpinBox2U]->isValid( msg, !IsPreview() ) && okSP;
00562     okSP = mySpinBox[SpinBox2V]->isValid( msg, !IsPreview() ) && okSP;
00563     break;
00564   default:
00565     break;
00566   }
00567   return ok && okSP;
00568 }
00569 
00570 //=================================================================================
00571 // function : execute
00572 // purpose  :
00573 //=================================================================================
00574 bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
00575 {
00576   bool res = false;
00577 
00578   GEOM::GEOM_Object_var anObj;
00579 
00580   GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
00581 
00582   switch (getConstructorId()) {
00583   case 0:
00584     anObj = anOper->MakeMultiTransformation1D(myShape,
00585                                               myFaces[Face1], myFaces[Face2],
00586                                               mySpinBox[SpinBox1]->value());
00587     if (!anObj->_is_nil() && !IsPreview())
00588     {
00589       QStringList aParameters;
00590       aParameters << "" << "";
00591       aParameters << mySpinBox[SpinBox1]->text();
00592       anObj->SetParameters(aParameters.join(":").toLatin1().constData());
00593     }
00594     res = true;
00595     break;
00596   case 1:
00597     anObj = anOper->MakeMultiTransformation2D (myShape,
00598                                                myFaces[Face1U], myFaces[Face2U],
00599                                                mySpinBox[SpinBox2U]->value(),
00600                                                myFaces[Face1V], myFaces[Face2V],
00601                                                mySpinBox[SpinBox2V]->value());
00602     if (!anObj->_is_nil() && !IsPreview())
00603     {
00604       QStringList aParameters;
00605       aParameters << "" << "";
00606       aParameters << mySpinBox[SpinBox2U]->text();
00607       aParameters << "" << "";
00608       aParameters << mySpinBox[SpinBox2V]->text();
00609       anObj->SetParameters(aParameters.join(":").toLatin1().constData());
00610     }
00611     res = true;
00612     break;
00613   default:
00614     break;
00615   }
00616 
00617   if (!anObj->_is_nil())
00618     objects.push_back(anObj._retn());
00619 
00620   return res;
00621 }