using reject() slot instead of closeEvent() and hideEvent().
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()),SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
/* to close dialog if study frame change */
- connect(mySMESHGUI, SIGNAL(SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL(SignalStudyFrameChanged()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
if (Reverse)
connect(Reverse, SIGNAL(stateChanged(int)), SLOT(CheckBox(int)));
void SMESHGUI_AddMeshElementDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_AddMeshElementDlg::ClickOnCancel()
+void SMESHGUI_AddMeshElementDlg::reject()
{
//mySelectionMgr->clearSelected();
mySimulation->SetVisibility(false);
aViewWindow->SetSelectionMode( ActorSelection );
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_AddMeshElementDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=================================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=================================================================================
-void SMESHGUI_AddMeshElementDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : CheckBox()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
- void hideEvent( QHideEvent* ); /* ESC key */
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void keyPressEvent( QKeyEvent* );
void displaySimulation();
QString myHelpFileName;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
connect(myReverseCB, SIGNAL(stateChanged(int)), SLOT(onReverse(int)));
connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
- connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(reject()));
myCurrentLineEdit = myCornerNodes;
void SMESHGUI_AddQuadraticElementDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel()
+void SMESHGUI_AddQuadraticElementDlg::reject()
{
mySelectionMgr->clearSelected();
mySimulation->SetVisibility(false);
aViewWindow->SetSelectionMode( ActorSelection );
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_AddQuadraticElementDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=================================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=================================================================================
-void SMESHGUI_AddQuadraticElementDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : onReverse()
// purpose :
typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
void Init();
- void closeEvent( QCloseEvent* );
- void hideEvent( QHideEvent* ); /* ESC key */
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void keyPressEvent( QKeyEvent* );
void displaySimulation();
QString myHelpFileName;
+protected slots:
+ virtual void reject();
+
private slots:
void onTextChange( const QString& );
void onCellTextChange( int, int );
void onCellDoubleClicked( int, int );
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetCurrentSelection();
// signals and slots connections
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
LineEditName->setText(GetDefaultName(tr("COMPOUND_MESH")));
LineEditMeshes->setFocus();
{
setIsApplyAndClose( true );
if (ClickOnApply())
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_BuildCompoundDlg::ClickOnCancel()
+void SMESHGUI_BuildCompoundDlg::reject()
{
//mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_BuildCompoundDlg::closeEvent( QCloseEvent* )
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_BuildCompoundDlg::hideEvent( QHideEvent* )
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
-
//=================================================================================
// function : keyPressEvent()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
bool isValid();
bool myIsApplyAndClose;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SelectionIntoArgument();
connect(PreviewCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnPreviewToggle(bool)));
connect(AutoApplyCheckBox, SIGNAL(toggled(bool)), this, SLOT(onAutoApply(bool)));
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
/* to close dialog if study frame change */
- connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(reject()));
this->show();
}
void SMESHGUI_ClippingDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=======================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=======================================================================
-void SMESHGUI_ClippingDlg::ClickOnCancel()
+void SMESHGUI_ClippingDlg::reject()
{
- close();
+ //here we can insert actions to do at close.
+ QDialog::reject();
}
//=================================================================================
bool myIsSelectPlane;
QString myHelpFileName;
+protected slots:
+ virtual void reject();
+
public slots:
void onSelectPlane( int );
void ClickOnNew();
void OnPreviewToggle( bool );
void onAutoApply(bool);
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
};
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySelectionMgr, SIGNAL (currentSelectionChanged()),
this, SLOT (SelectionIntoArgument()));
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()),/* to close dialog if study change */
- this, SLOT (ClickOnCancel()));
+ this, SLOT (reject()));
connect(myLineEditElements, SIGNAL(textChanged(const QString&)),
this, SLOT (onTextChange(const QString&)));
{
setIsApplyAndClose( true );
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_CopyMeshDlg::ClickOnCancel()
+void SMESHGUI_CopyMeshDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
if ( mySelectionMgr )
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_CopyMeshDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_CopyMeshDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
private:
void Init( bool = true );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
void setNewMeshName();
bool myIsApplyAndClose;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SelectionIntoArgument();
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() ) );
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 );
}
//=======================================================================
-// 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();
}
}
}
-//=================================================================================
-// function : closeEvent()
-// purpose : Close dialog box
-//=================================================================================
-void SMESHGUI_CreatePatternDlg::closeEvent( QCloseEvent* )
-{
- onClose();
-}
-
//=======================================================================
// function : onSelBtnClicked()
// purpose : SLOT. Called when -> button clicked.
void Close();
private:
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
private slots:
void onOk();
void onSave();
- void onClose();
+ void reject();
void onHelp();
void onDeactivate();
/* signals and slots connections */
connect(buttonOk, SIGNAL( clicked() ), SLOT( ClickOnOk() ) );
- connect(buttonCancel, SIGNAL( clicked() ), SLOT( ClickOnCancel() ) );
+ connect(buttonCancel, SIGNAL( clicked() ), SLOT( reject() ) );
connect(buttonApply, SIGNAL( clicked() ), SLOT( ClickOnApply() ) );
connect(buttonHelp, SIGNAL( clicked() ), SLOT( ClickOnHelp() ) );
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect( Preview, SIGNAL(toggled(bool)), this, SLOT(ClickOnPreview(bool)));
/* to close dialog if study change */
- connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
+ connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( reject() ) );
ConstructorsClicked(0);
SelectionIntoArgument();
{
if(checkEditLine(false) == -1) {return;}
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
+void SMESHGUI_CreatePolyhedralVolumeDlg::reject()
{
mySelectionMgr->clearFilters();
//SALOME_ListIO aList;
aViewWindow->SetSelectionMode( ActorSelection );
disconnect( mySelectionMgr, 0, this, 0 );
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_CreatePolyhedralVolumeDlg::closeEvent( QCloseEvent* e )
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-
-void SMESHGUI_CreatePolyhedralVolumeDlg::hideEvent ( QHideEvent * e )
-{
- if ( !isMinimized() )
- ClickOnCancel();
-}
-
-
//=================================================================================
// function : GetConstructorId()
// purpose :
typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
void displaySimulation();
void onAdd();
void onRemove();
+protected slots:
+ virtual void reject();
+
private slots:
void ConstructorsClicked( int );
void ClickOnPreview( bool );
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
// connect signals and slots
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
- connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
+ connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
// selection and SMESHGUI
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
// set selection mode
mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
void SMESHGUI_DeleteGroupDlg::onOk()
{
if (onApply())
- onClose();
+ reject();
}
//=================================================================================
-// function : onClose()
+// function : reject()
// purpose : SLOT called when "Close" button pressed. Close dialog
//=================================================================================
-void SMESHGUI_DeleteGroupDlg::onClose()
+void SMESHGUI_DeleteGroupDlg::reject()
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
mySelectionMgr->clearFilters();
- reject();
+ QDialog::reject();
}
//=================================================================================
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_DeleteGroupDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
void Init ();
private:
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
+protected slots:
+ virtual void reject();
+
private slots:
void onOk();
bool onApply();
- void onClose();
void onHelp();
void onDeactivate();
connect(mySelectButton3, SIGNAL (clicked()), this, SLOT(onEditCurrentArgument()));
connect(myButtonOk, SIGNAL(clicked()), this, SLOT(onOk()));
- connect(myButtonClose, SIGNAL(clicked()), this, SLOT(onClose()));
+ connect(myButtonClose, SIGNAL(clicked()), this, SLOT(reject()));
connect(myButtonApply, SIGNAL(clicked()), this, SLOT(onApply()));
connect(myButtonHelp, SIGNAL(clicked()), this, SLOT(onHelp()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionChanged()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
}
/*!
void SMESHGUI_DuplicateNodesDlg::onOk()
{
if (onApply())
- onClose();
+ reject();
}
/*!
\brief SLOT called to close the dialog.
*/
-void SMESHGUI_DuplicateNodesDlg::onClose()
+void SMESHGUI_DuplicateNodesDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
mySelectionMgr->clearFilters();
- reject();
+ QDialog::reject();
}
/*!
}
}
-/*!
- \brief Receive close events.
- Reimplemented from QWidget class.
-*/
-void SMESHGUI_DuplicateNodesDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-
/*!
\brief Receive key press events.
Reimplemented from QWidget class.
bool isValid();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
+protected slots:
+ virtual void reject();
+
private slots:
void onConstructorsClicked( int );
void onOk();
- void onClose();
bool onApply();
void onHelp();
/***************************************************************/
// signals and slots connections
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
void SMESHGUI_ExtrusionDlg::ClickOnOk()
{
if (ClickOnApply())
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose : Called when dialog box is closed
//=================================================================================
-void SMESHGUI_ExtrusionDlg::ClickOnCancel()
+void SMESHGUI_ExtrusionDlg::reject()
{
- reject();
+ disconnect(mySelectionMgr, 0, this, 0);
+ mySelectionMgr->clearFilters();
+ //mySelectionMgr->clearSelected();
+ if (SMESH::GetCurrentVtkView()) {
+ SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+ SMESH::SetPointRepresentation(false);
+ SMESH::SetPickable();
+ }
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
+ mySMESHGUI->ResetState();
+
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_ExtrusionDlg::closeEvent( QCloseEvent* )
-{
- /* same than click on cancel button */
- disconnect(mySelectionMgr, 0, this, 0);
- mySelectionMgr->clearFilters();
- //mySelectionMgr->clearSelected();
- if (SMESH::GetCurrentVtkView()) {
- SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
- SMESH::SetPointRepresentation(false);
- SMESH::SetPickable();
- }
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
- mySMESHGUI->ResetState();
-}
-
-void SMESHGUI_ExtrusionDlg::reject()
-{
- QDialog::reject();
- close();
-}
-
//=================================================================================
// function : onSelectMesh()
// purpose :
SMESHGUI_ExtrusionDlg( SMESHGUI* );
~SMESHGUI_ExtrusionDlg();
- void reject();
-
private:
void Init( bool = true );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void closeEvent( QCloseEvent* );
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
void getExtrusionVector(SMESH::DirStruct& aVector);
SMESHGUI_FilterDlg* myFilterDlg;
protected slots:
- virtual void onDisplaySimulation( bool );
+ virtual void onDisplaySimulation( bool );
+ virtual void reject();
private slots:
void ConstructorsClicked( int );
void CheckIsEnable();
void ClickOnOk();
bool ClickOnApply();
- void ClickOnCancel();
void ClickOnHelp();
void ClickOnRadio();
void SetEditCurrentArgument();
aLay->addWidget(myButtons[ BTN_Help ]);
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
- connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
+ connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(reject()));
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
updateMainButtons();
updateSelection();
}
//=======================================================================
-// name : SMESHGUI_FilterDlg::onClose
+// name : SMESHGUI_FilterDlg::reject
// Purpose : SLOT called when "Close" button pressed. Close dialog
//=======================================================================
-void SMESHGUI_FilterDlg::onClose()
+void SMESHGUI_FilterDlg::reject()
{
// Restore previously selected object
if (mySelectionMgr)
disconnect(mySMESHGUI, 0, this, 0);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
- return;
+ QDialog::reject();
}
//=================================================================================
setEnabled(true);
}
-//=======================================================================
-// name : closeEvent()
-// Purpose :
-//=======================================================================
-void SMESHGUI_FilterDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-
//=======================================================================
// name : SMESHGUI_FilterDlg::getIdsFromWg
// Purpose : Retrieve list of ids from given widget
void Accepted();
+protected slots:
+ virtual void reject();
+
private slots:
void onOk();
bool onApply();
- void onClose();
void onHelp();
void onDeactivate();
void onSelectionDone();
void construct( const QList<int>& );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
aLay->addWidget(myButtons[ BTN_Help ]);
connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
- connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose()));
+ connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(reject()));
connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));
setEnabled(true);
connect( mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+ connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
if (myMode == ADD_TO)
{
void SMESHGUI_FilterLibraryDlg::onOk()
{
if (onApply())
- {
- disconnect( mySMESHGUI, 0, this, 0);
- mySMESHGUI->ResetState();
- accept();
- }
+ reject();
}
//=======================================================================
-// name : SMESHGUI_FilterLibraryDlg::onClose
+// name : SMESHGUI_FilterLibraryDlg::reject
// Purpose : SLOT called when "Close" button pressed. Close dialog
//=======================================================================
-void SMESHGUI_FilterLibraryDlg::onClose()
+void SMESHGUI_FilterLibraryDlg::reject()
{
disconnect( mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
setEnabled(true);
}
-//=================================================================================
-// function : closeEvent()
-// purpose : Close dialog
-//=================================================================================
-void SMESHGUI_FilterLibraryDlg::closeEvent(QCloseEvent* e)
-{
- onClose();
-}
-
//=======================================================================
// name : SMESHGUI_FilterLibraryDlg::getFileName
// Purpose : Get file name
void SetTable( const SMESHGUI_FilterTable* );
private:
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
+protected slots:
+ virtual void reject();
+
private slots:
void onOk();
bool onApply();
- void onClose();
void onHelp();
void onDeactivate();
connect(myOKBtn, SIGNAL(clicked()), this, SLOT(onOK()));
connect(myApplyBtn, SIGNAL(clicked()), this, SLOT(onApply()));
- connect(myCloseBtn, SIGNAL(clicked()), this, SLOT(onClose()));
+ connect(myCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
connect(myHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
/* Init selection */
myGeomFilter = new GEOM_SelectionFilter( aStudy, true );
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onObjectSelectionChanged()));
connect(mySMESHGUI, SIGNAL(SignalVisibilityChanged()), this, SLOT(onVisibilityChanged()));
{
setIsApplyAndClose( true );
if ( onApply() )
- onClose();
+ reject();
setIsApplyAndClose( false );
}
}
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_GroupDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-
//=================================================================================
// function : onVisibilityChanged()
// purpose :
}
//=================================================================================
-// function : SMESHGUI_GroupDlg::onClose
+// function : SMESHGUI_GroupDlg::reject
// purpose : SLOT called when "Close" button pressed. Close dialog
//=================================================================================
-void SMESHGUI_GroupDlg::onClose()
+void SMESHGUI_GroupDlg::reject()
{
if (SMESH::GetCurrentVtkView()) {
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
}
}
-//=================================================================================
-// function : hideEvent
-// purpose : caused by ESC key
-//=================================================================================
-void SMESHGUI_GroupDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized() && !myIsBusy)
- onClose();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
void onAdd();
void onRemove();
+protected slots:
+ virtual void reject();
+
private slots:
void onTypeChanged( int );
void onGrpTypeChanged( int );
void onColorChanged( QColor );
void onOK();
- void onClose();
bool onApply();
void onHelp();
void onDeactivate();
void init( SMESH::SMESH_Mesh_ptr );
void init( SMESH::SMESH_GroupBase_ptr,
const bool theIsConvert = false );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
void setSelectionMode( int );
void updateButtons();
// connect signals and slots
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
- connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
+ connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
// selection and SMESHGUI
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
// set selection mode
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
{
setIsApplyAndClose( true );
if ( onApply() )
- onClose();
+ reject();
setIsApplyAndClose( false );
}
/*!
- \brief SLOT called when "Close" button pressed closes dialog
+ \brief SLOT called when dialog is closed
*/
-void SMESHGUI_GroupOpDlg::onClose()
+void SMESHGUI_GroupOpDlg::reject()
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
mySelectionMgr->clearFilters();
reset();
- reject();
+ QDialog::reject();
}
/*!
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
-/*!
- \brief Provides reaction on close event, closes the dialog box
-*/
-void SMESHGUI_GroupOpDlg::closeEvent(QCloseEvent*)
-{
- onClose();
-}
-
/*!
\brief Resets state of the dialog, initializes its fields with default value, etc.
Usually called by onApply() slot to reinitialize dialog fields. This virtual method
bool isApplyAndClose() const;
private:
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
+protected slots:
+ virtual void reject();
+
private slots:
void onOk();
- void onClose();
void onHelp();
void onDeactivate();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
// Init Mesh field from selection
SelectionIntoArgument();
void SMESHGUI_MergeDlg::ClickOnOk()
{
if (ClickOnApply())
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_MergeDlg::ClickOnCancel()
+void SMESHGUI_MergeDlg::reject()
{
myIdPreview->SetPointsLabeled(false);
SMESH::SetPointRepresentation(false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_MergeDlg::closeEvent(QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_MergeDlg::hideEvent (QHideEvent *)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
void onEditGroup();
QString myEntry;
GrpList myGroups;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void updateControls();
aLay->addWidget(myHelpBtn);
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
- connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
+ connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
// selection and SMESHGUI
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
myTypeGrp->button(Type_2d)->setChecked(true);
onTypeChanged(Type_2d);
void SMESHGUI_MeshPatternDlg::onOk()
{
if (onApply())
- onClose();
+ reject();
}
//=======================================================================
-// name : SMESHGUI_MeshPatternDlg::onClose
+// name : SMESHGUI_MeshPatternDlg::reject
// Purpose : SLOT called when "Close" button pressed. Close dialog
//=======================================================================
-void SMESHGUI_MeshPatternDlg::onClose()
+void SMESHGUI_MeshPatternDlg::reject()
{
mySelectionMgr->clearFilters();
SMESH::SetPickable();
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
erasePreview();
- reject();
+ QDialog::reject();
}
//=================================================================================
onTextChanged(mySelEdit[Ids]->text());
}
-//=======================================================================
-// name : SMESHGUI_MeshPatternDlg::closeEvent
-// Purpose :
-//=======================================================================
-void SMESHGUI_MeshPatternDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-
//=======================================================================
// name : SMESHGUI_MeshPatternDlg::onSelInputChanged
// Purpose : SLOT. Called when -> button clicked.
void Init();
+protected slots:
+ virtual void reject();
+
private slots:
void onOk();
bool onApply();
- void onClose();
void onHelp();
void onDeactivate();
void activateSelection();
QStringList prepareFilters() const;
QString autoExtension( const QString& ) const;
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
bool isValid( const bool = true );
// main buttons
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
- connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
+ connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
// selection and SMESHGUI
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
// dialog controls
connect(myFilterBtn, SIGNAL(clicked()), SLOT(onFilterBtn() ));
void SMESHGUI_MultiEditDlg::onOk()
{
if (onApply())
- onClose();
+ reject();
}
//=======================================================================
}
//=======================================================================
-// name : SMESHGUI_MultiEditDlg::onClose
+// name : SMESHGUI_MultiEditDlg::reject
// Purpose : SLOT called when "Close" button pressed. Close dialog
//=======================================================================
-void SMESHGUI_MultiEditDlg::onClose()
+void SMESHGUI_MultiEditDlg::reject()
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
//mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
- reject();
+ QDialog::reject();
}
//=================================================================================
}
}
-//=======================================================================
-// name : SMESHGUI_MultiEditDlg::closeEvent
-// Purpose :
-//=======================================================================
-void SMESHGUI_MultiEditDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-//=======================================================================
-// name : SMESHGUI_MultiEditDlg::hideEvent
-// Purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_MultiEditDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- onClose();
-}
-
//=======================================================================
// name : SMESHGUI_MultiEditDlg::onFilterBtn
// Purpose : SLOT. Called when "Filter" button pressed.
{
}
-void SMESHGUI_CuttingOfQuadsDlg::onClose()
+void SMESHGUI_CuttingOfQuadsDlg::reject()
{
erasePreview();
- SMESHGUI_MultiEditDlg::onClose();
+ SMESHGUI_MultiEditDlg::reject();
}
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
protected slots:
void onOk();
virtual bool onApply();
- virtual void onClose();
+ virtual void reject();
void onHelp();
void onDeactivate();
SMESH::NumericalFunctor_ptr getNumericalFunctor();
protected:
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent * );
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame( QWidget*, const bool );
SMESH::SMESH_IDSource_ptr obj);
protected slots:
- virtual void onClose();
+ virtual void reject();
void onCriterionRB();
void onPreviewChk();
/* signals and slots connections */
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
- connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) );
+ connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) );
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), SLOT( SelectionIntoArgument() ) );
connect( mySMESHGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT( DeactivateActiveDialog() ) );
/* to close dialog if study frame change */
- connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( ClickOnCancel() ) );
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnCancel()));
+ connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( reject() ) );
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
// set selection mode
SMESH::SetPointRepresentation( true );
void SMESHGUI_NodesDlg::ClickOnOk()
{
if ( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_NodesDlg::ClickOnCancel()
+void SMESHGUI_NodesDlg::reject()
{
disconnect( mySelectionMgr, 0, this, 0 );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
SMESH::SetPointRepresentation( false );
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
}
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_NodesDlg::closeEvent( QCloseEvent* )
-{
- this->ClickOnCancel(); /* same than click on cancel button */
-}
-
-//=================================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=================================================================================
-void SMESHGUI_NodesDlg::hideEvent( QHideEvent* )
-{
- if ( !isMinimized() )
- ClickOnCancel();
-}
-
//=================================================================================
// function : enterEvent()
// purpose : to reactivate this dialog box when mouse enter onto the window
void Init();
void enterEvent( QEvent* );
- void closeEvent( QCloseEvent* );
- void hideEvent ( QHideEvent* );
void keyPressEvent( QKeyEvent* );
bool isValid();
QString myHelpFileName;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void DeactivateActiveDialog();
// Connect section
connect( myOkBtn, SIGNAL( clicked() ), this, SLOT( onOk() ) );
connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) );
- connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( onCancel() ) );
+ connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( myHelpBtn, SIGNAL(clicked()), this, SLOT( onHelp() ) );
connect( myMinEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( onMinMaxChanged() ) );
connect( myMaxEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( onMinMaxChanged() ) );
connect( myDistributionGrp, SIGNAL( toggled(bool) ), this, SLOT(onDistributionActivated(bool)) );
connect( myDistribColorGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( onDistributionChanged( int ) ) );
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
- connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onCancel() ) );
+ connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( reject() ) );
myHelpFileName = "quality_page.html";
}
void SMESHGUI_Preferences_ScalarBarDlg::onOk()
{
if ( onApply() )
- onCancel();
+ reject();
}
//=================================================================================================
//=================================================================================================
/*!
- * SMESHGUI_Preferences_ScalarBarDlg::onCancel
+ * SMESHGUI_Preferences_ScalarBarDlg::reject
*
* Cancel button slot
*/
//=================================================================================================
-void SMESHGUI_Preferences_ScalarBarDlg::onCancel()
+void SMESHGUI_Preferences_ScalarBarDlg::reject()
{
- close();
+ myDlg = 0;
+ QDialog::reject();
}
//=================================================================================================
myDistributionGrp->setEnabled( false );
}
-//=================================================================================================
-/*!
- * SMESHGUI_Preferences_ScalarBarDlg::closeEvent
- *
- * Close event handler
- */
-//=================================================================================================
-void SMESHGUI_Preferences_ScalarBarDlg::closeEvent( QCloseEvent* e )
-{
- myDlg = 0;
- QDialog::closeEvent( e );
-}
-
//=================================================================================================
/*!
* SMESHGUI_Preferences_ScalarBarDlg::onMinMaxChanged
static void ScalarBarProperties( SMESHGUI* );
- void closeEvent( QCloseEvent* );
void setOriginAndSize( const double,
const double,
const double,
const double );
void initScalarBarFromResources();
+protected slots:
+ virtual void reject();
+
protected slots:
void onOk();
bool onApply();
- void onCancel();
void onHelp();
void onSelectionChanged();
void onXYChanged();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
void SMESHGUI_RemoveElementsDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
+void SMESHGUI_RemoveElementsDlg::reject()
{
if (SMESH::GetCurrentVtkView())
SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RemoveElementsDlg::closeEvent(QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_RemoveElementsDlg::hideEvent( QHideEvent* )
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
LightApp_SelectionMgr* mySelectionMgr;
SMESHGUI_FilterDlg* myFilterDlg;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
void SMESHGUI_RemoveNodesDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_RemoveNodesDlg::ClickOnCancel()
+void SMESHGUI_RemoveNodesDlg::reject()
{
//mySelectionMgr->clearSelected();
if (SMESH::GetCurrentVtkView()) {
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RemoveNodesDlg::closeEvent(QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_RemoveNodesDlg::hideEvent( QHideEvent* )
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
LightApp_SelectionMgr* mySelectionMgr;
SMESHGUI_FilterDlg* myFilterDlg;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
myEditCurrentArgument = LineEditMesh;
LineEditMesh->setFocus();
void SMESHGUI_RenumberingDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_RenumberingDlg::ClickOnCancel()
+void SMESHGUI_RenumberingDlg::reject()
{
//mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RenumberingDlg::closeEvent(QCloseEvent* e)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_RenumberingDlg::hideEvent (QHideEvent * e)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
QString myHelpFileName;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
void SMESHGUI_RevolutionDlg::ClickOnOk()
{
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_RevolutionDlg::ClickOnCancel()
-{
- reject();
-}
-
void SMESHGUI_RevolutionDlg::reject()
{
- close();
+ disconnect(mySelectionMgr, 0, this, 0);
+ mySelectionMgr->clearFilters();
+ //mySelectionMgr->clearSelected();
+ if (SMESH::GetCurrentVtkView()) {
+ SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+ SMESH::SetPointRepresentation(false);
+ }
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
+ mySMESHGUI->ResetState();
+
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- disconnect(mySelectionMgr, 0, this, 0);
- mySelectionMgr->clearFilters();
- //mySelectionMgr->clearSelected();
- if (SMESH::GetCurrentVtkView()) {
- SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
- SMESH::SetPointRepresentation(false);
- }
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
- mySMESHGUI->ResetState();
-}
-
//=======================================================================
//function : onSelectMesh
//purpose :
SMESHGUI_RevolutionDlg( SMESHGUI* );
~SMESHGUI_RevolutionDlg();
- void reject();
-
private:
enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
void Init( bool = true);
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
protected slots:
virtual void onDisplaySimulation( bool );
+ virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
{
setIsApplyAndClose( true );
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_RotationDlg::ClickOnCancel()
+void SMESHGUI_RotationDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RotationDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=================================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=================================================================================
-void SMESHGUI_RotationDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : onSelectMesh()
// purpose :
private:
void Init( bool = true );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
bool IsAxisOk();
void setNewMeshName();
SMESHGUI_FilterDlg* myFilterDlg;
protected slots:
- virtual void onDisplaySimulation( bool );
+ virtual void onDisplaySimulation( bool );
+ virtual void reject();
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
{
setIsApplyAndClose( true );
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_ScaleDlg::ClickOnCancel()
+void SMESHGUI_ScaleDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_ScaleDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_ScaleDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=======================================================================
//function : onSelectMesh
//purpose :
private:
void Init( bool = true );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
void setNewMeshName();
protected slots:
- virtual void onDisplaySimulation( bool );
+ virtual void onDisplaySimulation( bool );
+ virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEdit1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(LineEdit2, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
void SMESHGUI_SewingDlg::ClickOnOk()
{
if (ClickOnApply())
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_SewingDlg::ClickOnCancel()
+void SMESHGUI_SewingDlg::reject()
{
//mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_SewingDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_SewingDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : GetConstructorId()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
bool IsValid();
QString myHelpFileName;
+protected slots:
+ virtual void reject();
+
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
// main buttons
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
- connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
+ connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject()));
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
// selection and SMESHGUI
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
connect(myEdge, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
myOkBtn->setEnabled(false);
void SMESHGUI_SingleEditDlg::onOk()
{
if (onApply())
- onClose();
+ reject();
}
//=======================================================================
-// name : onClose()
+// name : reject()
// Purpose : SLOT called when "Close" button pressed. Close dialog
//=======================================================================
-void SMESHGUI_SingleEditDlg::onClose()
+void SMESHGUI_SingleEditDlg::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();
}
//=================================================================================
}
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_SingleEditDlg::closeEvent (QCloseEvent*)
-{
- onClose();
-}
-
-//=======================================================================
-//function : hideEvent()
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_SingleEditDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- onClose();
-}
-
//=================================================================================
// function : onApply()
// purpose : SLOT. Called when apply button is pressed
protected slots:
void onOk();
virtual bool onApply();
- void onClose();
+ virtual void reject();
void onHelp();
void onDeactivate();
void onTextChange( const QString& );
protected:
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame( QWidget* );
/***************************************************************/
// signals and slots connections
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
connect(LineEditNodes, SIGNAL(textChanged(const QString&)),
void SMESHGUI_SmoothingDlg::ClickOnOk()
{
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose : Called when dialog box is closed
//=================================================================================
-void SMESHGUI_SmoothingDlg::ClickOnCancel()
+void SMESHGUI_SmoothingDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_SmoothingDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_SmoothingDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=======================================================================
// function : onSelectMesh()
// purpose :
private:
void Init();
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
void setFilters( const bool theIsElem );
QPushButton* myElemFilterBtn;
SMESHGUI_FilterDlg* myFilterDlg;
+protected slots:
+ virtual void reject();
+
private slots:
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
{
setIsApplyAndClose( true );
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_SymmetryDlg::ClickOnCancel()
+void SMESHGUI_SymmetryDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_SymmetryDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_SymmetryDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=======================================================================
//function : onSelectMesh
//purpose :
private:
void Init( bool = true );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
bool IsMirrorOk();
protected slots:
virtual void onDisplaySimulation( bool );
+ virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
{
setIsApplyAndClose( true );
if( ClickOnApply() )
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_TranslationDlg::ClickOnCancel()
+void SMESHGUI_TranslationDlg::reject()
{
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_TranslationDlg::closeEvent (QCloseEvent*)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_TranslationDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=======================================================================
//function : onSelectMesh
//purpose :
private:
void Init( bool = true );
- void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
void setNewMeshName();
SMESHGUI_FilterDlg* myFilterDlg;
protected slots:
- virtual void onDisplaySimulation( bool );
+ virtual void onDisplaySimulation( bool );
+ virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
- void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();