0022123: EDF 2558 SMESH: Group creation crashs with the filter "Free faces":

using reject() slot instead of closeEvent() and hideEvent().
This commit is contained in:
akl 2013-02-21 12:10:00 +00:00
parent 469f938766
commit 2770bdc924
60 changed files with 284 additions and 779 deletions

View File

@ -441,7 +441,7 @@ void SMESHGUI_AddMeshElementDlg::Init()
/* 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()));
@ -450,8 +450,8 @@ void SMESHGUI_AddMeshElementDlg::Init()
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)));
@ -599,14 +599,14 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
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);
@ -615,7 +615,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnCancel()
aViewWindow->SetSelectionMode( ActorSelection );
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -874,26 +874,6 @@ void SMESHGUI_AddMeshElementDlg::enterEvent (QEvent*)
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 :

View File

@ -71,8 +71,6 @@ public:
private:
void Init();
void closeEvent( QCloseEvent* );
void hideEvent( QHideEvent* ); /* ESC key */
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void keyPressEvent( QKeyEvent* );
void displaySimulation();
@ -119,9 +117,11 @@ private:
QString myHelpFileName;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -628,13 +628,13 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
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;
@ -803,14 +803,14 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
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);
@ -819,7 +819,7 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel()
aViewWindow->SetSelectionMode( ActorSelection );
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -1134,26 +1134,6 @@ void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
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 :

View File

@ -73,8 +73,6 @@ private:
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();
@ -128,6 +126,9 @@ private:
QString myHelpFileName;
protected slots:
virtual void reject();
private slots:
void onTextChange( const QString& );
void onCellTextChange( int, int );
@ -135,7 +136,6 @@ private slots:
void onCellDoubleClicked( int, int );
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetCurrentSelection();

View File

@ -212,7 +212,7 @@ void SMESHGUI_BuildCompoundDlg::Init()
// 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()));
@ -223,7 +223,7 @@ void SMESHGUI_BuildCompoundDlg::Init()
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();
@ -366,20 +366,20 @@ void SMESHGUI_BuildCompoundDlg::ClickOnOk()
{
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();
}
//=================================================================================
@ -480,27 +480,6 @@ void SMESHGUI_BuildCompoundDlg::enterEvent( QEvent* )
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 :

View File

@ -68,9 +68,7 @@ public:
private:
void Init();
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
bool isValid();
@ -115,9 +113,11 @@ private:
bool myIsApplyAndClose;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SelectionIntoArgument();

View File

@ -479,12 +479,12 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule, SVTK_ViewWindow
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();
}
@ -589,16 +589,17 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
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();
}
//=================================================================================

View File

@ -192,6 +192,9 @@ private:
bool myIsSelectPlane;
QString myHelpFileName;
protected slots:
virtual void reject();
public slots:
void onSelectPlane( int );
void ClickOnNew();
@ -203,7 +206,6 @@ public slots:
void OnPreviewToggle( bool );
void onAutoApply(bool);
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
};

View File

@ -227,7 +227,7 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
/* 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()));
@ -236,7 +236,7 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
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&)));
@ -369,14 +369,14 @@ void SMESHGUI_CopyMeshDlg::ClickOnOk()
{
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 )
@ -384,7 +384,7 @@ void SMESHGUI_CopyMeshDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -618,26 +618,6 @@ void SMESHGUI_CopyMeshDlg::enterEvent (QEvent*)
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 :

View File

@ -65,9 +65,7 @@ public:
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();
@ -114,9 +112,11 @@ private:
bool myIsApplyAndClose;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SelectionIntoArgument();

View File

@ -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.

View File

@ -74,14 +74,13 @@ signals:
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();

View File

@ -335,7 +335,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
/* 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() ) );
@ -351,7 +351,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
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();
@ -589,15 +589,15 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnOk()
{
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;
@ -608,7 +608,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
aViewWindow->SetSelectionMode( ActorSelection );
disconnect( mySelectionMgr, 0, this, 0 );
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -1037,30 +1037,6 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::enterEvent(QEvent* e)
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 :

View File

@ -72,9 +72,7 @@ private:
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();
@ -125,11 +123,13 @@ public slots:
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();

View File

@ -146,7 +146,7 @@ QWidget* SMESHGUI_DeleteGroupDlg::createButtonFrame (QWidget* theParent)
// 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()));
@ -173,7 +173,7 @@ void SMESHGUI_DeleteGroupDlg::Init ()
// 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));
@ -239,14 +239,14 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
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);
@ -254,7 +254,7 @@ void SMESHGUI_DeleteGroupDlg::onClose()
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
mySelectionMgr->clearFilters();
reject();
QDialog::reject();
}
//=================================================================================
@ -334,15 +334,6 @@ void SMESHGUI_DeleteGroupDlg::enterEvent (QEvent*)
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void SMESHGUI_DeleteGroupDlg::closeEvent (QCloseEvent*)
{
onClose();
}
//=================================================================================
// function : keyPressEvent()
// purpose :

View File

@ -59,14 +59,15 @@ public:
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();

View File

@ -214,14 +214,14 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
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()));
}
/*!
@ -425,19 +425,19 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
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();
}
/*!
@ -575,15 +575,6 @@ void SMESHGUI_DuplicateNodesDlg::enterEvent (QEvent*)
}
}
/*!
\brief Receive close events.
Reimplemented from QWidget class.
*/
void SMESHGUI_DuplicateNodesDlg::closeEvent (QCloseEvent*)
{
onClose();
}
/*!
\brief Receive key press events.
Reimplemented from QWidget class.

View File

@ -65,15 +65,16 @@ private:
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();

View File

@ -305,7 +305,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
/***************************************************************/
// 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()));
@ -326,7 +326,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
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)));
@ -664,16 +664,28 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
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();
}
//=================================================================================
@ -998,32 +1010,6 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*)
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 :

View File

@ -68,12 +68,9 @@ public:
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);
@ -148,13 +145,13 @@ private:
protected slots:
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();

View File

@ -2653,7 +2653,7 @@ QWidget* SMESHGUI_FilterDlg::createButtonFrame (QWidget* theParent)
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()));
@ -2718,7 +2718,7 @@ void SMESHGUI_FilterDlg::Init (const QList<int>& theTypes, const bool setInViewe
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
updateMainButtons();
updateSelection();
@ -2768,10 +2768,10 @@ void SMESHGUI_FilterDlg::onOk()
}
//=======================================================================
// 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)
@ -2799,8 +2799,7 @@ void SMESHGUI_FilterDlg::onClose()
disconnect(mySMESHGUI, 0, this, 0);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
return;
QDialog::reject();
}
//=================================================================================
@ -2848,15 +2847,6 @@ void SMESHGUI_FilterDlg::enterEvent (QEvent*)
setEnabled(true);
}
//=======================================================================
// name : closeEvent()
// Purpose :
//=======================================================================
void SMESHGUI_FilterDlg::closeEvent (QCloseEvent*)
{
onClose();
}
//=======================================================================
// name : SMESHGUI_FilterDlg::getIdsFromWg
// Purpose : Retrieve list of ids from given widget

View File

@ -238,11 +238,13 @@ signals:
void Accepted();
protected slots:
virtual void reject();
private slots:
void onOk();
bool onApply();
void onClose();
void onHelp();
void onDeactivate();
void onSelectionDone();
@ -253,7 +255,6 @@ private:
void construct( const QList<int>& );
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );

View File

@ -269,7 +269,7 @@ QWidget* SMESHGUI_FilterLibraryDlg::createButtonFrame (QWidget* theParent)
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()));
@ -337,7 +337,7 @@ void SMESHGUI_FilterLibraryDlg::Init (const QList<int>& theTypes,
setEnabled(true);
connect( mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
if (myMode == ADD_TO)
{
@ -467,22 +467,18 @@ bool SMESHGUI_FilterLibraryDlg::onApply()
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();
}
//=================================================================================
@ -527,15 +523,6 @@ void SMESHGUI_FilterLibraryDlg::enterEvent(QEvent*)
setEnabled(true);
}
//=================================================================================
// function : closeEvent()
// purpose : Close dialog
//=================================================================================
void SMESHGUI_FilterLibraryDlg::closeEvent(QCloseEvent* e)
{
onClose();
}
//=======================================================================
// name : SMESHGUI_FilterLibraryDlg::getFileName
// Purpose : Get file name

View File

@ -77,14 +77,15 @@ public:
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();

View File

@ -439,7 +439,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
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 */
@ -458,7 +458,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
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()));
@ -1189,7 +1189,7 @@ void SMESHGUI_GroupDlg::onOK()
{
setIsApplyAndClose( true );
if ( onApply() )
onClose();
reject();
setIsApplyAndClose( false );
}
@ -2165,15 +2165,6 @@ void SMESHGUI_GroupDlg::onSort()
}
}
//=================================================================================
// function : closeEvent()
// purpose :
//=================================================================================
void SMESHGUI_GroupDlg::closeEvent (QCloseEvent*)
{
onClose();
}
//=================================================================================
// function : onVisibilityChanged()
// purpose :
@ -2184,10 +2175,10 @@ void SMESHGUI_GroupDlg::onVisibilityChanged()
}
//=================================================================================
// 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
@ -2208,7 +2199,7 @@ void SMESHGUI_GroupDlg::onClose()
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -2262,16 +2253,6 @@ void SMESHGUI_GroupDlg::enterEvent (QEvent*)
}
}
//=================================================================================
// function : hideEvent
// purpose : caused by ESC key
//=================================================================================
void SMESHGUI_GroupDlg::hideEvent (QHideEvent*)
{
if (!isMinimized() && !myIsBusy)
onClose();
}
//=================================================================================
// function : keyPressEvent()
// purpose :

View File

@ -85,13 +85,15 @@ public slots:
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();
@ -123,9 +125,7 @@ private:
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();

View File

@ -204,7 +204,7 @@ QWidget* SMESHGUI_GroupOpDlg::createButtonFrame (QWidget* theParent)
// 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()));
@ -228,7 +228,7 @@ void SMESHGUI_GroupOpDlg::Init()
// 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 ))
@ -315,14 +315,14 @@ void SMESHGUI_GroupOpDlg::onOk()
{
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);
@ -331,7 +331,7 @@ void SMESHGUI_GroupOpDlg::onClose()
mySMESHGUI->ResetState();
mySelectionMgr->clearFilters();
reset();
reject();
QDialog::reject();
}
/*!
@ -467,14 +467,6 @@ void SMESHGUI_GroupOpDlg::enterEvent(QEvent*)
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

View File

@ -92,13 +92,14 @@ protected:
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();

View File

@ -552,7 +552,7 @@ void SMESHGUI_MergeDlg::Init()
/* 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()));
@ -571,7 +571,7 @@ void SMESHGUI_MergeDlg::Init()
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();
@ -697,14 +697,14 @@ bool SMESHGUI_MergeDlg::ClickOnApply()
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);
@ -718,7 +718,7 @@ void SMESHGUI_MergeDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
reject();
QDialog::reject();
}
//=================================================================================
@ -1226,26 +1226,6 @@ void SMESHGUI_MergeDlg::enterEvent(QEvent*)
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 :

View File

@ -78,9 +78,7 @@ public:
private:
void Init();
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
void onEditGroup();
@ -150,9 +148,11 @@ private:
QString myEntry;
GrpList myGroups;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void updateControls();

View File

@ -352,7 +352,7 @@ QWidget* SMESHGUI_MeshPatternDlg::createButtonFrame (QWidget* theParent)
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()));
@ -390,7 +390,7 @@ void SMESHGUI_MeshPatternDlg::Init()
// 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);
@ -538,14 +538,14 @@ bool SMESHGUI_MeshPatternDlg::onApply()
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();
@ -555,7 +555,7 @@ void SMESHGUI_MeshPatternDlg::onClose()
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
erasePreview();
reject();
QDialog::reject();
}
//=================================================================================
@ -724,15 +724,6 @@ void SMESHGUI_MeshPatternDlg::enterEvent (QEvent*)
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.

View File

@ -75,10 +75,12 @@ public:
void Init();
protected slots:
virtual void reject();
private slots:
void onOk();
bool onApply();
void onClose();
void onHelp();
void onDeactivate();
@ -108,7 +110,6 @@ private:
void activateSelection();
QStringList prepareFilters() const;
QString autoExtension( const QString& ) const;
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
bool isValid( const bool = true );

View File

@ -384,14 +384,14 @@ void SMESHGUI_MultiEditDlg::Init()
// 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() ));
@ -423,7 +423,7 @@ void SMESHGUI_MultiEditDlg::Init()
void SMESHGUI_MultiEditDlg::onOk()
{
if (onApply())
onClose();
reject();
}
//=======================================================================
@ -510,10 +510,10 @@ SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& o
}
//=======================================================================
// 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);
@ -527,7 +527,7 @@ void SMESHGUI_MultiEditDlg::onClose()
//mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
reject();
QDialog::reject();
}
//=================================================================================
@ -646,24 +646,6 @@ void SMESHGUI_MultiEditDlg::enterEvent (QEvent*)
}
}
//=======================================================================
// 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.
@ -1259,10 +1241,10 @@ SMESHGUI_CuttingOfQuadsDlg::~SMESHGUI_CuttingOfQuadsDlg()
{
}
void SMESHGUI_CuttingOfQuadsDlg::onClose()
void SMESHGUI_CuttingOfQuadsDlg::reject()
{
erasePreview();
SMESHGUI_MultiEditDlg::onClose();
SMESHGUI_MultiEditDlg::reject();
}
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,

View File

@ -82,7 +82,7 @@ signals:
protected slots:
void onOk();
virtual bool onApply();
virtual void onClose();
virtual void reject();
void onHelp();
void onDeactivate();
@ -102,9 +102,7 @@ protected slots:
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 );
@ -221,7 +219,7 @@ protected:
SMESH::SMESH_IDSource_ptr obj);
protected slots:
virtual void onClose();
virtual void reject();
void onCriterionRB();
void onPreviewChk();

View File

@ -370,7 +370,7 @@ void SMESHGUI_NodesDlg::Init()
/* 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() ) );
@ -381,8 +381,8 @@ void SMESHGUI_NodesDlg::Init()
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 );
@ -414,7 +414,7 @@ void SMESHGUI_NodesDlg::ValueChangedInSpinBox( double newValue )
void SMESHGUI_NodesDlg::ClickOnOk()
{
if ( ClickOnApply() )
ClickOnCancel();
reject();
}
//=================================================================================
@ -539,10 +539,10 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
}
//=================================================================================
// 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 ) )
@ -552,7 +552,7 @@ void SMESHGUI_NodesDlg::ClickOnCancel()
SMESH::SetPointRepresentation( false );
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -638,25 +638,6 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
}
}
//=================================================================================
// 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

View File

@ -79,8 +79,6 @@ private:
void Init();
void enterEvent( QEvent* );
void closeEvent( QCloseEvent* );
void hideEvent ( QHideEvent* );
void keyPressEvent( QKeyEvent* );
bool isValid();
@ -108,9 +106,11 @@ private:
QString myHelpFileName;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void DeactivateActiveDialog();

View File

@ -435,7 +435,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
// 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() ) );
@ -445,7 +445,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
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";
}
@ -471,7 +471,7 @@ SMESHGUI_Preferences_ScalarBarDlg::~SMESHGUI_Preferences_ScalarBarDlg()
void SMESHGUI_Preferences_ScalarBarDlg::onOk()
{
if ( onApply() )
onCancel();
reject();
}
//=================================================================================================
@ -588,14 +588,15 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply()
//=================================================================================================
/*!
* 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();
}
//=================================================================================================
@ -724,19 +725,6 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
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

View File

@ -64,17 +64,18 @@ public:
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();

View File

@ -196,7 +196,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
/* 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()));
@ -204,7 +204,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
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&)));
@ -257,14 +257,14 @@ void SMESHGUI_RemoveElementsDlg::ClickOnApply()
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
@ -274,7 +274,7 @@ void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -457,26 +457,6 @@ void SMESHGUI_RemoveElementsDlg::enterEvent(QEvent*)
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 :

View File

@ -63,9 +63,7 @@ public:
private:
void Init();
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
LightApp_SelectionMgr* mySelectionMgr;
@ -96,9 +94,11 @@ private:
SMESHGUI_FilterDlg* myFilterDlg;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -196,7 +196,7 @@ void SMESHGUI_RemoveNodesDlg::Init()
/* 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()));
@ -204,7 +204,7 @@ void SMESHGUI_RemoveNodesDlg::Init()
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&)));
@ -261,14 +261,14 @@ void SMESHGUI_RemoveNodesDlg::ClickOnApply()
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()) {
@ -280,7 +280,7 @@ void SMESHGUI_RemoveNodesDlg::ClickOnCancel()
disconnect(mySelectionMgr, 0, this, 0);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -463,26 +463,6 @@ void SMESHGUI_RemoveNodesDlg::enterEvent(QEvent*)
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 :

View File

@ -63,9 +63,7 @@ public:
private:
void Init();
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
LightApp_SelectionMgr* mySelectionMgr;
@ -96,9 +94,11 @@ private:
SMESHGUI_FilterDlg* myFilterDlg;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -186,7 +186,7 @@ void SMESHGUI_RenumberingDlg::Init()
/* 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()));
@ -194,7 +194,7 @@ void SMESHGUI_RenumberingDlg::Init()
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();
@ -254,20 +254,20 @@ void SMESHGUI_RenumberingDlg::ClickOnApply()
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();
}
//=================================================================================
@ -392,26 +392,6 @@ void SMESHGUI_RenumberingDlg::enterEvent(QEvent* e)
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 :

View File

@ -60,9 +60,7 @@ public:
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 */
@ -89,9 +87,11 @@ private:
QString myHelpFileName;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -323,7 +323,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
/* 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)));
@ -343,7 +343,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
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)));
@ -574,21 +574,27 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
void SMESHGUI_RevolutionDlg::ClickOnOk()
{
if( ClickOnApply() )
ClickOnCancel();
}
//=================================================================================
// function : ClickOnCancel()
// purpose :
//=================================================================================
void SMESHGUI_RevolutionDlg::ClickOnCancel()
{
reject();
}
//=================================================================================
// function : reject()
// purpose :
//=================================================================================
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();
}
//=================================================================================
@ -910,25 +916,6 @@ void SMESHGUI_RevolutionDlg::enterEvent (QEvent*)
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 :

View File

@ -74,13 +74,10 @@ public:
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();
@ -163,11 +160,11 @@ private:
protected slots:
virtual void onDisplaySimulation( bool );
virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -297,7 +297,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule ) :
/* 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()));
@ -312,7 +312,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule ) :
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)));
@ -508,14 +508,14 @@ void SMESHGUI_RotationDlg::ClickOnOk()
{
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();
@ -527,7 +527,7 @@ void SMESHGUI_RotationDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -857,26 +857,6 @@ void SMESHGUI_RotationDlg::enterEvent (QEvent*)
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 :

View File

@ -66,9 +66,7 @@ public:
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();
@ -135,10 +133,10 @@ private:
protected slots:
virtual void onDisplaySimulation( bool );
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -301,7 +301,7 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) :
/* 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)));
@ -312,7 +312,7 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) :
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)));
@ -545,14 +545,14 @@ void SMESHGUI_ScaleDlg::ClickOnOk()
{
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();
@ -564,7 +564,7 @@ void SMESHGUI_ScaleDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -881,26 +881,6 @@ void SMESHGUI_ScaleDlg::enterEvent (QEvent*)
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 :

View File

@ -62,9 +62,7 @@ public:
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();
@ -130,11 +128,11 @@ private:
protected slots:
virtual void onDisplaySimulation( bool );
virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -257,7 +257,7 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule )
/* 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)));
@ -272,7 +272,7 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule )
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&)));
@ -548,14 +548,14 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
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);
@ -563,7 +563,7 @@ void SMESHGUI_SewingDlg::ClickOnCancel()
aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -873,26 +873,6 @@ void SMESHGUI_SewingDlg::enterEvent (QEvent* e)
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 :

View File

@ -63,9 +63,7 @@ public:
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();
@ -118,10 +116,12 @@ private:
QString myHelpFileName;
protected slots:
virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -215,14 +215,14 @@ void SMESHGUI_SingleEditDlg::Init()
// 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);
@ -244,14 +244,14 @@ void SMESHGUI_SingleEditDlg::Init()
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);
@ -259,7 +259,7 @@ void SMESHGUI_SingleEditDlg::onClose()
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -458,25 +458,6 @@ void SMESHGUI_SingleEditDlg::enterEvent (QEvent*)
}
}
//=================================================================================
// 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

View File

@ -62,7 +62,7 @@ public:
protected slots:
void onOk();
virtual bool onApply();
void onClose();
virtual void reject();
void onHelp();
void onDeactivate();
@ -71,9 +71,7 @@ protected slots:
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* );

View File

@ -275,7 +275,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
/***************************************************************/
// 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()));
@ -284,7 +284,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
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&)),
@ -421,14 +421,14 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
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();
@ -441,7 +441,7 @@ void SMESHGUI_SmoothingDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -704,26 +704,6 @@ void SMESHGUI_SmoothingDlg::enterEvent (QEvent*)
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 :

View File

@ -71,9 +71,7 @@ public:
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 );
@ -124,9 +122,11 @@ private:
QPushButton* myElemFilterBtn;
SMESHGUI_FilterDlg* myFilterDlg;
protected slots:
virtual void reject();
private slots:
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -300,7 +300,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
/* 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)));
@ -316,7 +316,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
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)));
@ -573,14 +573,14 @@ void SMESHGUI_SymmetryDlg::ClickOnOk()
{
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();
@ -592,7 +592,7 @@ void SMESHGUI_SymmetryDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -917,26 +917,6 @@ void SMESHGUI_SymmetryDlg::enterEvent (QEvent*)
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 :

View File

@ -66,9 +66,7 @@ public:
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();
@ -139,11 +137,11 @@ private:
protected slots:
virtual void onDisplaySimulation( bool );
virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();

View File

@ -304,7 +304,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule ) :
/* 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)));
@ -316,7 +316,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule ) :
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)));
@ -578,14 +578,14 @@ void SMESHGUI_TranslationDlg::ClickOnOk()
{
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();
@ -597,7 +597,7 @@ void SMESHGUI_TranslationDlg::ClickOnCancel()
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
reject();
QDialog::reject();
}
//=================================================================================
@ -883,26 +883,6 @@ void SMESHGUI_TranslationDlg::enterEvent (QEvent*)
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 :

View File

@ -65,9 +65,7 @@ public:
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();
@ -133,11 +131,11 @@ private:
protected slots:
virtual void onDisplaySimulation( bool );
virtual void reject();
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
void ClickOnCancel();
bool ClickOnApply();
void ClickOnHelp();
void SetEditCurrentArgument();