]> SALOME platform Git repositories - modules/geom.git/blob - src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx
Salome HOME
SMH: Merged GEOM (NEWGUI, HEAD, POLYWORK)
[modules/geom.git] / src / TransformationGUI / TransformationGUI_MultiTranslationDlg.cxx
1 //  GEOM GEOMGUI : GUI for Geometry component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : TransformationGUI_MultiTranslationDlg.cxx
25 //  Author : Damien COQUERET
26 //  Module : GEOM
27 //  $Header$
28
29 #include "TransformationGUI_MultiTranslationDlg.h"
30
31 #include "SUIT_Desktop.h"
32 #include "SUIT_Session.h"
33 #include "SalomeApp_Application.h"
34 #include "SalomeApp_SelectionMgr.h"
35
36 #include <qlabel.h>
37
38 #include "GEOMImpl_Types.hxx"
39
40 #include <qcheckbox.h>
41
42 #include "utilities.h"
43
44 using namespace std;
45
46 //=================================================================================
47 // class    : TransformationGUI_MultiTranslationDlg()
48 // purpose  : Constructs a TransformationGUI_MultiTranslationDlg which is a child of 'parent', with the 
49 //            name 'name' and widget flags set to 'f'.
50 //            The dialog will by default be modeless, unless you set 'modal' to
51 //            TRUE to construct a modal dialog.
52 //=================================================================================
53 TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg(GeometryGUI* theGeometryGUI, QWidget* parent,  const char* name, bool modal, WFlags fl)
54   :GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu), myGeometryGUI(theGeometryGUI)
55 {
56   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr("ICON_DLG_MULTITRANSLATION_SIMPLE")));
57   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr("ICON_DLG_MULTITRANSLATION_DOUBLE")));
58   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr("ICON_SELECT")));
59
60   setCaption(tr("GEOM_MULTITRANSLATION_TITLE"));
61
62   /***************************************************************/
63   GroupConstructors->setTitle(tr("GEOM_MULTITRANSLATION"));
64   RadioButton1->setPixmap(image0);
65   RadioButton2->setPixmap(image1);
66   RadioButton3->close(TRUE);
67
68   GroupPoints = new DlgRef_2Sel2Spin1Check(this, "GroupPoints");
69   GroupPoints->GroupBox1->setTitle(tr("GEOM_MULTITRANSLATION_SIMPLE"));
70   GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
71   GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR_U"));
72   GroupPoints->TextLabel3->setText(tr("GEOM_STEP_U"));
73   GroupPoints->TextLabel4->setText(tr("GEOM_NB_TIMES_U"));
74   GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE_U"));
75   GroupPoints->PushButton1->setPixmap(image2);
76   GroupPoints->PushButton2->setPixmap(image2);
77   GroupPoints->LineEdit1->setReadOnly(true);
78   GroupPoints->LineEdit2->setReadOnly(true);
79
80   GroupDimensions = new DlgRef_3Sel4Spin2Check(this, "GroupDimensions");
81   GroupDimensions->GroupBox1->setTitle(tr("GEOM_MULTITRANSLATION_DOUBLE"));
82   GroupDimensions->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
83   GroupDimensions->TextLabel2->setText(tr("GEOM_VECTOR_U"));
84   GroupDimensions->TextLabel3->setText(tr("GEOM_VECTOR_V"));
85   GroupDimensions->TextLabel4->setText(tr("GEOM_STEP_U"));
86   GroupDimensions->TextLabel5->setText(tr("GEOM_NB_TIMES_U"));
87   GroupDimensions->TextLabel6->setText(tr("GEOM_STEP_V"));
88   GroupDimensions->TextLabel7->setText(tr("GEOM_NB_TIMES_V"));
89   GroupDimensions->CheckButton1->setText(tr("GEOM_REVERSE_U"));
90   GroupDimensions->CheckButton2->setText(tr("GEOM_REVERSE_V"));
91   GroupDimensions->PushButton1->setPixmap(image2);
92   GroupDimensions->PushButton2->setPixmap(image2);
93   GroupDimensions->PushButton3->setPixmap(image2);
94   GroupDimensions->LineEdit1->setReadOnly(true);
95   GroupDimensions->LineEdit2->setReadOnly(true);
96   GroupDimensions->LineEdit3->setReadOnly(true);
97
98   Layout1->addWidget(GroupPoints, 2, 0);
99   Layout1->addWidget(GroupDimensions, 2, 0);
100   /***************************************************************/
101
102   Init();
103 }
104
105
106 //=================================================================================
107 // function : ~TransformationGUI_MultiTranslationDlg()
108 // purpose  : Destroys the object and frees any allocated resources
109 //=================================================================================
110 TransformationGUI_MultiTranslationDlg::~TransformationGUI_MultiTranslationDlg()
111 {
112   // no need to delete child widgets, Qt does it all for us
113 }
114
115
116 //=================================================================================
117 // function : Init()
118 // purpose  :
119 //=================================================================================
120 void TransformationGUI_MultiTranslationDlg::Init()
121 {
122   /* Get setting of step value from file configuration */
123   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
124   double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
125   
126   double SpecificStep = 1;
127   /* min, max, step and decimals for spin boxes & initial values */
128   GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
129   GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3);
130   GroupPoints->SpinBox_DX->SetValue(myStepU);
131   GroupPoints->SpinBox_DY->SetValue(myNbTimesU);
132
133   GroupDimensions->SpinBox_DX1->RangeStepAndValidator(-999.999, 999.999, step, 3);
134   GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3);
135   GroupDimensions->SpinBox_DX2->RangeStepAndValidator(-999.999, 999.999, step, 3);
136   GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3);
137   GroupDimensions->SpinBox_DX1->SetValue(myStepU);
138   GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU);
139   GroupDimensions->SpinBox_DX2->SetValue(myStepV);
140   GroupDimensions->SpinBox_DY2->SetValue(myNbTimesV);
141
142   /* signals and slots connections */
143   connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
144   connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
145   connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
146
147   connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
148   connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
149   connect(GroupDimensions->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
150   connect(GroupDimensions->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
151   connect(GroupDimensions->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
152
153   connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
154   connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
155   connect(GroupDimensions->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
156   connect(GroupDimensions->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
157   connect(GroupDimensions->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
158
159   connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
160   connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
161   connect(GroupDimensions->SpinBox_DX1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
162   connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
163   connect(GroupDimensions->SpinBox_DX2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
164   connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
165
166   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
167   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double)));
168   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX1, SLOT(SetStep(double)));
169   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY1, SLOT(SetStep(double)));
170   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX2, SLOT(SetStep(double)));
171   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY2, SLOT(SetStep(double)));
172
173   connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseStepU()));
174   connect(GroupDimensions->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseStepU()));
175   connect(GroupDimensions->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(ReverseStepV()));
176   
177   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
178           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
179
180   
181   initName( tr( "GEOM_MULTITRANSLATION" ) );
182   ConstructorsClicked( 0 );
183 }
184
185
186 //=================================================================================
187 // function : ConstructorsClicked()
188 // purpose  : Radio button management
189 //=================================================================================
190 void TransformationGUI_MultiTranslationDlg::ConstructorsClicked(int constructorId)
191 {
192   disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
193   
194   myStepU = myStepV = 50.0;
195   myNbTimesU = myNbTimesV = 2;
196
197   globalSelection( GEOM_ALLSHAPES );
198
199   switch (constructorId)
200     {
201     case 0: /* Translate simple */
202       {
203         GroupDimensions->hide();
204         resize(0, 0);
205         GroupPoints->show();
206
207         myEditCurrentArgument = GroupPoints->LineEdit1;
208         GroupPoints->LineEdit1->setText("");
209         GroupPoints->LineEdit2->setText("");
210
211         GroupPoints->SpinBox_DX->SetValue(myStepU);
212         GroupPoints->SpinBox_DY->SetValue(myNbTimesU);
213         
214         break;
215       }
216     case 1: /* Translate double */
217       {
218         GroupPoints->hide();
219         resize(0, 0);
220         GroupDimensions->show();
221
222         myEditCurrentArgument = GroupDimensions->LineEdit1;
223         GroupDimensions->LineEdit1->setText("");
224         GroupDimensions->LineEdit2->setText("");
225         GroupDimensions->LineEdit3->setText("");
226
227         GroupDimensions->SpinBox_DX1->SetValue(myStepU);
228         GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU);
229         GroupDimensions->SpinBox_DX2->SetValue(myStepV);
230         GroupDimensions->SpinBox_DY2->SetValue(myNbTimesV);
231         
232         myVectorV = GEOM::GEOM_Object::_nil();
233         break;
234       }
235     }
236   
237   myEditCurrentArgument->setFocus();
238   myBase = myVectorU = GEOM::GEOM_Object::_nil();
239   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
240           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
241 }
242
243
244 //=================================================================================
245 // function : ClickOnOk()
246 // purpose  :
247 //=================================================================================
248 void TransformationGUI_MultiTranslationDlg::ClickOnOk()
249 {
250   if ( ClickOnApply() )
251     ClickOnCancel();
252 }
253
254
255 //=================================================================================
256 // function : ClickOnApply()
257 // purpose  :
258 //=================================================================================
259 bool TransformationGUI_MultiTranslationDlg::ClickOnApply()
260 {
261   if ( !onAccept() )
262     return false;
263   
264   initName();
265   ConstructorsClicked( getConstructorId() );
266   return true;
267 }
268
269
270 //=======================================================================
271 // function : ClickOnCancel()
272 // purpose  :
273 //=======================================================================
274 void TransformationGUI_MultiTranslationDlg::ClickOnCancel()
275 {
276   GEOMBase_Skeleton::ClickOnCancel();
277 }
278
279
280 //=================================================================================
281 // function : SelectionIntoArgument()
282 // purpose  : Called when selection as changed or other case
283 //=================================================================================
284 void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
285 {
286   myEditCurrentArgument->setText("");
287   
288   if(IObjectCount() != 1) {
289     if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1)
290       myBase = GEOM::GEOM_Object::_nil();
291     else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2)
292       myVectorU = GEOM::GEOM_Object::_nil();
293     else if(myEditCurrentArgument == GroupDimensions->LineEdit3)
294       myVectorV = GEOM::GEOM_Object::_nil();
295     return;
296   }
297
298   // nbSel == 1
299   Standard_Boolean testResult = Standard_False;;
300   GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult );
301
302   if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) )
303     return;
304
305   if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1)
306     myBase = aSelectedObject;         
307   else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2)
308     myVectorU = aSelectedObject;
309   else if(myEditCurrentArgument == GroupDimensions->LineEdit3) 
310     myVectorV = aSelectedObject;
311
312   myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
313   
314   displayPreview();     
315 }
316
317
318 //=================================================================================
319 // function : SetEditCurrentArgument()
320 // purpose  :
321 //=================================================================================
322 void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument()
323 {
324   QPushButton* send = (QPushButton*)sender();
325  
326
327   if(send == GroupPoints->PushButton1) {
328     myEditCurrentArgument = GroupPoints->LineEdit1;
329     globalSelection( GEOM_ALLSHAPES );
330   }
331   else if(send == GroupPoints->PushButton2) {
332     myEditCurrentArgument = GroupPoints->LineEdit2;
333     globalSelection( GEOM_LINE  );
334   }
335   else if(send == GroupDimensions->PushButton1) {
336     myEditCurrentArgument = GroupDimensions->LineEdit1;
337     globalSelection( GEOM_ALLSHAPES );
338   }
339   else if(send == GroupDimensions->PushButton2) {
340     myEditCurrentArgument = GroupDimensions->LineEdit2;
341     globalSelection( GEOM_LINE  );
342   }
343   else if(send == GroupDimensions->PushButton3) {
344     myEditCurrentArgument = GroupDimensions->LineEdit3;
345     globalSelection( GEOM_LINE  );
346   }
347   
348   myEditCurrentArgument->setFocus();
349   SelectionIntoArgument();
350 }
351
352
353 //=================================================================================
354 // function : LineEditReturnPressed()
355 // purpose  :
356 //=================================================================================
357 void TransformationGUI_MultiTranslationDlg::LineEditReturnPressed()
358 {
359   QLineEdit* send = (QLineEdit*)sender();
360   if(send == GroupPoints->LineEdit1 || send == GroupDimensions->LineEdit1 ||
361      send == GroupPoints->LineEdit2 || send == GroupDimensions->LineEdit2 ||
362                                        send == GroupDimensions->LineEdit3)
363     {
364       myEditCurrentArgument = send; 
365       GEOMBase_Skeleton::LineEditReturnPressed();
366     }
367 }
368
369
370 //=================================================================================
371 // function : ActivateThisDialog()
372 // purpose  :
373 //=================================================================================
374 void TransformationGUI_MultiTranslationDlg::ActivateThisDialog()
375 {
376   GEOMBase_Skeleton::ActivateThisDialog();
377   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
378           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
379
380   ConstructorsClicked( getConstructorId() );
381 }
382
383
384 //=================================================================================
385 // function : DeactivateActiveDialog()
386 // purpose  : public slot to deactivate if active
387 //=================================================================================
388 void TransformationGUI_MultiTranslationDlg::DeactivateActiveDialog()
389 {
390   GEOMBase_Skeleton::DeactivateActiveDialog();
391 }
392
393
394 //=================================================================================
395 // function : enterEvent()
396 // purpose  :
397 //=================================================================================
398 void TransformationGUI_MultiTranslationDlg::enterEvent(QEvent* e)
399 {
400   if(!GroupConstructors->isEnabled())
401     ActivateThisDialog();
402 }
403
404
405 //=================================================================================
406 // function : ValueChangedInSpinBox()
407 // purpose  :
408 //=================================================================================
409 void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox(double newValue)
410 {
411   QObject* send = (QObject*)sender();
412
413   switch(getConstructorId())
414     {
415     case 0 :
416       { 
417         if(send == GroupPoints->SpinBox_DX)
418           myStepU = newValue;
419         else if(send == GroupPoints->SpinBox_DY)
420           myNbTimesU = (int)newValue;
421         break;
422       }
423     case 1 :
424       { 
425         if(send == GroupDimensions->SpinBox_DX1)
426           myStepU = newValue;
427         else if(send == GroupDimensions->SpinBox_DY1)
428           myNbTimesU = (int)newValue;
429         else if(send == GroupDimensions->SpinBox_DX2)
430           myStepV = newValue;
431         else if(send == GroupDimensions->SpinBox_DY2)
432           myNbTimesV = (int)newValue;
433         break;
434       }
435     }
436   
437   displayPreview();
438 }
439
440
441 //=================================================================================
442 // function : ReverseStepU()
443 // purpose  : 'state' not used here
444 //=================================================================================
445 void TransformationGUI_MultiTranslationDlg::ReverseStepU()
446 {
447   myStepU = -myStepU;
448   
449   int aConstructorId = getConstructorId();
450
451   if(aConstructorId == 0)
452     GroupPoints->SpinBox_DX->SetValue(myStepU);
453   else if(aConstructorId == 1)
454     GroupDimensions->SpinBox_DX1->SetValue(myStepU);
455   
456   displayPreview();
457 }
458
459
460 //=================================================================================
461 // function : ReverseStepV
462 // purpose  : 'state' not used here
463 //=================================================================================
464 void TransformationGUI_MultiTranslationDlg::ReverseStepV()
465 {
466   myStepV = -myStepV;
467   
468   GroupDimensions->SpinBox_DX2->SetValue(myStepV);
469  
470   displayPreview();
471 }
472
473
474 //=================================================================================
475 // function : createOperation
476 // purpose  :
477 //=================================================================================
478 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiTranslationDlg::createOperation()
479 {
480   return myGeometryGUI->GetGeomGen()->GetITransformOperations( getStudyId() );
481 }
482
483
484 //=================================================================================
485 // function : isValid
486 // purpose  :
487 //=================================================================================
488 bool TransformationGUI_MultiTranslationDlg::isValid( QString& msg )
489 {
490   int aConstructorId = getConstructorId();
491   
492   if(aConstructorId == 0)
493     return !(myBase->_is_nil() || myVectorU->_is_nil());
494   else if(aConstructorId == 1)
495     return !(myBase->_is_nil() || myVectorU->_is_nil() || myVectorV->_is_nil());
496   return 0;         
497 }
498
499 //=================================================================================
500 // function : execute
501 // purpose  :
502 //=================================================================================
503 bool TransformationGUI_MultiTranslationDlg::execute( ObjectList& objects )
504 {
505   bool res = false;
506   
507   GEOM::GEOM_Object_var anObj;
508
509   switch ( getConstructorId() ) 
510     {
511     case 0 :
512       {
513         if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVectorU ) ) {
514           anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiTranslate1D( myBase, myVectorU, myStepU, myNbTimesU );
515           res = true;
516         }
517         break;
518       }
519     case 1 :
520       {
521         if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVectorU ) && !CORBA::is_nil( myVectorV ) )
522           {
523             anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiTranslate2D( myBase, myVectorU, myStepU, myNbTimesU,
524                                                                                                           myVectorV, myStepV, myNbTimesV );
525             res = true;
526           }
527         break;
528       }
529     }
530   
531   if ( !anObj->_is_nil() )
532     objects.push_back( anObj._retn() );
533   
534   return res;
535 }
536
537
538 //=================================================================================
539 // function : closeEvent
540 // purpose  :
541 //=================================================================================
542 void  TransformationGUI_MultiTranslationDlg::closeEvent( QCloseEvent* e )
543 {
544   // myGeomGUI->SetState( -1 );
545   GEOMBase_Skeleton::closeEvent( e );
546 }