From: mzn Date: Fri, 23 Jun 2006 12:50:16 +0000 (+0000) Subject: Fix for PAL10496. X-Git-Tag: T3_2_1_pre~32 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9f2e4923309c9ee15d3d356c792125f180318ce;p=modules%2Fgeom.git Fix for PAL10496. --- diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index aaa7a3eca..4ab7da484 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -1425,8 +1425,22 @@ bool EntityGUI_SketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject, return true; } +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void EntityGUI_SketcherDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; - + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 1a1471c2d..68d975959 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -73,6 +73,7 @@ protected: virtual bool execute( ObjectList& objects ); void closeEvent( QCloseEvent* e ); + void keyPressEvent( QKeyEvent* e ); private : void Init(); diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 203f85834..396ec0daa 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -243,3 +243,20 @@ void GEOMBase_Skeleton::setHelpFileName(const QString& theName) { myHelpFileName = theName; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void GEOMBase_Skeleton::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index f6c28aade..7f1f61d6b 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -66,6 +66,7 @@ private: protected: void closeEvent(QCloseEvent* e); + void keyPressEvent(QKeyEvent* e); /*! initialize "Name" field with a string "thePrefix_X" (Vertex_3) */ diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx index edc2bd62a..33c24e211 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx @@ -177,3 +177,20 @@ void GEOMToolsGUI_NbIsosDlg::ClickOnHelp() QObject::tr("BUT_OK")); } } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void GEOMToolsGUI_NbIsosDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h index 3e7548464..9df309039 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h @@ -51,6 +51,9 @@ public: void setU( const int ); void setV( const int ); +private: + void keyPressEvent(QKeyEvent*); + private slots: void ClickOnHelp(); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index d739bcbc4..d12ccf7a6 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -279,3 +279,20 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue ) ic->UpdateCurrentViewer(); } // if ( isOCC ) } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void GEOMToolsGUI_TransparencyDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h index 354133ccb..44e6bda83 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h @@ -50,6 +50,9 @@ public: GEOMToolsGUI_TransparencyDlg( QWidget* parent ); ~GEOMToolsGUI_TransparencyDlg(); +private: + void keyPressEvent(QKeyEvent*); + private : bool myFirstInit ; /* Inform for the first init */ QSlider* mySlider; diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index bf2fe3391..1c7684c14 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -365,3 +365,19 @@ GEOM::GEOM_IOperations_ptr MeasureGUI_Skeleton::createOperation() return getGeomEngine()->GetIMeasureOperations( getStudyId() ); } +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + ClickOnHelp(); + } +} diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.h b/src/MeasureGUI/MeasureGUI_Skeleton.h index 59eafe371..4a0c9d6f1 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton.h @@ -65,6 +65,7 @@ protected: void enterEvent( QEvent* e ); void closeEvent( QCloseEvent* e ); + void keyPressEvent( QKeyEvent* e ); void redisplayPreview(); GEOM_Displayer* getDisplayer(); diff --git a/src/OperationGUI/OperationGUI_MaterialDlg.cxx b/src/OperationGUI/OperationGUI_MaterialDlg.cxx index 5f0c9a25e..7259bdcbd 100644 --- a/src/OperationGUI/OperationGUI_MaterialDlg.cxx +++ b/src/OperationGUI/OperationGUI_MaterialDlg.cxx @@ -80,7 +80,7 @@ OperationGUI_MaterialDlg::OperationGUI_MaterialDlg (GeometryGUI* theGeometryGUI, Layout1->addWidget(GroupPoints, 1, 0); /***************************************************************/ - setHelpFileName("none.htm"); + setHelpFileName("partition.htm"); Init(); } diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx index f27424686..a2fab2359 100644 --- a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx @@ -298,3 +298,20 @@ bool RepairGUI_FreeBoundDlg::execute( ObjectList& objects ) return result; } + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void RepairGUI_FreeBoundDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.h b/src/RepairGUI/RepairGUI_FreeBoundDlg.h index 4189527f2..0594fe2d6 100644 --- a/src/RepairGUI/RepairGUI_FreeBoundDlg.h +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.h @@ -60,6 +60,7 @@ private: void Init(); void enterEvent( QEvent* e ); void closeEvent( QCloseEvent* e ); + void keyPressEvent( QKeyEvent* e ); void activateSelection(); virtual GEOM::GEOM_IOperations_ptr createOperation(); diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx index fbfce1638..ea6491ff0 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx @@ -352,3 +352,19 @@ void RepairGUI_FreeFacesDlg::onSetEditCurrentArgument() onSelectionDone(); } +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void RepairGUI_FreeFacesDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Key_F1 ) + { + e->accept(); + onHelp(); + } +} diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.h b/src/RepairGUI/RepairGUI_FreeFacesDlg.h index cafb9b1d6..582179b4d 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.h +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.h @@ -60,6 +60,7 @@ private: void Init(); void enterEvent(QEvent* e); void closeEvent(QCloseEvent* e); + void keyPressEvent(QKeyEvent* e); void activateSelection(); GEOM_Displayer* getDisplayer();