Salome HOME
*** empty log message ***
[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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File   : TransformationGUI_MultiTranslationDlg.cxx
23 // Author : Damien COQUERET, Open CASCADE S.A.S.
24 //
25
26 #include "TransformationGUI_MultiTranslationDlg.h"
27
28 #include <GEOM_DlgRef.h>
29 #include <GeometryGUI.h>
30 #include <GEOMBase.h>
31
32 #include <SUIT_ResourceMgr.h>
33 #include <SUIT_Session.h>
34 #include <SalomeApp_Application.h>
35 #include <LightApp_SelectionMgr.h>
36
37 #include <GEOMImpl_Types.hxx>
38
39 //=================================================================================
40 // class    : TransformationGUI_MultiTranslationDlg()
41 // purpose  : Constructs a TransformationGUI_MultiTranslationDlg which is a child of 'parent', with the 
42 //            name 'name' and widget flags set to 'f'.
43 //            The dialog will by default be modeless, unless you set 'modal' to
44 //            TRUE to construct a modal dialog.
45 //=================================================================================
46 TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg
47 ( GeometryGUI* theGeometryGUI, QWidget* parent, bool modal, Qt::WindowFlags fl )
48   : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
49 {
50   SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
51   QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_MULTITRANSLATION_SIMPLE" ) ) );
52   QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_MULTITRANSLATION_DOUBLE" ) ) );
53   QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
54
55   setWindowTitle( tr( "GEOM_MULTITRANSLATION_TITLE" ) );
56
57   /***************************************************************/
58   mainFrame()->GroupConstructors->setTitle( tr( "GEOM_MULTITRANSLATION" ) );
59   mainFrame()->RadioButton1->setIcon( image0 );
60   mainFrame()->RadioButton2->setIcon( image1 );
61   mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
62   mainFrame()->RadioButton3->close();
63
64   GroupPoints = new DlgRef_2Sel2Spin1Check( centralWidget() );
65   GroupPoints->GroupBox1->setTitle( tr( "GEOM_MULTITRANSLATION_SIMPLE" ) );
66   GroupPoints->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
67   GroupPoints->TextLabel2->setText( tr( "GEOM_VECTOR_U" ) );
68   GroupPoints->TextLabel3->setText( tr( "GEOM_STEP_U" ) );
69   GroupPoints->TextLabel4->setText( tr( "GEOM_NB_TIMES_U" ) );
70   GroupPoints->CheckButton1->setText( tr( "GEOM_REVERSE_U" ) );
71   GroupPoints->PushButton1->setIcon( image2 );
72   GroupPoints->PushButton2->setIcon( image2 );
73   GroupPoints->LineEdit1->setReadOnly( true );
74   GroupPoints->LineEdit2->setReadOnly( true );
75
76   GroupDimensions = new DlgRef_3Sel4Spin2Check( centralWidget() );
77   GroupDimensions->GroupBox1->setTitle( tr( "GEOM_MULTITRANSLATION_DOUBLE" ) );
78   GroupDimensions->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
79   GroupDimensions->TextLabel2->setText( tr( "GEOM_VECTOR_U" ) );
80   GroupDimensions->TextLabel3->setText( tr( "GEOM_VECTOR_V" ) );
81   GroupDimensions->TextLabel4->setText( tr( "GEOM_STEP_U" ) );
82   GroupDimensions->TextLabel5->setText( tr( "GEOM_NB_TIMES_U" ) );
83   GroupDimensions->TextLabel6->setText( tr( "GEOM_STEP_V" ) );
84   GroupDimensions->TextLabel7->setText( tr( "GEOM_NB_TIMES_V" ) );
85   GroupDimensions->CheckButton1->setText( tr( "GEOM_REVERSE_U" ) );
86   GroupDimensions->CheckButton2->setText( tr( "GEOM_REVERSE_V" ) );
87   GroupDimensions->PushButton1->setIcon( image2 );
88   GroupDimensions->PushButton2->setIcon( image2 );
89   GroupDimensions->PushButton3->setIcon( image2 );
90   GroupDimensions->LineEdit1->setReadOnly( true );
91   GroupDimensions->LineEdit2->setReadOnly( true );
92   GroupDimensions->LineEdit3->setReadOnly( true );
93
94   QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
95   layout->setMargin( 0 ); layout->setSpacing( 6 );
96   layout->addWidget( GroupPoints );
97   layout->addWidget( GroupDimensions );
98   /***************************************************************/
99
100   setHelpFileName( "multi_translation.htm" );
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   initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 );
129   initSpinBox( GroupPoints->SpinBox_DY, 1.0, MAX_NUMBER, SpecificStep, 3 );
130   GroupPoints->SpinBox_DX->setValue( myStepU );
131   GroupPoints->SpinBox_DY->setValue( myNbTimesU );
132
133   initSpinBox( GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, step, 3 );
134   initSpinBox( GroupDimensions->SpinBox_DY1, 1.0, MAX_NUMBER, SpecificStep, 3 );
135   initSpinBox( GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, 3 );
136   initSpinBox( GroupDimensions->SpinBox_DY2, 1.0, MAX_NUMBER, 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
146   connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
147
148   connect( GroupPoints->PushButton1,     SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
149   connect( GroupPoints->PushButton2,     SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
150   connect( GroupDimensions->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
151   connect( GroupDimensions->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
152   connect( GroupDimensions->PushButton3, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
153
154   connect( GroupPoints->LineEdit1,     SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
155   connect( GroupPoints->LineEdit2,     SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
156   connect( GroupDimensions->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
157   connect( GroupDimensions->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
158   connect( GroupDimensions->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
159
160   connect( GroupPoints->SpinBox_DX,      SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
161   connect( GroupPoints->SpinBox_DY,      SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
162   connect( GroupDimensions->SpinBox_DX1, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
163   connect( GroupDimensions->SpinBox_DY1, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
164   connect( GroupDimensions->SpinBox_DX2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
165   connect( GroupDimensions->SpinBox_DY2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
166
167   // VSR: TODO ->>
168   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX,      SLOT( SetStep( double ) ) );
169   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY,      SLOT( SetStep( double ) ) );
170   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX1, SLOT( SetStep( double ) ) );
171   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY1, SLOT( SetStep( double ) ) );
172   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX2, SLOT( SetStep( double ) ) );
173   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY2, SLOT( SetStep( double ) ) );
174   // <<-
175
176   connect( GroupPoints->CheckButton1,     SIGNAL( toggled( bool ) ), this, SLOT( ReverseStepU() ) );
177   connect( GroupDimensions->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( ReverseStepU() ) );
178   connect( GroupDimensions->CheckButton2, SIGNAL( toggled( bool ) ), this, SLOT( ReverseStepV() ) );
179   
180   connect( myGeomGUI->getApp()->selectionMgr(), 
181            SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
182
183   
184   initName( tr( "GEOM_MULTITRANSLATION" ) );
185
186   ConstructorsClicked( 0 );
187 }
188
189
190 //=================================================================================
191 // function : ConstructorsClicked()
192 // purpose  : Radio button management
193 //=================================================================================
194 void TransformationGUI_MultiTranslationDlg::ConstructorsClicked( int constructorId )
195 {
196   disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
197   
198   myStepU = myStepV = 50.0;
199   myNbTimesU = myNbTimesV = 2;
200
201   globalSelection( GEOM_ALLSHAPES );
202
203   switch ( constructorId ) {
204   case 0: /* Translate simple */
205     {
206       GroupDimensions->hide();
207       GroupPoints->show();
208       
209       myEditCurrentArgument = GroupPoints->LineEdit1;
210       GroupPoints->LineEdit1->setText( "" );
211       GroupPoints->LineEdit2->setText( "" );
212       
213       GroupPoints->SpinBox_DX->setValue( myStepU );
214       GroupPoints->SpinBox_DY->setValue( myNbTimesU );
215         
216       break;
217     }
218   case 1: /* Translate double */
219     {
220       GroupPoints->hide();
221       GroupDimensions->show();
222       
223       myEditCurrentArgument = GroupDimensions->LineEdit1;
224       GroupDimensions->LineEdit1->setText( "" );
225       GroupDimensions->LineEdit2->setText( "" );
226       GroupDimensions->LineEdit3->setText( "" );
227       
228       GroupDimensions->SpinBox_DX1->setValue( myStepU );
229       GroupDimensions->SpinBox_DY1->setValue( myNbTimesU );
230       GroupDimensions->SpinBox_DX2->setValue( myStepV );
231       GroupDimensions->SpinBox_DY2->setValue( myNbTimesV );
232         
233       myVectorV = GEOM::GEOM_Object::_nil();
234       break;
235     }
236   }
237   
238   qApp->processEvents();
239   updateGeometry();
240   resize( minimumSize() );
241
242   myEditCurrentArgument->setFocus();
243   myBase = myVectorU = GEOM::GEOM_Object::_nil();
244   connect( myGeomGUI->getApp()->selectionMgr(), 
245            SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
246 }
247
248
249 //=================================================================================
250 // function : ClickOnOk()
251 // purpose  :
252 //=================================================================================
253 void TransformationGUI_MultiTranslationDlg::ClickOnOk()
254 {
255   if ( ClickOnApply() )
256     ClickOnCancel();
257 }
258
259
260 //=================================================================================
261 // function : ClickOnApply()
262 // purpose  :
263 //=================================================================================
264 bool TransformationGUI_MultiTranslationDlg::ClickOnApply()
265 {
266   if ( !onAccept() )
267     return false;
268   
269   initName();
270   ConstructorsClicked( getConstructorId() );
271   return true;
272 }
273
274
275 //=================================================================================
276 // function : SelectionIntoArgument()
277 // purpose  : Called when selection as changed or other case
278 //=================================================================================
279 void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
280 {
281   myEditCurrentArgument->setText( "" );
282   
283   if ( IObjectCount() != 1 ) {
284     if ( myEditCurrentArgument == GroupPoints->LineEdit1 || 
285          myEditCurrentArgument == GroupDimensions->LineEdit1 )
286       myBase = GEOM::GEOM_Object::_nil();
287     else if ( myEditCurrentArgument == GroupPoints->LineEdit2 || 
288               myEditCurrentArgument == GroupDimensions->LineEdit2 )
289       myVectorU = GEOM::GEOM_Object::_nil();
290     else if ( myEditCurrentArgument == GroupDimensions->LineEdit3 )
291       myVectorV = GEOM::GEOM_Object::_nil();
292     return;
293   }
294
295   // nbSel == 1
296   Standard_Boolean testResult = Standard_False;;
297   GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult );
298
299   if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) )
300     return;
301
302   if ( myEditCurrentArgument == GroupPoints->LineEdit1 || 
303        myEditCurrentArgument == GroupDimensions->LineEdit1 )
304     myBase = aSelectedObject;         
305   else if ( myEditCurrentArgument == GroupPoints->LineEdit2 || 
306             myEditCurrentArgument == GroupDimensions->LineEdit2 )
307     myVectorU = aSelectedObject;
308   else if ( myEditCurrentArgument == GroupDimensions->LineEdit3 ) 
309     myVectorV = aSelectedObject;
310
311   myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
312   
313   displayPreview();     
314 }
315
316
317 //=================================================================================
318 // function : SetEditCurrentArgument()
319 // purpose  :
320 //=================================================================================
321 void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument()
322 {
323   QPushButton* send = (QPushButton*)sender();
324  
325
326   if ( send == GroupPoints->PushButton1 ) {
327     myEditCurrentArgument = GroupPoints->LineEdit1;
328     globalSelection( GEOM_ALLSHAPES );
329   }
330   else if ( send == GroupPoints->PushButton2 ) {
331     myEditCurrentArgument = GroupPoints->LineEdit2;
332     globalSelection( GEOM_LINE  );
333   }
334   else if ( send == GroupDimensions->PushButton1 ) {
335     myEditCurrentArgument = GroupDimensions->LineEdit1;
336     globalSelection( GEOM_ALLSHAPES );
337   }
338   else if ( send == GroupDimensions->PushButton2 ) {
339     myEditCurrentArgument = GroupDimensions->LineEdit2;
340     globalSelection( GEOM_LINE  );
341   }
342   else if ( send == GroupDimensions->PushButton3 ) {
343     myEditCurrentArgument = GroupDimensions->LineEdit3;
344     globalSelection( GEOM_LINE  );
345   }
346   
347   myEditCurrentArgument->setFocus();
348   SelectionIntoArgument();
349 }
350
351
352 //=================================================================================
353 // function : LineEditReturnPressed()
354 // purpose  :
355 //=================================================================================
356 void TransformationGUI_MultiTranslationDlg::LineEditReturnPressed()
357 {
358   QLineEdit* send = (QLineEdit*)sender();
359   if ( send == GroupPoints->LineEdit1 || send == GroupDimensions->LineEdit1 ||
360        send == GroupPoints->LineEdit2 || send == GroupDimensions->LineEdit2 ||
361        send == GroupDimensions->LineEdit3 ) {
362     myEditCurrentArgument = send; 
363     GEOMBase_Skeleton::LineEditReturnPressed();
364   }
365 }
366
367
368 //=================================================================================
369 // function : ActivateThisDialog()
370 // purpose  :
371 //=================================================================================
372 void TransformationGUI_MultiTranslationDlg::ActivateThisDialog()
373 {
374   GEOMBase_Skeleton::ActivateThisDialog();
375   connect( myGeomGUI->getApp()->selectionMgr(), 
376            SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
377
378   ConstructorsClicked( getConstructorId() );
379 }
380
381
382 //=================================================================================
383 // function : enterEvent()
384 // purpose  :
385 //=================================================================================
386 void TransformationGUI_MultiTranslationDlg::enterEvent( QEvent* )
387 {
388   if ( !mainFrame()->GroupConstructors->isEnabled() )
389     ActivateThisDialog();
390 }
391
392
393 //=================================================================================
394 // function : ValueChangedInSpinBox()
395 // purpose  :
396 //=================================================================================
397 void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox( double newValue )
398 {
399   QObject* send = (QObject*)sender();
400
401   switch ( getConstructorId() ) {
402   case 0:
403     if ( send == GroupPoints->SpinBox_DX )
404       myStepU = newValue;
405     else if ( send == GroupPoints->SpinBox_DY )
406       myNbTimesU = (int)newValue;
407     break;
408   case 1 :
409     if ( send == GroupDimensions->SpinBox_DX1 )
410       myStepU = newValue;
411     else if ( send == GroupDimensions->SpinBox_DY1)
412       myNbTimesU = (int)newValue;
413     else if ( send == GroupDimensions->SpinBox_DX2 )
414       myStepV = newValue;
415     else if ( send == GroupDimensions->SpinBox_DY2 )
416       myNbTimesV = (int)newValue;
417     break;
418   }
419   
420   displayPreview();
421 }
422
423
424 //=================================================================================
425 // function : ReverseStepU()
426 // purpose  : 'state' not used here
427 //=================================================================================
428 void TransformationGUI_MultiTranslationDlg::ReverseStepU()
429 {
430   myStepU = -myStepU;
431   
432   int aConstructorId = getConstructorId();
433
434   if ( aConstructorId == 0 )
435     GroupPoints->SpinBox_DX->setValue( myStepU );
436   else if ( aConstructorId == 1 )
437     GroupDimensions->SpinBox_DX1->setValue( myStepU );
438   
439   displayPreview();
440 }
441
442
443 //=================================================================================
444 // function : ReverseStepV
445 // purpose  : 'state' not used here
446 //=================================================================================
447 void TransformationGUI_MultiTranslationDlg::ReverseStepV()
448 {
449   myStepV = -myStepV;
450   
451   GroupDimensions->SpinBox_DX2->setValue( myStepV );
452  
453   displayPreview();
454 }
455
456
457 //=================================================================================
458 // function : createOperation
459 // purpose  :
460 //=================================================================================
461 GEOM::GEOM_IOperations_ptr TransformationGUI_MultiTranslationDlg::createOperation()
462 {
463   return myGeomGUI->GetGeomGen()->GetITransformOperations( getStudyId() );
464 }
465
466
467 //=================================================================================
468 // function : isValid
469 // purpose  :
470 //=================================================================================
471 bool TransformationGUI_MultiTranslationDlg::isValid( QString& /*msg*/ )
472 {
473   int aConstructorId = getConstructorId();
474   
475   if ( aConstructorId == 0 )
476     return !( myBase->_is_nil() || myVectorU->_is_nil() );
477   else if ( aConstructorId == 1 )
478     return !( myBase->_is_nil() || myVectorU->_is_nil() || myVectorV->_is_nil() );
479   return 0;         
480 }
481
482 //=================================================================================
483 // function : execute
484 // purpose  :
485 //=================================================================================
486 bool TransformationGUI_MultiTranslationDlg::execute( ObjectList& objects )
487 {
488   bool res = false;
489   
490   GEOM::GEOM_Object_var anObj;
491
492   switch ( getConstructorId() ) {
493   case 0 :
494     if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVectorU ) ) {
495       anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiTranslate1D( myBase, myVectorU, myStepU, myNbTimesU );
496       res = true;
497     }
498     break;
499   case 1 :
500     if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVectorU ) && 
501          !CORBA::is_nil( myVectorV ) ) {
502       anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiTranslate2D( myBase, myVectorU, myStepU, myNbTimesU,
503                                                                                             myVectorV, myStepV, myNbTimesV );
504       res = true;
505     }
506     break;
507   }
508   
509   if ( !anObj->_is_nil() )
510     objects.push_back( anObj._retn() );
511   
512   return res;
513 }
514
515
516 //=================================================================================
517 // function : closeEvent
518 // purpose  :
519 //=================================================================================
520 void TransformationGUI_MultiTranslationDlg::closeEvent( QCloseEvent* e )
521 {
522   // myGeomGUI->SetState( -1 );
523   GEOMBase_Skeleton::closeEvent( e );
524 }