From 1335ea88437f94da949b901919146911db3aebcb Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 23 Jun 2006 12:51:59 +0000 Subject: [PATCH] Fix for PAL10496. --- src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h | 1 + .../SMESHGUI_AddQuadraticElementDlg.cxx | 17 +++++++++++++++++ .../SMESHGUI_AddQuadraticElementDlg.h | 1 + src/SMESHGUI/SMESHGUI_ClippingDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_ClippingDlg.h | 2 ++ src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx | 2 ++ src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_CreatePatternDlg.h | 1 + .../SMESHGUI_CreatePolyhedralVolumeDlg.cxx | 19 ++++++++++++++++++- .../SMESHGUI_CreatePolyhedralVolumeDlg.h | 1 + src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h | 1 + src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx | 18 ++++++++++++++++++ src/SMESHGUI/SMESHGUI_EditMeshDlg.h | 1 + .../SMESHGUI_ExtrusionAlongPathDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h | 1 + src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_ExtrusionDlg.h | 1 + src/SMESHGUI/SMESHGUI_FilterDlg.cxx | 18 ++++++++++++++++++ src/SMESHGUI/SMESHGUI_FilterDlg.h | 1 + src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h | 1 + src/SMESHGUI/SMESHGUI_GroupDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_GroupDlg.h | 1 + src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_GroupOpDlg.h | 1 + src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_MergeNodesDlg.h | 1 + src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_MeshInfosDlg.h | 1 + src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_MeshPatternDlg.h | 1 + src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_MoveNodesDlg.h | 1 + src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_MultiEditDlg.h | 1 + src/SMESHGUI/SMESHGUI_NodesDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_NodesDlg.h | 1 + src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h | 1 + src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h | 1 + src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_RenumberingDlg.h | 1 + src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_RevolutionDlg.h | 1 + src/SMESHGUI/SMESHGUI_RotationDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_RotationDlg.h | 1 + src/SMESHGUI/SMESHGUI_SewingDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_SewingDlg.h | 1 + src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_SingleEditDlg.h | 1 + src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_SmoothingDlg.h | 1 + .../SMESHGUI_StandardMeshInfosDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h | 1 + src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_SymmetryDlg.h | 1 + src/SMESHGUI/SMESHGUI_TranslationDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_TranslationDlg.h | 1 + src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx | 17 +++++++++++++++++ src/SMESHGUI/SMESHGUI_TransparencyDlg.h | 3 +++ 63 files changed, 566 insertions(+), 1 deletion(-) diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index d7b4cb35b..18dc86e26 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -797,3 +797,20 @@ void SMESHGUI_AddMeshElementDlg::CheckBox (int state) displaySimulation(); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_AddMeshElementDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h index 7c710214e..f09295421 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h @@ -82,6 +82,7 @@ private: void closeEvent (QCloseEvent*); void hideEvent (QHideEvent*); /* ESC key */ void enterEvent (QEvent*); /* mouse enter the QWidget */ + void keyPressEvent(QKeyEvent*); void displaySimulation(); SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index da47fe190..ca7d886e3 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -1099,3 +1099,20 @@ QWidget* SMESHGUI_IdEditItem::createEditor() const aLineEdit->setValidator( new SMESHGUI_IdValidator(table()->viewport(), "validator", 1) ); return aLineEdit; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h index ea63a83ec..5a80c5e0b 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h @@ -67,6 +67,7 @@ private: void closeEvent (QCloseEvent*); void hideEvent (QHideEvent*); /* ESC key */ void enterEvent (QEvent*); /* mouse enter the QWidget */ + void keyPressEvent(QKeyEvent*); void displaySimulation(); void UpdateTable( bool theConersValidity = true ); bool IsValid(); diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx index e513577b9..6ec0c63bb 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx @@ -769,3 +769,20 @@ void SMESHGUI_ClippingDlg::OnPreviewToggle (bool theIsToggled) std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(theIsToggled)); SMESH::RenderViewWindow(SMESH::GetCurrentVtkView()); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_ClippingDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.h b/src/SMESHGUI/SMESHGUI_ClippingDlg.h index cbf044f60..2fe681851 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.h +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.h @@ -85,6 +85,8 @@ public: void setRotation (const double theRot1, const double theRot2); void Sinchronize(); + void keyPressEvent(QKeyEvent*); + ~SMESHGUI_ClippingDlg(); private: diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx index a5095e6a9..cabea5343 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx @@ -93,6 +93,8 @@ void SMESHGUI_ConvToQuadOp::startOperation() } connect( myDlg, SIGNAL( onClicked( int ) ), SLOT( ConnectRadioButtons( int ) ) ); + myHelpFileName = "/files/convert_to_from_quadratic.htm"; + SMESHGUI_SelectionOp::startOperation(); myDlg->SetMediumNdsOnGeom( false ); diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index f4ed56a4b..85579d9f1 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -744,3 +744,20 @@ void SMESHGUI_CreatePatternDlg::onTypeChanged (int theType) else myPicture2d->hide(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_CreatePatternDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h index b7c1db78f..314d96a0a 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h @@ -84,6 +84,7 @@ private: void closeEvent (QCloseEvent* e); void enterEvent (QEvent*); + void keyPressEvent(QKeyEvent*); private slots: diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 7b0da5d83..9d570cde4 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -324,7 +324,7 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ; - myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_polyhedrons?"; + myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_polyhedrons"; Init(); } @@ -1098,3 +1098,20 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onListSelectionChanged() busy = false; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_CreatePolyhedralVolumeDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h index 001351c3f..49859d92a 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h @@ -73,6 +73,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */ void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent( QKeyEvent* e ); int GetConstructorId(); void displaySimulation(); diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx index 9e02ccc4a..ecbf3234e 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx @@ -325,3 +325,20 @@ void SMESHGUI_DeleteGroupDlg::closeEvent (QCloseEvent*) { onClose(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_DeleteGroupDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h index da8b62a9c..789c888ed 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h @@ -61,6 +61,7 @@ private: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); + void keyPressEvent(QKeyEvent*); private slots: diff --git a/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx index 28401a22a..19b29d15e 100644 --- a/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx @@ -363,3 +363,21 @@ void SMESHGUI_EditMeshDlg::hideEvent (QHideEvent * e) if (!isMinimized()) ClickOnCancel(); } + + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_EditMeshDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_EditMeshDlg.h b/src/SMESHGUI/SMESHGUI_EditMeshDlg.h index a69883fa6..3c5b918ea 100644 --- a/src/SMESHGUI/SMESHGUI_EditMeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_EditMeshDlg.h @@ -62,6 +62,7 @@ class SMESHGUI_EditMeshDlg : public QDialog void closeEvent (QCloseEvent*); void enterEvent (QEvent*); /* mouse enter the QWidget */ void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); private: SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index f8a3903a5..1a5d1252e 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -1196,3 +1196,20 @@ bool SMESHGUI_ExtrusionAlongPathDlg::eventFilter (QObject* object, QEvent* event } return QDialog::eventFilter(object, event); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_ExtrusionAlongPathDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h index 296c0a925..f52f8cab5 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h @@ -83,6 +83,7 @@ public: private: void Init (bool ResetControls = true); void enterEvent (QEvent*); /* mouse enter the QWidget */ + void keyPressEvent(QKeyEvent*); int GetConstructorId(); void SetEditCurrentArgument (QToolButton* button); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 70fa135ad..9ec24518c 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -790,3 +790,20 @@ int SMESHGUI_ExtrusionDlg::GetConstructorId() return GroupConstructors->id(GroupConstructors->selected()); return -1; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_ExtrusionDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h index 55b7d2bf7..841565f44 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h @@ -71,6 +71,7 @@ public: private: void Init (bool ResetControls = true); void enterEvent (QEvent*); /* mouse enter the QWidget */ + void keyPressEvent(QKeyEvent*); int GetConstructorId(); //void closeEvent (QCloseEvent*); //void hideEvent (QHideEvent*); /* ESC key */ diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index 6826b0fc9..608e09e0a 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -2585,3 +2585,21 @@ void SMESHGUI_FilterDlg::updateSelection() } } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_FilterDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} + diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.h b/src/SMESHGUI/SMESHGUI_FilterDlg.h index 635b37242..5e9e33984 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.h @@ -263,6 +263,7 @@ private: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); + void keyPressEvent(QKeyEvent*); // dialog creation QFrame* createButtonFrame (QWidget*); diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index a131436a9..08447f424 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -1151,3 +1151,20 @@ void SMESHGUI_FilterLibraryDlg::onNeedValidation() } } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_FilterLibraryDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h index 8b464b84e..fd078d356 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h @@ -88,6 +88,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; + void keyPressEvent( QKeyEvent* e ); private slots: diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 872d98a15..5c473f329 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -1599,3 +1599,20 @@ void SMESHGUI_GroupDlg::hideEvent (QHideEvent*) if (!isMinimized()) onClose(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_GroupDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.h b/src/SMESHGUI/SMESHGUI_GroupDlg.h index c3fae7deb..303c38223 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.h @@ -114,6 +114,7 @@ private: void closeEvent(QCloseEvent* e); void enterEvent (QEvent*); void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); void setSelectionMode(int theMode); void updateButtons(); diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx index 8ec058c01..52f6d0fc4 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx @@ -412,3 +412,20 @@ void SMESHGUI_GroupOpDlg::reset() myFocusWg = myEdit1; myNameEdit->setFocus(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_GroupOpDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.h b/src/SMESHGUI/SMESHGUI_GroupOpDlg.h index 89e4d3ccc..5b22977ad 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.h @@ -64,6 +64,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; + void keyPressEvent(QKeyEvent*); private slots: diff --git a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx index 13e0a4b71..f867a0ce3 100644 --- a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx @@ -727,3 +727,20 @@ void SMESHGUI_MergeNodesDlg::hideEvent (QHideEvent*) if (!isMinimized()) ClickOnCancel(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_MergeNodesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h index 2d50c6bbe..eda961e8c 100644 --- a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h @@ -79,6 +79,7 @@ private: void closeEvent( QCloseEvent* e ); void enterEvent ( QEvent * ); /* mouse enter the QWidget */ void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent( QKeyEvent* e ); void onEditNodesGroup(); SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ diff --git a/src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx index 3b03a0256..713e01625 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx @@ -638,3 +638,20 @@ void SMESHGUI_MeshInfosDlg::onHelp() QObject::tr("BUT_OK")); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_MeshInfosDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h b/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h index 9e44382b3..51bf242c5 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h @@ -53,6 +53,7 @@ public: protected: void closeEvent( QCloseEvent* e ); + void keyPressEvent( QKeyEvent* e ); void windowActivationChange( bool oldActive ); void DumpMeshInfos(); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index e9557f934..ca78bb60e 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -1361,3 +1361,20 @@ int SMESHGUI_MeshPatternDlg::getNode (bool second) const { return second ? myNode2->value() - 1 : myNode1->value() - 1; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_MeshPatternDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h index 15af7bd6d..080be328c 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h @@ -114,6 +114,7 @@ private: QString autoExtension( const QString& theFileName ) const; void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; + void keyPressEvent(QKeyEvent*); bool isValid( const bool theMess = true ); void resetSelInput(); bool isRefine() const; diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx index 9c396ade8..d41095822 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx @@ -586,3 +586,20 @@ void SMESHGUI_MoveNodesDlg::redisplayPreview() aViewWindow->Repaint(); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_MoveNodesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h index 5544061d8..67430a579 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h @@ -79,6 +79,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; void hideEvent ( QHideEvent * ); + void keyPressEvent( QKeyEvent* ); void erasePreview(); QFrame* createButtonFrame( QWidget* ); QFrame* createMainFrame ( QWidget* ); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 045ae5a17..cb631f0be 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1046,6 +1046,23 @@ int SMESHGUI_MultiEditDlg::entityType() return myEntityType; } +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_MultiEditDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} + /*! * Class : SMESHGUI_ChangeOrientationDlg * Description : Modification of orientation of faces diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h index 8cd85ccc6..8bcf3928a 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h @@ -108,6 +108,7 @@ protected: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent( QKeyEvent* ); QFrame* createButtonFrame( QWidget* ); QFrame* createMainFrame ( QWidget*, const bool ); bool isValid( const bool ) const; diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 83e8c5723..5b71bfb2e 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -599,3 +599,20 @@ void SMESHGUI_NodesDlg::ActivateThisDialog() SelectionIntoArgument(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_NodesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.h b/src/SMESHGUI/SMESHGUI_NodesDlg.h index 890f0c5d1..5375da62e 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.h @@ -85,6 +85,7 @@ private: void enterEvent(QEvent* e); void closeEvent(QCloseEvent*); void hideEvent (QHideEvent *); /* ESC key */ + void keyPressEvent(QKeyEvent*); QButtonGroup* GroupConstructors; QRadioButton* Constructor1; diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx index 400d47add..0df620a02 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx @@ -513,3 +513,20 @@ void SMESHGUI_RemoveElementsDlg::hideEvent (QHideEvent * e) if (!isMinimized()) ClickOnCancel(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_RemoveElementsDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h index 4b3590818..e6a48a7be 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h @@ -75,6 +75,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */ void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent( QKeyEvent* e ); LightApp_SelectionMgr* mySelectionMgr; SVTK_Selector* mySelector; diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx index db0d13e6c..8625125dd 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx @@ -512,3 +512,20 @@ void SMESHGUI_RemoveNodesDlg::hideEvent (QHideEvent * e) if (!isMinimized()) ClickOnCancel(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_RemoveNodesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h index ec18a062f..7f8c243e0 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h @@ -78,6 +78,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */ void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent( QKeyEvent* e ); LightApp_SelectionMgr* mySelectionMgr; SVTK_Selector* mySelector; diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx index 4e4f75a83..9992b49fc 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx @@ -444,3 +444,20 @@ void SMESHGUI_RenumberingDlg::hideEvent (QHideEvent * e) if (!isMinimized()) ClickOnCancel(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_RenumberingDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.h b/src/SMESHGUI/SMESHGUI_RenumberingDlg.h index 620606a32..af4f836c2 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.h +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.h @@ -72,6 +72,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */ void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent( QKeyEvent* e ); SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 46e23659e..581724f6f 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -933,3 +933,20 @@ void SMESHGUI_RevolutionDlg::onVectorChanged() buttonApply->setEnabled(false); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_RevolutionDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h index 9e33d7c53..49b391e3c 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h @@ -78,6 +78,7 @@ private: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); /* mouse enter the QWidget */ void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); int GetConstructorId(); bool IsAxisOk(); diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index 34efe7fc6..d557aab26 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -840,3 +840,20 @@ void SMESHGUI_RotationDlg::onVectorChanged() buttonApply->setEnabled(false); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_RotationDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.h b/src/SMESHGUI/SMESHGUI_RotationDlg.h index dcded2e23..921202ead 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.h +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.h @@ -77,6 +77,7 @@ private: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); /* mouse enter the QWidget */ void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); bool IsAxisOk(); SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx index 67f2e0c8d..957a5c449 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx @@ -950,3 +950,20 @@ bool SMESHGUI_SewingDlg::IsValid() { return (myOk1 && myOk2 && myOk3 && myOk4 && myOk5 && myOk6); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_SewingDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.h b/src/SMESHGUI/SMESHGUI_SewingDlg.h index 31bac24fd..f3ad4f808 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.h @@ -72,6 +72,7 @@ private: void closeEvent( QCloseEvent* e ) ; void enterEvent ( QEvent * ); /* mouse enter the QWidget */ void hideEvent ( QHideEvent * ); /* ESC key */ + void keyPressEvent(QKeyEvent*); int GetConstructorId(); bool IsValid(); diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index ab28af483..2e83ac35c 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -535,6 +535,23 @@ bool SMESHGUI_SingleEditDlg::onApply() return aResult; } +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_SingleEditDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} + /*! * Class : SMESHGUI_TrianglesInversionDlg * Description : Inversion of the diagonal of a pseudo-quadrangle formed by diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.h b/src/SMESHGUI/SMESHGUI_SingleEditDlg.h index 6f1761006..853b138ce 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.h @@ -75,6 +75,7 @@ protected: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); QFrame* createButtonFrame (QWidget*); QFrame* createMainFrame (QWidget*); bool isValid (const bool) const; diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index 541f63475..7ad48a6b0 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -773,3 +773,20 @@ void SMESHGUI_SmoothingDlg::onSelectMesh (bool toSelectMesh) SelectionIntoArgument(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_SmoothingDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h index 977dac63f..4bf341efe 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h @@ -79,6 +79,7 @@ private: void closeEvent(QCloseEvent*); void enterEvent (QEvent*); /* mouse enter the QWidget */ void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ diff --git a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx index d05a1d472..89155d209 100644 --- a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx @@ -467,3 +467,20 @@ void SMESHGUI_StandardMeshInfosDlg::onHelp() QObject::tr("BUT_OK")); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_StandardMeshInfosDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h index 74c7bb8e9..204fe0133 100644 --- a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h +++ b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h @@ -54,6 +54,7 @@ public: protected: void closeEvent( QCloseEvent* e ); + void keyPressEvent( QKeyEvent* e ); void windowActivationChange( bool oldActive ); void DumpMeshInfos(); diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index f0689d5d8..d6653b18b 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -916,3 +916,20 @@ void SMESHGUI_SymmetryDlg::onVectorChanged() buttonApply->setEnabled(false); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_SymmetryDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.h b/src/SMESHGUI/SMESHGUI_SymmetryDlg.h index 49cd8cda8..07a54ffd2 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.h +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.h @@ -76,6 +76,7 @@ private: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); /* mouse enter the QWidget */ void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); int GetConstructorId(); bool IsMirrorOk(); diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 48e6fafb5..fdda6415c 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -849,3 +849,20 @@ int SMESHGUI_TranslationDlg::GetConstructorId() return GroupConstructors->id(GroupConstructors->selected()); return -1; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_TranslationDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.h b/src/SMESHGUI/SMESHGUI_TranslationDlg.h index e1c7c971a..66330d4b7 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.h +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.h @@ -75,6 +75,7 @@ private: void closeEvent (QCloseEvent*); void enterEvent (QEvent*); /* mouse enter the QWidget */ void hideEvent (QHideEvent*); /* ESC key */ + void keyPressEvent(QKeyEvent*); int GetConstructorId(); SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ diff --git a/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx b/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx index 6e1872311..6dc08f4d2 100644 --- a/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx @@ -276,3 +276,20 @@ void SMESHGUI_TransparencyDlg::onSelectionChanged() } ValueHasChanged(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void SMESHGUI_TransparencyDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/SMESHGUI/SMESHGUI_TransparencyDlg.h b/src/SMESHGUI/SMESHGUI_TransparencyDlg.h index 54fa8e16f..e7e8b5f5a 100644 --- a/src/SMESHGUI/SMESHGUI_TransparencyDlg.h +++ b/src/SMESHGUI/SMESHGUI_TransparencyDlg.h @@ -56,6 +56,9 @@ public: ~SMESHGUI_TransparencyDlg(); +private: + void keyPressEvent(QKeyEvent*); + private : SMESHGUI* mySMESHGUI; -- 2.39.2