From: mzn Date: Fri, 23 Jun 2006 13:18:27 +0000 (+0000) Subject: Fix for PAL10496. X-Git-Tag: T3_2_1_pre~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd7e949cc8ffb65408d7aea2455380a85cbc70e6;p=modules%2Fvisu.git Fix for PAL10496. --- diff --git a/src/GUITOOLS/VisuGUI_TableDlg.cxx b/src/GUITOOLS/VisuGUI_TableDlg.cxx index 6987d52e..e5cc2c85 100644 --- a/src/GUITOOLS/VisuGUI_TableDlg.cxx +++ b/src/GUITOOLS/VisuGUI_TableDlg.cxx @@ -449,6 +449,22 @@ void VisuGUI_TableDlg::initDlg() } } +/*! + Provides help on F1 button click +*/ +void VisuGUI_TableDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} + /*! Constructor */ diff --git a/src/GUITOOLS/VisuGUI_TableDlg.h b/src/GUITOOLS/VisuGUI_TableDlg.h index 5549fb85..76eaa105 100644 --- a/src/GUITOOLS/VisuGUI_TableDlg.h +++ b/src/GUITOOLS/VisuGUI_TableDlg.h @@ -49,6 +49,9 @@ public: bool showColumnTitles = true ); ~VisuGUI_TableDlg(); +private: + void keyPressEvent( QKeyEvent* e ); + public slots: void onOK(); void onHelp(); diff --git a/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx b/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx index 88db6399..c1c9988d 100644 --- a/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx +++ b/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx @@ -422,3 +422,16 @@ void VisuGUI_BuildProgressDlg::setFileName( const QString& theFileName ) myFileNameLineEdit->setText( myFileName.section( '/', -1 ) ); } } + +void VisuGUI_BuildProgressDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_BuildProgressDlg.h b/src/VISUGUI/VisuGUI_BuildProgressDlg.h index 0d56a0dc..8284c52d 100644 --- a/src/VISUGUI/VisuGUI_BuildProgressDlg.h +++ b/src/VISUGUI/VisuGUI_BuildProgressDlg.h @@ -56,6 +56,9 @@ public: QString fileName() const { return myFileName; } void setFileName( const QString& theFileName ); +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void done( int ); diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index f9889dd0..54a1264b 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -1125,3 +1125,20 @@ void VisuGUI_ClippingDlg::OnPreviewToggle (bool theIsToggled) if (SVTK_ViewWindow* vw = VISU::GetActiveViewWindow(myVisuGUI)) VISU::RenderViewWindow(vw); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void VisuGUI_ClippingDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.h b/src/VISUGUI/VisuGUI_ClippingDlg.h index c649dd93..c076f34d 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.h +++ b/src/VISUGUI/VisuGUI_ClippingDlg.h @@ -133,6 +133,9 @@ public: ~VisuGUI_ClippingDlg(); +private: + void keyPressEvent( QKeyEvent* e ); + private: LightApp_SelectionMgr* mySelectionMgr; diff --git a/src/VISUGUI/VisuGUI_CursorDlg.cxx b/src/VISUGUI/VisuGUI_CursorDlg.cxx index a7c8fb1d..d309c740 100644 --- a/src/VISUGUI/VisuGUI_CursorDlg.cxx +++ b/src/VISUGUI/VisuGUI_CursorDlg.cxx @@ -141,3 +141,20 @@ void VisuGUI_CursorDlg::onHelp() QObject::tr("BUT_OK")); } } + +/*! + function : keyPressEvent() + purpose : +*/ +void VisuGUI_CursorDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_CursorDlg.h b/src/VISUGUI/VisuGUI_CursorDlg.h index 82a910d8..cebb7b6e 100644 --- a/src/VISUGUI/VisuGUI_CursorDlg.h +++ b/src/VISUGUI/VisuGUI_CursorDlg.h @@ -52,6 +52,9 @@ public: QPushButton* buttonCancel; QPushButton* buttonHelp; +private: + void keyPressEvent( QKeyEvent* e ); + private slots: void onHelp(); diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 0a5172ad..d189683f 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -938,3 +938,16 @@ void VisuGUI_CutLinesDlg::onHelp() //jfa tmp: if (theWnd != myStudyWnd) //jfa tmp: reject(); //jfa tmp:} + +void VisuGUI_CutLinesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.h b/src/VISUGUI/VisuGUI_CutLinesDlg.h index 596798bd..8b0e1da4 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.h +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.h @@ -50,6 +50,9 @@ public: bool isGenerateTable() { return myCreateTable->isChecked(); } bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); } +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 78bfc6ac..2666f0cf 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -587,3 +587,16 @@ QWidget* VisuGUI_NumEditItem::createEditor() const editline->setValidator(dvalidator); return editline; } + +void VisuGUI_CutPlanesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.h b/src/VISUGUI/VisuGUI_CutPlanesDlg.h index e1726ecc..b7f9e4cf 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.h +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.h @@ -111,6 +111,9 @@ public: void initFromPrsObject (VISU::CutPlanes_i* thePrs); int storeToPrsObject (VISU::CutPlanes_i* thePrs); +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx index 0ab09694..2a092922 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx @@ -175,3 +175,16 @@ void VisuGUI_DeformedShapeDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_DeformedShapeDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.h b/src/VISUGUI/VisuGUI_DeformedShapeDlg.h index a5e870b1..32c10f4c 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.h +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.h @@ -64,6 +64,9 @@ public: void initFromPrsObject(VISU::DeformedShape_i* thePrs); int storeToPrsObject(VISU::DeformedShape_i* thePrs); +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_EditContainerDlg.cxx b/src/VISUGUI/VisuGUI_EditContainerDlg.cxx index b79e65d9..52defc0a 100644 --- a/src/VISUGUI/VisuGUI_EditContainerDlg.cxx +++ b/src/VISUGUI/VisuGUI_EditContainerDlg.cxx @@ -462,3 +462,16 @@ void VisuGUI_EditContainerDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_EditContainerDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_EditContainerDlg.h b/src/VISUGUI/VisuGUI_EditContainerDlg.h index ced26561..0ff26c94 100644 --- a/src/VISUGUI/VisuGUI_EditContainerDlg.h +++ b/src/VISUGUI/VisuGUI_EditContainerDlg.h @@ -55,6 +55,9 @@ class VisuGUI_EditContainerDlg: public QDialog void initFromPrsObject (VISU::Container_i* theContainer); void storeToPrsObject (VISU::Container_i* theContainer); + + private: + void keyPressEvent( QKeyEvent* e ); private slots: void onLeftClicked(); diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx index a5f7df0c..2c0e864d 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx @@ -750,3 +750,16 @@ void VisuGUI_GaussPointsDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_GaussPointsDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.h b/src/VISUGUI/VisuGUI_GaussPointsDlg.h index 9617d640..1ce86e43 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.h +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.h @@ -139,6 +139,9 @@ public: //! Update Gauss Points presentation using parameters from the dialog. int storeToPrsObject(VISU::GaussPoints_i* thePrs); +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void onToggleDefShape( bool ); void onHelp(); diff --git a/src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx b/src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx index 4e370fb9..909c730d 100644 --- a/src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx +++ b/src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx @@ -245,3 +245,16 @@ void VisuGUI_IsoSurfacesDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_IsoSurfacesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_IsoSurfacesDlg.h b/src/VISUGUI/VisuGUI_IsoSurfacesDlg.h index 5e3b1c51..385fa646 100644 --- a/src/VISUGUI/VisuGUI_IsoSurfacesDlg.h +++ b/src/VISUGUI/VisuGUI_IsoSurfacesDlg.h @@ -83,6 +83,9 @@ class VisuGUI_IsoSurfacesDlg : public QDialog int storeToPrsObject(VISU::IsoSurfaces_i* thePrs) {return myScalarPane->storeToPrsObject(thePrs) && myIsoPane->storeToPrsObject(thePrs);} + private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_NameDlg.cxx b/src/VISUGUI/VisuGUI_NameDlg.cxx index b4a479ff..f0bf79f7 100644 --- a/src/VISUGUI/VisuGUI_NameDlg.cxx +++ b/src/VISUGUI/VisuGUI_NameDlg.cxx @@ -172,3 +172,16 @@ QString VisuGUI_NameDlg::getName( QWidget* parent, const QString& oldName ) delete dlg; return n; } + +void VisuGUI_NameDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_NameDlg.h b/src/VISUGUI/VisuGUI_NameDlg.h index c9505799..5198a631 100644 --- a/src/VISUGUI/VisuGUI_NameDlg.h +++ b/src/VISUGUI/VisuGUI_NameDlg.h @@ -45,6 +45,9 @@ public: QString name(); static QString getName( QWidget* parent = 0, const QString& oldName = QString::null ); + +private: + void keyPressEvent( QKeyEvent* e ); protected slots: void accept(); diff --git a/src/VISUGUI/VisuGUI_OffsetDlg.cxx b/src/VISUGUI/VisuGUI_OffsetDlg.cxx index 759c9948..7e535ac6 100644 --- a/src/VISUGUI/VisuGUI_OffsetDlg.cxx +++ b/src/VISUGUI/VisuGUI_OffsetDlg.cxx @@ -251,3 +251,16 @@ void VisuGUI_OffsetDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_OffsetDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_OffsetDlg.h b/src/VISUGUI/VisuGUI_OffsetDlg.h index 80a3f114..a1d67a51 100644 --- a/src/VISUGUI/VisuGUI_OffsetDlg.h +++ b/src/VISUGUI/VisuGUI_OffsetDlg.h @@ -65,6 +65,9 @@ class VisuGUI_OffsetDlg: public QDialog void getOffset (vtkFloatingPointType* theOffset) const; bool isToSave() const; + private: + void keyPressEvent( QKeyEvent* e ); + public slots: void onReset(); diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx index 2ad6cf22..79564c95 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx @@ -646,3 +646,20 @@ void VisuGUI_Plot3DDlg::setPlane(int theOrientation, double theXRotation, double { myIsoPane->setPlane(theOrientation, theXRotation, theYRotation, thePlanePos); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void VisuGUI_Plot3DDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.h b/src/VISUGUI/VisuGUI_Plot3DDlg.h index e6e22751..230df000 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.h +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.h @@ -111,6 +111,9 @@ class VisuGUI_Plot3DDlg : public QDialog void setPlane(int theOrientation, double theXRotation, double theYRotation, double thePlanePos); + private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx b/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx index 6131085e..45e47f88 100644 --- a/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx +++ b/src/VISUGUI/VisuGUI_ScalarBarDlg.cxx @@ -1156,6 +1156,21 @@ void VisuGUI_ScalarBarDlg::onHelp() } } +/*! + Provides help on F1 button click +*/ +void VisuGUI_ScalarBarDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} //####################################################################################### VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent) @@ -1266,3 +1281,19 @@ void VisuGUI_TextPrefDlg::accept() QDialog::accept(); } + +/*! + Provides help on F1 button click +*/ +void VisuGUI_TextPrefDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_ScalarBarDlg.h b/src/VISUGUI/VisuGUI_ScalarBarDlg.h index 5ef53b8d..d9d0f6f2 100644 --- a/src/VISUGUI/VisuGUI_ScalarBarDlg.h +++ b/src/VISUGUI/VisuGUI_ScalarBarDlg.h @@ -79,6 +79,9 @@ class VisuGUI_TextPrefDlg: public QDialog void storeBeginValues(); + private: + void keyPressEvent( QKeyEvent* e ); + public: SVTK_FontWidget* myTitleFont; SVTK_FontWidget* myLabelFont; @@ -203,6 +206,9 @@ class VisuGUI_ScalarBarDlg : public QDialog void initFromPrsObject(VISU::ScalarMap_i* thePrs) {myScalarPane->initFromPrsObject(thePrs);} int storeToPrsObject(VISU::ScalarMap_i* thePrs) {return myScalarPane->storeToPrsObject(thePrs);} + private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx index 2ab7dcca..ce2da516 100644 --- a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx @@ -480,3 +480,16 @@ float VisuGUI_ScalarMapOnDeformedShapeDlg::GetFloatValueOfTimeStamp(const char* } return ret; } + +void VisuGUI_ScalarMapOnDeformedShapeDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h index 7fb24fac..8ca32d64 100644 --- a/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h +++ b/src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h @@ -71,6 +71,9 @@ public: VISU::TEntity getCurrentScalarEntity(); void SetScalarField(int theIter,QString theFieldName=QString("")); +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index 0f57d69e..64d8b634 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -636,3 +636,16 @@ void VisuGUI_SelectionDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_SelectionDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_Selection.h b/src/VISUGUI/VisuGUI_Selection.h index 40da2d6c..a6517bc1 100644 --- a/src/VISUGUI/VisuGUI_Selection.h +++ b/src/VISUGUI/VisuGUI_Selection.h @@ -47,6 +47,9 @@ public: VisuGUI_SelectionDlg (const SalomeApp_Module* theModule); virtual ~VisuGUI_SelectionDlg (); +private: + void keyPressEvent( QKeyEvent* e ); + protected: void closeEvent (QCloseEvent* theEvent); diff --git a/src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx b/src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx index f0e11c12..1c185b41 100644 --- a/src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx +++ b/src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx @@ -493,6 +493,22 @@ void VisuGUI_SetupPlot2dDlg::enableControls() myOkBtn->setEnabled( bHSet && bVSet ); } +/*! + Provides help on F1 button click +*/ +void VisuGUI_SetupPlot2dDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} + // ==================================================================================== /*! Constructor @@ -722,8 +738,3 @@ void VisuGUI_ItemContainer::onHVToggled( bool on ) emit verToggled( on ); } } - - - - - diff --git a/src/VISUGUI/VisuGUI_SetupPlot2dDlg.h b/src/VISUGUI/VisuGUI_SetupPlot2dDlg.h index 4332f048..dd8a0f9d 100644 --- a/src/VISUGUI/VisuGUI_SetupPlot2dDlg.h +++ b/src/VISUGUI/VisuGUI_SetupPlot2dDlg.h @@ -57,6 +57,9 @@ public: void getCurvesSource( int& horIndex, QValueList& verIndexes ); bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color); +private: + void keyPressEvent( QKeyEvent* e ); + private slots: void onHBtnToggled( bool ); void onVBtnToggled( bool ); diff --git a/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx b/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx index d1615223..7a1820c1 100644 --- a/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx @@ -628,3 +628,16 @@ void VisuGUI_StreamLinesDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_StreamLinesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_StreamLinesDlg.h b/src/VISUGUI/VisuGUI_StreamLinesDlg.h index b1e33ac3..263ef4be 100644 --- a/src/VISUGUI/VisuGUI_StreamLinesDlg.h +++ b/src/VISUGUI/VisuGUI_StreamLinesDlg.h @@ -50,6 +50,9 @@ public: void setColor( QColor color ); void enableMagnColor( bool enable ); +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void accept(); void reject(); diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index ce4110d9..d177ff91 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -1535,3 +1535,18 @@ void VisuGUI_TimeAnimationDlg::onPathChanged() { myAnimator->dumpTo(myPathEdit->text()); } + +//------------------------------------------------------------------------ +void VisuGUI_TimeAnimationDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} + diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.h b/src/VISUGUI/VisuGUI_TimeAnimation.h index 3d592826..604cd24b 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.h +++ b/src/VISUGUI/VisuGUI_TimeAnimation.h @@ -154,6 +154,7 @@ class VisuGUI_TimeAnimationDlg: public QDialog protected: virtual void closeEvent(QCloseEvent* theEvent); virtual void showEvent(QShowEvent* theEvent); + virtual void keyPressEvent(QKeyEvent* theEvent); virtual void reject(); void stopAnimation(); diff --git a/src/VISUGUI/VisuGUI_TransparencyDlg.cxx b/src/VISUGUI/VisuGUI_TransparencyDlg.cxx index bb5eff32..2739cf7a 100644 --- a/src/VISUGUI/VisuGUI_TransparencyDlg.cxx +++ b/src/VISUGUI/VisuGUI_TransparencyDlg.cxx @@ -273,3 +273,20 @@ void VisuGUI_TransparencyDlg::onSelectionChanged() } ValueHasChanged(); } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void VisuGUI_TransparencyDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_TransparencyDlg.h b/src/VISUGUI/VisuGUI_TransparencyDlg.h index 9a67b25b..2809a460 100644 --- a/src/VISUGUI/VisuGUI_TransparencyDlg.h +++ b/src/VISUGUI/VisuGUI_TransparencyDlg.h @@ -56,6 +56,9 @@ public: ~VisuGUI_TransparencyDlg(); +private: + void keyPressEvent( QKeyEvent* e ); + private : LightApp_SelectionMgr* mySelectionMgr; SVTK_ViewWindow* myViewWindow; diff --git a/src/VISUGUI/VisuGUI_VectorsDlg.cxx b/src/VISUGUI/VisuGUI_VectorsDlg.cxx index 2dd8f719..b9c660c0 100644 --- a/src/VISUGUI/VisuGUI_VectorsDlg.cxx +++ b/src/VISUGUI/VisuGUI_VectorsDlg.cxx @@ -444,3 +444,16 @@ void VisuGUI_VectorsDlg::onHelp() QObject::tr("BUT_OK")); } } + +void VisuGUI_VectorsDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VISUGUI/VisuGUI_VectorsDlg.h b/src/VISUGUI/VisuGUI_VectorsDlg.h index 857887ce..091fec4d 100644 --- a/src/VISUGUI/VisuGUI_VectorsDlg.h +++ b/src/VISUGUI/VisuGUI_VectorsDlg.h @@ -79,6 +79,10 @@ public: void initFromPrsObject(VISU::Vectors_i* thePrs); int storeToPrsObject(VISU::Vectors_i* thePrs); +private: + void keyPressEvent( QKeyEvent* e ); + + protected slots: void accept(); void reject(); diff --git a/src/VVTK/VVTK_PickingDlg.cxx b/src/VVTK/VVTK_PickingDlg.cxx index 716ae439..3d0a5f4d 100644 --- a/src/VVTK/VVTK_PickingDlg.cxx +++ b/src/VVTK/VVTK_PickingDlg.cxx @@ -407,3 +407,16 @@ void VVTK_PickingDlg::onColorButtonPressed() if( aColor.isValid() ) mySelectionColorButton->setPaletteBackgroundColor( aColor ); } + +void VVTK_PickingDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onClickHelp(); + } +} diff --git a/src/VVTK/VVTK_PickingDlg.h b/src/VVTK/VVTK_PickingDlg.h index 9cd68798..81b2576c 100644 --- a/src/VVTK/VVTK_PickingDlg.h +++ b/src/VVTK/VVTK_PickingDlg.h @@ -89,6 +89,7 @@ private: void* theCallData); void KeyPressed(); + void keyPressEvent( QKeyEvent* e ); private: QtxDblSpinBox* myCursorSizeSpinBox; diff --git a/src/VVTK/VVTK_RecorderDlg.cxx b/src/VVTK/VVTK_RecorderDlg.cxx index bb495f1e..32a1c3f2 100644 --- a/src/VVTK/VVTK_RecorderDlg.cxx +++ b/src/VVTK/VVTK_RecorderDlg.cxx @@ -203,3 +203,16 @@ bool VVTK_RecorderDlg::onBrowseFile() return true; } + +void VVTK_RecorderDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/VVTK/VVTK_RecorderDlg.h b/src/VVTK/VVTK_RecorderDlg.h index 5c2ead33..23b5a1df 100644 --- a/src/VVTK/VVTK_RecorderDlg.h +++ b/src/VVTK/VVTK_RecorderDlg.h @@ -58,6 +58,9 @@ public: QString fileName() const { return myFileName; } +private: + void keyPressEvent( QKeyEvent* e ); + protected slots: void onStart(); void onClose(); diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.cxx b/src/VVTK/VVTK_SegmentationCursorDlg.cxx index 4a61d9d6..7784042c 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.cxx +++ b/src/VVTK/VVTK_SegmentationCursorDlg.cxx @@ -884,3 +884,16 @@ bool VVTK_SegmentationCursorDlg::CheckNumberOfFaces() myOutsidePrimitiveBox->getPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere && aNumberOfPoints * myOutsidePrimitiveBox->getFaceNumber() > myOutsidePrimitiveBox->getFaceLimit() ); } + +void VVTK_SegmentationCursorDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onClickHelp(); + } +} diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.h b/src/VVTK/VVTK_SegmentationCursorDlg.h index a446a4cc..082608ea 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.h +++ b/src/VVTK/VVTK_SegmentationCursorDlg.h @@ -123,6 +123,8 @@ private: unsigned long theEvent, void* theClientData, void* theCallData); + + void keyPressEvent( QKeyEvent* e ); protected slots: virtual void done( int );