Salome HOME
e21f745ece36b8a7c206181f2acfe9a32a235ef4
[modules/geom.git] / src / BasicGUI / BasicGUI_PointDlg.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   : BasicGUI_PointDlg.cxx
25 //  Author : Lucien PIGNOLONI
26 //  Module : GEOM
27 //  $Header$
28
29 #include "BasicGUI_PointDlg.h"
30
31 #include "SUIT_Session.h"
32 #include "SalomeApp_Application.h"
33 #include "LightApp_SelectionMgr.h"
34
35 #include "GEOMImpl_Types.hxx"
36
37 #include <qlabel.h>
38
39 #include "utilities.h"
40
41 #include <gp_Pnt.hxx>
42 #include <TopoDS_Shape.hxx>
43 #include <TopoDS_Vertex.hxx>
44 #include <TopAbs_ShapeEnum.hxx>
45 #include <TopoDS.hxx>
46 #include <BRep_Tool.hxx>
47 #include <TopExp.hxx>
48 #include <TColStd_IndexedMapOfInteger.hxx>
49 #include <TopTools_IndexedMapOfShape.hxx>
50
51 #include <qapplication.h>
52 using namespace std;
53 //=================================================================================
54 // class    : BasicGUI_PointDlg()
55 // purpose  : Constructs a BasicGUI_PointDlg which is a child of 'parent', with the 
56 //            name 'name' and widget flags set to 'f'.
57 //            The dialog will by default be modeless, unless you set 'modal' to
58 //            TRUE to construct a modal dialog.
59 //=================================================================================
60 BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl)
61   :GEOMBase_Skeleton(parent, name, modal, fl ), myGeometryGUI(theGeometryGUI)
62 {
63   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT")));
64   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT_EDGE")));
65   QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
66   QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_POINT_REF")));
67
68   setCaption(tr("GEOM_POINT_TITLE"));
69
70   QGroupBox* aFrame = new QGroupBox( 1, Qt::Horizontal, this );
71   aFrame->setInsideMargin( 0 );
72   aFrame->setFrameStyle( QFrame::NoFrame );
73
74   /***************************************************************/
75   GroupConstructors->setTitle(tr("GEOM_POINTS"));
76   RadioButton1->setPixmap(image0);
77   RadioButton2->setPixmap(image3);
78   RadioButton3->setPixmap(image1);
79
80   GroupXYZ = new DlgRef_3Spin( aFrame, "GroupXYZ" );
81   GroupXYZ->GroupBox1->setTitle(tr("GEOM_COORDINATES"));
82   GroupXYZ->TextLabel1->setText(tr("GEOM_X"));
83   GroupXYZ->TextLabel2->setText(tr("GEOM_Y"));
84   GroupXYZ->TextLabel3->setText(tr("GEOM_Z"));
85
86   GroupOnCurve = new DlgRef_1Sel1Spin( aFrame, "GroupOnCurve" );
87   GroupOnCurve->GroupBox1->setTitle(tr("GEOM_PARAM_POINT"));
88   GroupOnCurve->TextLabel1->setText(tr("GEOM_EDGE"));
89   GroupOnCurve->TextLabel2->setText(tr("GEOM_PARAMETER"));
90   GroupOnCurve->PushButton1->setPixmap(image2);
91
92   GroupRefPoint = new DlgRef_1Sel3Spin( aFrame, "GoupRefPoint" );
93   GroupRefPoint->GroupBox1->setTitle(tr("GEOM_REF_POINT"));
94   GroupRefPoint->TextLabel1->setText(tr("GEOM_POINT"));
95   GroupRefPoint->PushButton1->setPixmap(image2);
96   GroupRefPoint->TextLabel2->setText(tr("GEOM_DX"));
97   GroupRefPoint->TextLabel3->setText(tr("GEOM_DY"));
98   GroupRefPoint->TextLabel4->setText(tr("GEOM_DZ"));
99
100   Layout1->addWidget( aFrame, 2, 0 );
101   /***************************************************************/
102
103   myCoordGrp = new QGroupBox( 2, Qt::Horizontal, tr( "GEOM_COORDINATES" ), aFrame );
104   new QLabel( tr( "GEOM_X" ), myCoordGrp );
105   myX = new QLineEdit( myCoordGrp );
106   new QLabel( tr( "GEOM_Y" ), myCoordGrp );
107   myY = new QLineEdit( myCoordGrp );
108   new QLabel( tr( "GEOM_Z" ), myCoordGrp );
109   myZ = new QLineEdit( myCoordGrp );
110
111   myX->setReadOnly( true );
112   myY->setReadOnly( true );
113   myZ->setReadOnly( true );
114
115   myX->setEnabled( false );
116   myY->setEnabled( false );
117   myZ->setEnabled( false );
118
119   QPalette aPal = myX->palette();
120   aPal.setColor( QPalette::Disabled, QColorGroup::Text, QColor( 0, 0, 0 ) ) ;
121   myX->setPalette( aPal );
122   myY->setPalette( aPal );
123   myZ->setPalette( aPal );
124  
125   Init();
126 }
127
128
129 //=======================================================================
130 // function : ~BasicGUI_PointDlg()
131 // purpose  : Destructor
132 //=======================================================================
133 BasicGUI_PointDlg::~BasicGUI_PointDlg()
134 {
135 }
136
137
138 //=================================================================================
139 // function : Init()
140 // purpose  :
141 //=================================================================================
142 void BasicGUI_PointDlg::Init()
143 {
144   GroupOnCurve->LineEdit1->setReadOnly( true );
145   GroupRefPoint->LineEdit1->setReadOnly( true );
146
147   myEdge = GEOM::GEOM_Object::_nil();
148   myRefPoint = GEOM::GEOM_Object::_nil();
149
150   myEditCurrentArgument = 0;
151
152   // myGeometryGUI->SetState( 0 );
153
154   /* Get setting of step value from file configuration */
155   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
156   double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
157   
158   /* min, max, step and decimals for spin boxes */
159   GroupXYZ->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
160   GroupXYZ->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
161   GroupXYZ->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
162   GroupXYZ->SpinBox_DX->SetValue(0.0);
163   GroupXYZ->SpinBox_DY->SetValue(0.0);
164   GroupXYZ->SpinBox_DZ->SetValue(0.0);
165
166   GroupRefPoint->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
167   GroupRefPoint->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
168   GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
169   GroupRefPoint->SpinBox_DX->SetValue(0.0);
170   GroupRefPoint->SpinBox_DY->SetValue(0.0);
171   GroupRefPoint->SpinBox_DZ->SetValue(0.0);
172
173   step = 0.1;
174   GroupOnCurve->SpinBox_DX->RangeStepAndValidator(0., 1., step, 3);
175   GroupOnCurve->SpinBox_DX->SetValue( 0.5 );
176
177   /* signals and slots connections */
178   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
179   connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
180   connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
181
182   connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
183   connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
184   connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
185
186   connect(GroupOnCurve->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
187   connect(GroupOnCurve->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
188
189   connect(GroupOnCurve->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
190   connect(GroupXYZ->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
191   connect(GroupXYZ->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
192   connect(GroupXYZ->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
193   connect(GroupRefPoint->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
194   connect(GroupRefPoint->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
195   connect(GroupRefPoint->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
196
197   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupOnCurve->SpinBox_DX, SLOT(SetStep(double)));
198   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupXYZ->SpinBox_DX, SLOT(SetStep(double)));
199   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupXYZ->SpinBox_DY, SLOT(SetStep(double)));
200   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupXYZ->SpinBox_DZ, SLOT(SetStep(double)));
201   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupRefPoint->SpinBox_DX, SLOT(SetStep(double)));
202   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupRefPoint->SpinBox_DY, SLOT(SetStep(double)));
203   connect(myGeometryGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupRefPoint->SpinBox_DZ, SLOT(SetStep(double)));
204
205   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
206           SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));  
207   
208   initName( tr("GEOM_VERTEX") );
209   
210   ConstructorsClicked( 0 );
211 }
212
213
214 //=================================================================================
215 // function : ConstructorsClicked()
216 // purpose  : Radio button management
217 //=================================================================================
218 void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
219 {  
220   switch ( constructorId )
221   {
222   case 0:
223     {
224       localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
225
226       GroupRefPoint->hide();
227       GroupOnCurve->hide();
228
229       GroupXYZ->show();
230
231       myCoordGrp->hide();
232       break;
233     }
234   case 1:
235     {
236       myEditCurrentArgument = GroupRefPoint->LineEdit1;
237       myEditCurrentArgument->setText("");
238       myRefPoint = GEOM::GEOM_Object::_nil();
239
240       globalSelection( GEOM_POINT );
241
242       GroupXYZ->hide();
243       GroupOnCurve->hide();
244
245       GroupRefPoint->show();
246       
247       myCoordGrp->show();
248       break;
249     }
250   case 2:
251     {
252       myEditCurrentArgument = GroupOnCurve->LineEdit1;
253       myEditCurrentArgument->setText("");
254       myEdge = GEOM::GEOM_Object::_nil();
255
256       globalSelection( GEOM_EDGE );
257
258       GroupXYZ->hide();
259       GroupRefPoint->hide();
260
261       GroupOnCurve->show();
262       
263       myCoordGrp->show();
264       break;
265     }
266   }
267
268   myX->setText( "" );
269   myY->setText( "" );
270   myZ->setText( "" );
271
272   qApp->processEvents();
273   updateGeometry();
274   resize( minimumSize() );
275
276   SelectionIntoArgument();
277 }
278
279
280 //=================================================================================
281 // function : ClickOnOk()
282 // purpose  :
283 //=================================================================================
284 void BasicGUI_PointDlg::ClickOnOk()
285 {
286   if ( onAccept() )
287     ClickOnCancel();
288 }
289
290
291 //=================================================================================
292 // function : ClickOnApply()
293 // purpose  :
294 //=================================================================================
295 bool BasicGUI_PointDlg::ClickOnApply()
296 {
297   if ( !onAccept() )
298     return false;
299   
300   initName();
301   ConstructorsClicked( getConstructorId() );
302   return true;
303 }
304
305
306 //=======================================================================
307 // function : ClickOnCancel()
308 // purpose  :
309 //=======================================================================
310 void BasicGUI_PointDlg::ClickOnCancel()
311 {
312   GEOMBase_Skeleton::ClickOnCancel();
313 }
314
315
316 //=================================================================================
317 // function : SelectionIntoArgument()
318 // purpose  : Called when selection as changed (for constructors not using local context)
319 //=================================================================================
320 void BasicGUI_PointDlg::SelectionIntoArgument()
321 {
322   const int id = getConstructorId();
323
324   if ( ( id == 1 || id == 2 ) && myEditCurrentArgument != 0 )
325     {
326       myEditCurrentArgument->setText("");
327       myX->setText( "" );
328       myY->setText( "" );
329       myZ->setText( "" );
330       myRefPoint = myEdge = GEOM::GEOM_Object::_nil();
331     }
332         
333   if ( IObjectCount() == 1 )
334     {
335       Standard_Boolean aRes = Standard_False;
336       Handle(SALOME_InteractiveObject) anIO = firstIObject();
337       GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
338       if ( !CORBA::is_nil( aSelectedObject ) && aRes )
339         {
340           if ( id == 0 )
341             {
342               // get CORBA reference to data object
343               TopoDS_Shape aShape = myGeometryGUI->GetShapeReader().GetShape( myGeometryGUI->GetGeomGen(), aSelectedObject );
344               if ( aShape.IsNull() )
345                 return;
346               
347               if ( aShape.ShapeType() != TopAbs_VERTEX )
348                 {
349                   TColStd_IndexedMapOfInteger aMap;
350                   
351                   ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( anIO, aMap );
352                   
353                   if ( aMap.Extent() == 1 )
354                     {
355                       int anIndex = aMap( 1 );
356                       TopTools_IndexedMapOfShape aShapes;
357                       TopExp::MapShapes( aShape, aShapes );
358                       aShape = aShapes.FindKey( anIndex );
359
360                       if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX )
361                         return;
362                     }
363                   else
364                     return;
365                 }
366
367               gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
368               GroupXYZ->SpinBox_DX->SetValue( aPnt.X() );
369               GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() );
370               GroupXYZ->SpinBox_DZ->SetValue( aPnt.Z() );
371             }
372           else if ( id == 1 )
373             {
374               myRefPoint = aSelectedObject;
375               GroupRefPoint->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
376             }
377           else if ( id == 2 )
378             {
379               myEdge = aSelectedObject;
380               GroupOnCurve->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
381             }
382         }
383     }
384   
385   displayPreview();
386 }
387
388
389 //=================================================================================
390 // function : LineEditReturnPressed()
391 // purpose  :
392 //=================================================================================
393 void BasicGUI_PointDlg::LineEditReturnPressed()
394 {
395   QLineEdit* send = (QLineEdit*)sender();
396   if ( send == GroupRefPoint->LineEdit1 || send == GroupOnCurve->LineEdit1 )
397     {
398       myEditCurrentArgument = send;
399       GEOMBase_Skeleton::LineEditReturnPressed();
400     }
401 }
402
403
404 //=================================================================================
405 // function : SetEditCurrentArgument()
406 // purpose  :
407 //=================================================================================
408 void BasicGUI_PointDlg::SetEditCurrentArgument()
409 {
410   QPushButton* send = (QPushButton*)sender();
411
412   if ( send == GroupRefPoint->PushButton1 )
413   {
414     GroupRefPoint->LineEdit1->setFocus();
415     myEditCurrentArgument = GroupRefPoint->LineEdit1;
416     
417     globalSelection( GEOM_POINT );
418   }
419   else if ( send == GroupOnCurve->PushButton1 )
420   {
421     GroupOnCurve->LineEdit1->setFocus();
422     myEditCurrentArgument = GroupOnCurve->LineEdit1;
423     
424     globalSelection( GEOM_EDGE );
425   }
426 }
427
428
429 //=================================================================================
430 // function : enterEvent()
431 // purpose  : to reactivate this dialog box when mouse enter onto the window
432 //=================================================================================
433 void BasicGUI_PointDlg::enterEvent(QEvent* e)
434 {
435   if ( !GroupConstructors->isEnabled() )
436     ActivateThisDialog();
437 }
438
439
440 //=================================================================================
441 // function : ActivateThisDialog()
442 // purpose  :
443 //=================================================================================
444 void BasicGUI_PointDlg::ActivateThisDialog( )
445 {
446   GEOMBase_Skeleton::ActivateThisDialog();
447   // myGeometryGUI->SetState( 0 );
448   ConstructorsClicked( getConstructorId() );
449 }
450
451
452 //=================================================================================
453 // function : DeactivateActiveDialog()
454 // purpose  : public slot to deactivate if active
455 //=================================================================================
456 void BasicGUI_PointDlg::DeactivateActiveDialog()
457 {
458   // myGeometryGUI->SetState( -1 );
459   GEOMBase_Skeleton::DeactivateActiveDialog();
460 }
461
462
463 //=================================================================================
464 // function : ValueChangedInSpinBox()
465 // purpose  :
466 //=================================================================================
467 void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
468 {
469   displayPreview();
470 }
471
472 //=======================================================================
473 // funcion  : getParameter()
474 // purpose  :
475 //=======================================================================
476 double BasicGUI_PointDlg::getParameter() const
477 {
478   return GroupOnCurve->SpinBox_DX->GetValue();
479 }
480
481 //=================================================================================
482 // function : OnPointSelected
483 // purpose  :
484 //=================================================================================
485 void BasicGUI_PointDlg::OnPointSelected( const gp_Pnt& thePnt )
486 {
487   if ( getConstructorId() == 0 )
488   {
489     GroupXYZ->SpinBox_DX->SetValue( thePnt.X() );
490     GroupXYZ->SpinBox_DY->SetValue( thePnt.Y() );
491     GroupXYZ->SpinBox_DZ->SetValue( thePnt.Z() );
492
493     displayPreview();
494   }
495 }
496
497 //=================================================================================
498 // function : createOperation
499 // purpose  :
500 //=================================================================================
501 GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation()
502 {
503   return myGeometryGUI->GetGeomGen()->GetIBasicOperations( getStudyId() );
504 }
505
506 //=================================================================================
507 // function : isValid
508 // purpose  :
509 //=================================================================================
510 bool BasicGUI_PointDlg::isValid( QString& msg )
511 {
512   const int id = getConstructorId();
513   if ( id == 0 )
514     return true;
515   else if ( id == 1 )
516     return !myRefPoint->_is_nil();
517   else if ( id == 2 )
518     return !myEdge->_is_nil();
519   return false;
520 }
521
522 //=================================================================================
523 // function : execute
524 // purpose  :
525 //=================================================================================
526 bool BasicGUI_PointDlg::execute( ObjectList& objects )
527 {
528   bool res = false;
529
530   GEOM::GEOM_Object_var anObj;
531
532   switch ( getConstructorId() )
533   {
534   case 0 :
535   {
536     double x = GroupXYZ->SpinBox_DX->GetValue();
537     double y = GroupXYZ->SpinBox_DY->GetValue();
538     double z = GroupXYZ->SpinBox_DZ->GetValue();
539       
540     anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointXYZ( x,y,z );
541     res = true;
542     break;
543   }
544   case 1 :
545   {
546     double dx = GroupRefPoint->SpinBox_DX->GetValue();
547     double dy = GroupRefPoint->SpinBox_DY->GetValue();
548     double dz = GroupRefPoint->SpinBox_DZ->GetValue();
549   
550     anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointWithReference( myRefPoint, dx, dy, dz );
551     res = true;
552     break;
553   }
554   case 2 :
555     anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointOnCurve( myEdge, getParameter() );
556     res = true;
557     break;
558   }
559
560   if ( getConstructorId() == 1 || getConstructorId() == 2 )
561   {
562     TopoDS_Shape aShape;
563     if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
564     {
565       gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
566       myX->setText( QString( "%1" ).arg( aPnt.X() ) );
567       myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
568       myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
569     }
570     else
571     {
572       myX->setText( "" );
573       myY->setText( "" );
574       myZ->setText( "" );
575     }
576   }
577   
578   if ( !anObj->_is_nil() )
579   {
580     //printf( "--> a valid point is created\n" );
581     objects.push_back( anObj._retn() );
582   }
583
584   return res;
585 }
586
587 //=================================================================================
588 // function : closeEvent
589 // purpose  :
590 //=================================================================================
591 void BasicGUI_PointDlg::closeEvent( QCloseEvent* e )
592 {
593   // myGeometryGUI->SetState( -1 );
594   GEOMBase_Skeleton::closeEvent( e );
595 }