Salome HOME
Update copyrights 2014.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_CreatePatternDlg.cxx
index ac3c7193196579be1b4678894c07883b0815141f..34771755d5ca05bc1724e060442c09f4ea933f83 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -230,7 +230,7 @@ QWidget* SMESHGUI_CreatePatternDlg::createButtonFrame( QWidget* theParent )
   aLay->addWidget( myHelpBtn );
 
   connect( myOkBtn,    SIGNAL( clicked() ), this, SLOT( onOk() ) );
-  connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( onClose() ) );
+  connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
   connect( mySaveBtn,  SIGNAL( clicked() ), this, SLOT( onSave() ) );
   connect( myHelpBtn,  SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 
@@ -279,7 +279,7 @@ void SMESHGUI_CreatePatternDlg::Init( const int theType )
   connect( mySMESHGUI,     SIGNAL( SignalDeactivateActiveDialog() ),
            this,           SLOT( onDeactivate() ) );
   connect( mySMESHGUI,     SIGNAL( SignalCloseAllDialogs() ),
-           this,           SLOT( onClose() ) );
+           this,           SLOT( reject() ) );
 
   mySwitch2d->setEnabled( theType == Type_2d );
   mySwitch3d->setEnabled( theType == Type_3d );
@@ -482,17 +482,17 @@ void SMESHGUI_CreatePatternDlg::onOk()
 }
 
 //=======================================================================
-// function : onClose()
+// function : reject()
 // purpose  : SLOT called when "Close" button pressed. Close dialog
 //=======================================================================
-void SMESHGUI_CreatePatternDlg::onClose()
+void SMESHGUI_CreatePatternDlg::reject()
 {
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
     aViewWindow->SetSelectionMode( ActorSelection );
   disconnect( mySelectionMgr, 0, this, 0 );
   disconnect( mySMESHGUI, 0, this, 0 );
   mySMESHGUI->ResetState();
-  reject();
+  QDialog::reject();
   emit Close();
 }
 
@@ -648,15 +648,6 @@ void SMESHGUI_CreatePatternDlg::enterEvent( QEvent* )
   }
 }
 
-//=================================================================================
-// function : closeEvent()
-// purpose  : Close dialog box
-//=================================================================================
-void SMESHGUI_CreatePatternDlg::closeEvent( QCloseEvent* )
-{
-  onClose();
-}
-
 //=======================================================================
 // function : onSelBtnClicked()
 // purpose  : SLOT. Called when -> button clicked.