From: mkr Date: Fri, 24 Mar 2006 07:16:21 +0000 (+0000) Subject: Add references into GEOM dialogs to the corresponding help page from GUI documentation. X-Git-Tag: T3_2_0b1_pre1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff4282f5a4d65d37b99e1c11bd568337a446ece8;p=modules%2Fgeom.git Add references into GEOM dialogs to the corresponding help page from GUI documentation. --- diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index 07de548cd..716117ed3 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -86,6 +86,8 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(GeometryGUI* theGeometryGUI, QWidget* parent, Layout1->addWidget( Group3Pnts, 2, 0 ); + setHelpFileName("arc.htm"); + Init(); } diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index 8476ef36e..8c655edae 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -91,6 +91,8 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* par Layout1->addWidget( Group3Pnts, 2, 0 ); /***************************************************************/ + setHelpFileName("circle.htm"); + Init(); } diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index a558a22f0..82fd598fb 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -78,6 +78,8 @@ BasicGUI_CurveDlg::BasicGUI_CurveDlg(GeometryGUI* theGeometryGUI, QWidget* paren Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("curve.htm"); + Init(); } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 273d3267a..b4fb9ec4b 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -75,6 +75,8 @@ BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(GeometryGUI* theGeometryGUI, QWidget* p Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + + setHelpFileName("ellipse.htm"); Init(); } diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index 014f7e18c..9e26a2d4f 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -75,6 +75,8 @@ BasicGUI_LineDlg::BasicGUI_LineDlg(GeometryGUI* theGeometryGUI, QWidget* parent, Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("line.htm"); + Init(); } diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index faf073950..762423af9 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -119,6 +119,8 @@ BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* th Layout1->addWidget( Group1, 2, 0 ); Layout1->addWidget( Group2, 2, 0 ); + setHelpFileName("local_coordinate_system.htm"); + Init(); } diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 544f2611d..a51e2f11c 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -99,6 +99,8 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(GeometryGUI* theGeometryGUI, QWidget* paren Layout1->addWidget(GroupFace, 2, 0); /***************************************************************/ + setHelpFileName("plane.htm"); + Init(); } diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index e21f745ec..f49b0d1d4 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -121,6 +121,8 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* paren myX->setPalette( aPal ); myY->setPalette( aPal ); myZ->setPalette( aPal ); + + setHelpFileName("point.htm"); Init(); } diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index 8860b2e48..416e4e0a4 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -84,6 +84,8 @@ BasicGUI_VectorDlg::BasicGUI_VectorDlg(GeometryGUI* theGeometryGUI, QWidget* par Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + setHelpFileName("vector.htm"); + /* Initialisations */ Init(); } diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx index 168c8bc7b..900955a99 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx @@ -103,6 +103,8 @@ BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(GeometryGUI* theGeometryGUI , Layout1->addWidget(Group3, 1, 0); /***************************************************************/ + setHelpFileName("working_plane.htm"); + Init(); } diff --git a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx index 5d0444ea4..2d99353d7 100644 --- a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx @@ -88,6 +88,8 @@ BlocksGUI_BlockDlg::BlocksGUI_BlockDlg (QWidget* parent, Layout1->addWidget(Group6F, 2, 0); /***************************************************************/ + setHelpFileName("newentity_blocks.htm#HexahedralSolid"); + Init(); } diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index 728082a4e..9d6180cb8 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -108,6 +108,8 @@ BlocksGUI_ExplodeDlg::BlocksGUI_ExplodeDlg (QWidget* parent, Layout1->addWidget(myGrp1, 1, 0); /***************************************************************/ + setHelpFileName("explode_on_blocks.htm"); + Init(); } diff --git a/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx b/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx index 0c4bdc44b..e20031736 100644 --- a/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx @@ -74,7 +74,9 @@ BlocksGUI_PropagateDlg::BlocksGUI_PropagateDlg(QWidget* parent, const char* name Layout1->addWidget(aMainGrp, 1, 0); /***************************************************************/ - + + setHelpFileName("propagate.htm"); + Init(); } diff --git a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx index ebf979a2b..fd7fe35dd 100644 --- a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx @@ -102,6 +102,8 @@ BlocksGUI_QuadFaceDlg::BlocksGUI_QuadFaceDlg (QWidget* parent, Layout1->addWidget(myGrp3, 2, 0); /***************************************************************/ + setHelpFileName("newentity_blocks.htm#QuadrangleFace"); + Init(); } diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index b58b8c62d..0a2baf0a7 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -119,6 +119,8 @@ BlocksGUI_TrsfDlg::BlocksGUI_TrsfDlg (QWidget* parent, Layout1->addWidget( myGrp2, 2, 0 ); /***************************************************************/ + setHelpFileName("multi_transformation.htm"); + Init(); } diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx index c1e4e6d5d..1ca3d0df3 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -57,21 +57,25 @@ BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, QWidget* parent, c image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_COMMON"))); aTitle = tr("GEOM_COMMON"); aCaption = tr("GEOM_COMMON_TITLE"); + setHelpFileName("common.htm"); break; case BooleanGUI::CUT: image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT"))); aTitle = tr("GEOM_CUT"); aCaption = tr("GEOM_CUT_TITLE"); + setHelpFileName("cut.htm"); break; case BooleanGUI::FUSE: image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE"))); aTitle = tr("GEOM_FUSE"); aCaption = tr("GEOM_FUSE_TITLE"); + setHelpFileName("fuse.htm"); break; case BooleanGUI::SECTION: image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION"))); aTitle = tr("GEOM_SECTION"); aCaption = tr("GEOM_SECTION_TITLE"); + setHelpFileName("section.htm"); break; } QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index d993cbbe0..a1f9686d1 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -65,6 +65,8 @@ BuildGUI_CompoundDlg::BuildGUI_CompoundDlg(QWidget* parent, const char* name, bo Layout1->addWidget(GroupShapes, 2, 0); /***************************************************************/ + setHelpFileName("compound.htm"); + /* Initialisations */ Init(); } diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index e43e9e6f9..8472fa8c1 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -74,6 +74,8 @@ BuildGUI_EdgeDlg::BuildGUI_EdgeDlg(QWidget* parent, const char* name, bool modal Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("edge.htm"); + /* Initialisations */ Init(); } diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index f9a5891f2..c974b1823 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -69,6 +69,8 @@ BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, bool modal Layout1->addWidget(GroupWire, 2, 0); /***************************************************************/ + setHelpFileName("face.htm"); + /* Initialisations */ Init(); } diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index 54fd59132..8b4a10dad 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -67,6 +67,8 @@ BuildGUI_ShellDlg::BuildGUI_ShellDlg(QWidget* parent, const char* name, bool mod Layout1->addWidget(GroupShell, 2, 0); /***************************************************************/ + setHelpFileName("shell.htm"); + /* Initialisations */ Init(); } diff --git a/src/BuildGUI/BuildGUI_SolidDlg.cxx b/src/BuildGUI/BuildGUI_SolidDlg.cxx index 9dbdec0db..61b357fa7 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.cxx +++ b/src/BuildGUI/BuildGUI_SolidDlg.cxx @@ -68,6 +68,8 @@ BuildGUI_SolidDlg::BuildGUI_SolidDlg(QWidget* parent, const char* name, bool mod Layout1->addWidget(GroupSolid, 2, 0); /***************************************************************/ + setHelpFileName("solid.htm"); + /* Initialisations */ Init(); } diff --git a/src/BuildGUI/BuildGUI_WireDlg.cxx b/src/BuildGUI/BuildGUI_WireDlg.cxx index 9775a5cb1..1f20514cc 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.cxx +++ b/src/BuildGUI/BuildGUI_WireDlg.cxx @@ -67,6 +67,8 @@ BuildGUI_WireDlg::BuildGUI_WireDlg(QWidget* parent, const char* name, bool modal Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("wire.htm"); + /* Initialisations */ Init(); } diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.cxx b/src/DlgRef/DlgRef_Skeleton_QTD.cxx index f16b05e10..f2a73bc43 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.cxx +++ b/src/DlgRef/DlgRef_Skeleton_QTD.cxx @@ -20,39 +20,38 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_Skeleton_QTD.ui' ** -** Created: Wed Aug 11 18:42:51 2004 -** by: The User Interface Compiler (uic) +** Created: Fri Mar 17 11:18:06 2006 +** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ + #include "DlgRef_Skeleton_QTD.h" #include -#include -#include -#include -#include #include +#include +#include #include +#include +#include #include #include #include -/* - * Constructs a DlgRef_Skeleton_QTD which is a child of 'parent', with the +/* + * Constructs a DlgRef_Skeleton_QTD as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) +DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "DlgRef_Skeleton_QTD" ); - resize( 307, 378 ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); - setCaption( trUtf8( "DlgRef_Skeleton_QTD" ) ); setSizeGripEnabled( TRUE ); DlgRef_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "DlgRef_Skeleton_QTDLayout"); @@ -60,13 +59,11 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo GroupMedium = new QGroupBox( this, "GroupMedium" ); GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) ); - GroupMedium->setTitle( trUtf8( "" ) ); Layout1->addWidget( GroupMedium, 2, 0 ); GroupButtons = new QGroupBox( this, "GroupButtons" ); GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) ); - GroupButtons->setTitle( trUtf8( "" ) ); GroupButtons->setColumnLayout(0, Qt::Vertical ); GroupButtons->layout()->setSpacing( 6 ); GroupButtons->layout()->setMargin( 11 ); @@ -76,25 +73,24 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3"); buttonOk = new QPushButton( GroupButtons, "buttonOk" ); - buttonOk->setText( trUtf8( "&Ok" ) ); Layout3->addWidget( buttonOk ); buttonApply = new QPushButton( GroupButtons, "buttonApply" ); - buttonApply->setText( trUtf8( "&Apply" ) ); Layout3->addWidget( buttonApply ); - QSpacerItem* spacer = new QSpacerItem( 91, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); - Layout3->addItem( spacer ); + Spacer1 = new QSpacerItem( 91, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); + Layout3->addItem( Spacer1 ); buttonCancel = new QPushButton( GroupButtons, "buttonCancel" ); - buttonCancel->setText( trUtf8( "&Cancel" ) ); Layout3->addWidget( buttonCancel ); + + buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); + Layout3->addWidget( buttonHelp ); GroupButtonsLayout->addLayout( Layout3 ); Layout1->addWidget( GroupButtons, 3, 0 ); GroupConstructors = new QButtonGroup( this, "GroupConstructors" ); GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) ); - GroupConstructors->setTitle( trUtf8( "" ) ); GroupConstructors->setColumnLayout(0, Qt::Vertical ); GroupConstructors->layout()->setSpacing( 6 ); GroupConstructors->layout()->setMargin( 11 ); @@ -104,26 +100,21 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); RadioButton1 = new QRadioButton( GroupConstructors, "RadioButton1" ); - RadioButton1->setText( trUtf8( "" ) ); Layout2->addWidget( RadioButton1 ); RadioButton2 = new QRadioButton( GroupConstructors, "RadioButton2" ); - RadioButton2->setText( trUtf8( "" ) ); Layout2->addWidget( RadioButton2 ); RadioButton3 = new QRadioButton( GroupConstructors, "RadioButton3" ); - RadioButton3->setText( trUtf8( "" ) ); Layout2->addWidget( RadioButton3 ); RadioButton4 = new QRadioButton( GroupConstructors, "RadioButton4" ); - RadioButton4->setText( trUtf8( "" ) ); Layout2->addWidget( RadioButton4 ); GroupConstructorsLayout->addLayout( Layout2 ); Layout1->addWidget( GroupConstructors, 0, 0 ); GroupBoxName = new QGroupBox( this, "GroupBoxName" ); - GroupBoxName->setTitle( trUtf8( "Result name" ) ); GroupBoxName->setColumnLayout(0, Qt::Vertical ); GroupBoxName->layout()->setSpacing( 6 ); GroupBoxName->layout()->setMargin( 11 ); @@ -137,7 +128,6 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo Layout66->addWidget( ResultName, 0, 1 ); NameLabel = new QLabel( GroupBoxName, "NameLabel" ); - NameLabel->setText( trUtf8( "Name" ) ); Layout66->addWidget( NameLabel, 0, 0 ); @@ -146,9 +136,12 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo Layout1->addWidget( GroupBoxName, 1, 0 ); DlgRef_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 ); + languageChange(); + resize( QSize(307, 378).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); } -/* +/* * Destroys the object and frees any allocated resources */ DlgRef_Skeleton_QTD::~DlgRef_Skeleton_QTD() @@ -156,3 +149,25 @@ DlgRef_Skeleton_QTD::~DlgRef_Skeleton_QTD() // no need to delete child widgets, Qt does it all for us } +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void DlgRef_Skeleton_QTD::languageChange() +{ + setCaption( tr( "DlgRef_Skeleton_QTD" ) ); + GroupMedium->setTitle( QString::null ); + GroupButtons->setTitle( QString::null ); + buttonOk->setText( tr( "&Ok" ) ); + buttonApply->setText( tr( "&Apply" ) ); + buttonCancel->setText( tr( "&Cancel" ) ); + buttonHelp->setText( tr( "&Help" ) ); + GroupConstructors->setTitle( QString::null ); + RadioButton1->setText( QString::null ); + RadioButton2->setText( QString::null ); + RadioButton3->setText( QString::null ); + RadioButton4->setText( QString::null ); + GroupBoxName->setTitle( tr( "Result name" ) ); + NameLabel->setText( tr( "Name" ) ); +} + diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.h b/src/DlgRef/DlgRef_Skeleton_QTD.h index fb4807f31..36d201f2e 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.h +++ b/src/DlgRef/DlgRef_Skeleton_QTD.h @@ -20,34 +20,31 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_Skeleton_QTD.ui' ** -** Created: Wed Aug 11 18:42:51 2004 -** by: The User Interface Compiler (uic) +** Created: Fri Mar 17 11:18:06 2006 +** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ + #ifndef DLGREF_SKELETON_QTD_H #define DLGREF_SKELETON_QTD_H #include #include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QButtonGroup; + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; class QGroupBox; -class QLabel; -class QLineEdit; class QPushButton; +class QButtonGroup; class QRadioButton; +class QLineEdit; +class QLabel; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_Skeleton_QTD : public QDialog -{ +class DlgRef_Skeleton_QTD : public QDialog +{ Q_OBJECT public: @@ -59,6 +56,7 @@ public: QPushButton* buttonOk; QPushButton* buttonApply; QPushButton* buttonCancel; + QPushButton* buttonHelp; QButtonGroup* GroupConstructors; QRadioButton* RadioButton1; QRadioButton* RadioButton2; @@ -68,16 +66,20 @@ public: QLineEdit* ResultName; QLabel* NameLabel; - protected: QGridLayout* DlgRef_Skeleton_QTDLayout; QGridLayout* Layout1; QHBoxLayout* GroupButtonsLayout; QHBoxLayout* Layout3; + QSpacerItem* Spacer1; QHBoxLayout* GroupConstructorsLayout; QHBoxLayout* Layout2; QGridLayout* GroupBoxNameLayout; QGridLayout* Layout66; + +protected slots: + virtual void languageChange(); + }; #endif // DLGREF_SKELETON_QTD_H diff --git a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui index 1098d6c46..b675f277c 100644 --- a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui @@ -105,7 +105,7 @@ 6 - + buttonOk @@ -146,6 +146,14 @@ &Cancel + + + buttonHelp + + + &Help + + diff --git a/src/DlgRef/UIFiles/ui_to_cxx b/src/DlgRef/UIFiles/ui_to_cxx index 4c4c512b8..829b9d852 100755 --- a/src/DlgRef/UIFiles/ui_to_cxx +++ b/src/DlgRef/UIFiles/ui_to_cxx @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ +# #!/bin/sh #uic -o DlgRef_Skeleton_QTD.h DlgRef_Skeleton_QTD.ui diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx index 65e0b2444..fbcfd5e1a 100644 --- a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx +++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx @@ -1,69 +1,47 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_Skeleton_QTD.ui' ** -** Created: ven déc 12 11:17:08 2003 -** by: The User Interface Compiler (uic) +** Created: Fri Mar 17 15:47:14 2006 +** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ + #include "EntityGUI_Skeleton_QTD.h" #include -#include -#include #include +#include +#include #include #include #include #include -/* - * Constructs a EntityGUI_Skeleton_QTD which is a child of 'parent', with the +/* + * Constructs a EntityGUI_Skeleton_QTD as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) +EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "EntityGUI_Skeleton_QTD" ); - resize( 317, 276 ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); - setCaption( trUtf8( "EntityGUI_Skeleton_QTD" ) ); EntityGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "EntityGUI_Skeleton_QTDLayout"); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); GroupVal = new QGroupBox( this, "GroupVal" ); GroupVal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupVal->sizePolicy().hasHeightForWidth() ) ); - GroupVal->setTitle( trUtf8( "" ) ); Layout1->addWidget( GroupVal, 2, 0 ); GroupConstructors = new QButtonGroup( this, "GroupConstructors" ); GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) ); - GroupConstructors->setTitle( trUtf8( "Element Type" ) ); GroupConstructors->setColumnLayout(0, Qt::Vertical ); GroupConstructors->layout()->setSpacing( 6 ); GroupConstructors->layout()->setMargin( 11 ); @@ -73,11 +51,9 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); RadioButton1 = new QRadioButton( GroupConstructors, "RadioButton1" ); - RadioButton1->setText( trUtf8( "Segment" ) ); Layout2->addWidget( RadioButton1 ); RadioButton2 = new QRadioButton( GroupConstructors, "RadioButton2" ); - RadioButton2->setText( trUtf8( "Arc" ) ); Layout2->addWidget( RadioButton2 ); GroupConstructorsLayout->addLayout( Layout2, 0, 0 ); @@ -86,7 +62,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na GroupDest = new QGroupBox( this, "GroupDest" ); GroupDest->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDest->sizePolicy().hasHeightForWidth() ) ); - GroupDest->setTitle( trUtf8( "Destination" ) ); GroupDest->setColumnLayout(0, Qt::Vertical ); GroupDest->layout()->setSpacing( 6 ); GroupDest->layout()->setMargin( 11 ); @@ -97,7 +72,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na GroupDest1 = new QButtonGroup( GroupDest, "GroupDest1" ); GroupDest1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDest1->sizePolicy().hasHeightForWidth() ) ); - GroupDest1->setTitle( trUtf8( "Type" ) ); GroupDest1->setColumnLayout(0, Qt::Vertical ); GroupDest1->layout()->setSpacing( 6 ); GroupDest1->layout()->setMargin( 11 ); @@ -107,12 +81,10 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); RB_Dest2 = new QRadioButton( GroupDest1, "RB_Dest2" ); - RB_Dest2->setText( trUtf8( "Direction" ) ); Layout4->addWidget( RB_Dest2, 0, 1 ); RB_Dest1 = new QRadioButton( GroupDest1, "RB_Dest1" ); - RB_Dest1->setText( trUtf8( "Point" ) ); Layout4->addWidget( RB_Dest1, 0, 0 ); @@ -122,7 +94,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na GroupDest2 = new QButtonGroup( GroupDest, "GroupDest2" ); GroupDest2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest2->sizePolicy().hasHeightForWidth() ) ); - GroupDest2->setTitle( trUtf8( "" ) ); GroupDest2->setColumnLayout(0, Qt::Vertical ); GroupDest2->layout()->setSpacing( 6 ); GroupDest2->layout()->setMargin( 11 ); @@ -133,7 +104,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na GroupDest3 = new QButtonGroup( GroupDest, "GroupDest3" ); GroupDest3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest3->sizePolicy().hasHeightForWidth() ) ); - GroupDest3->setTitle( trUtf8( "" ) ); GroupDest3->setColumnLayout(0, Qt::Vertical ); GroupDest3->layout()->setSpacing( 6 ); GroupDest3->layout()->setMargin( 11 ); @@ -148,7 +118,6 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na GroupButtons = new QGroupBox( this, "GroupButtons" ); GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) ); - GroupButtons->setTitle( trUtf8( "" ) ); GroupButtons->setColumnLayout(0, Qt::Vertical ); GroupButtons->layout()->setSpacing( 6 ); GroupButtons->layout()->setMargin( 11 ); @@ -158,23 +127,26 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3"); buttonEnd = new QPushButton( GroupButtons, "buttonEnd" ); - buttonEnd->setText( trUtf8( "End Sketch" ) ); Layout3->addWidget( buttonEnd ); buttonClose = new QPushButton( GroupButtons, "buttonClose" ); - buttonClose->setText( trUtf8( "Close Sketch" ) ); Layout3->addWidget( buttonClose ); - QSpacerItem* spacer = new QSpacerItem( 91, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); - Layout3->addItem( spacer ); + Spacer1 = new QSpacerItem( 91, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); + Layout3->addItem( Spacer1 ); buttonCancel = new QPushButton( GroupButtons, "buttonCancel" ); - buttonCancel->setText( trUtf8( "&Cancel" ) ); Layout3->addWidget( buttonCancel ); + + buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); + Layout3->addWidget( buttonHelp ); GroupButtonsLayout->addLayout( Layout3 ); Layout1->addWidget( GroupButtons, 3, 0 ); EntityGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 ); + languageChange(); + resize( QSize(317, 276).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); // tab order setTabOrder( RadioButton1, RadioButton2 ); @@ -185,7 +157,7 @@ EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent, const char* na setTabOrder( buttonClose, buttonCancel ); } -/* +/* * Destroys the object and frees any allocated resources */ EntityGUI_Skeleton_QTD::~EntityGUI_Skeleton_QTD() @@ -193,3 +165,27 @@ EntityGUI_Skeleton_QTD::~EntityGUI_Skeleton_QTD() // no need to delete child widgets, Qt does it all for us } +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void EntityGUI_Skeleton_QTD::languageChange() +{ + setCaption( tr( "EntityGUI_Skeleton_QTD" ) ); + GroupVal->setTitle( QString::null ); + GroupConstructors->setTitle( tr( "Element Type" ) ); + RadioButton1->setText( tr( "Segment" ) ); + RadioButton2->setText( tr( "Arc" ) ); + GroupDest->setTitle( tr( "Destination" ) ); + GroupDest1->setTitle( tr( "Type" ) ); + RB_Dest2->setText( tr( "Direction" ) ); + RB_Dest1->setText( tr( "Point" ) ); + GroupDest2->setTitle( QString::null ); + GroupDest3->setTitle( QString::null ); + GroupButtons->setTitle( QString::null ); + buttonEnd->setText( tr( "End Sketch" ) ); + buttonClose->setText( tr( "Close Sketch" ) ); + buttonCancel->setText( tr( "&Cancel" ) ); + buttonHelp->setText( tr( "&Help" ) ); +} + diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.h b/src/EntityGUI/EntityGUI_Skeleton_QTD.h index df965cddc..149f7b32f 100644 --- a/src/EntityGUI/EntityGUI_Skeleton_QTD.h +++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.h @@ -1,45 +1,29 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_Skeleton_QTD.ui' ** -** Created: ven déc 12 11:17:07 2003 -** by: The User Interface Compiler (uic) +** Created: Fri Mar 17 15:47:13 2006 +** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ + #ifndef ENTITYGUI_SKELETON_QTD_H #define ENTITYGUI_SKELETON_QTD_H #include #include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QButtonGroup; + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; class QGroupBox; -class QPushButton; +class QButtonGroup; class QRadioButton; +class QPushButton; class EntityGUI_Skeleton_QTD : public QDialog -{ +{ Q_OBJECT public: @@ -60,7 +44,7 @@ public: QPushButton* buttonEnd; QPushButton* buttonClose; QPushButton* buttonCancel; - + QPushButton* buttonHelp; protected: QGridLayout* EntityGUI_Skeleton_QTDLayout; @@ -75,6 +59,11 @@ protected: QGridLayout* GroupDest3Layout; QHBoxLayout* GroupButtonsLayout; QHBoxLayout* Layout3; + QSpacerItem* Spacer1; + +protected slots: + virtual void languageChange(); + }; #endif // ENTITYGUI_SKELETON_QTD_H diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 0e6a141d5..db33fa8d8 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -73,6 +73,7 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, buttonCancel->setText(tr("GEOM_BUT_CANCEL")); buttonEnd->setText(tr("GEOM_BUT_END_SKETCH")); buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH")); + buttonHelp->setText(tr("GEOM_BUT_HELP")); GroupVal->close(TRUE); GroupDest2->close(TRUE); @@ -160,6 +161,7 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, connect(buttonEnd, SIGNAL(clicked()), this, SLOT(ClickOnEnd())); connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnEnd())); connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + connect(buttonHelp, SIGNAL( clicked() ), this, SLOT( ClickOnHelp())); connect(Group1Sel->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(Group1Sel->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo())); @@ -210,7 +212,7 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); - + Init(); } @@ -244,6 +246,8 @@ void EntityGUI_SketcherDlg::Init() myLastX2 = 0.0; myLastY2 = 0.0; + myHelpFileName = "sketcher.htm"; + /* Get setting of step value from file configuration */ double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 ); @@ -687,6 +691,22 @@ bool EntityGUI_SketcherDlg::ClickOnApply() return true; } +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void EntityGUI_SketcherDlg::ClickOnHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(myGeometryGUI ? app->moduleName(myGeometryGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} + //================================================================================= // function : ClickOnUndo() // purpose : @@ -1403,4 +1423,3 @@ bool EntityGUI_SketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject, - diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 2546a5fe2..c9702e5b1 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -112,6 +112,8 @@ private : GeometryGUI* myGeometryGUI; + QString myHelpFileName; + enum SketchState {FIRST_POINT, NEXT_POINT}; enum SketchType {PT_ABS, PT_RELATIVE, PT_SEL, @@ -135,6 +137,7 @@ private slots: bool ClickOnApply(); void ClickOnUndo(); void ClickOnRedo(); + void ClickOnHelp(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); @@ -146,7 +149,7 @@ private slots: void Dir1Clicked(int constructorId); void Dir2Clicked(int constructorId); void ValueChangedInSpinBox(double newValue); - + }; #endif // ENTITYGUI_SKETCHERDLG_H diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 27c0b6c87..73efe51f1 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -77,6 +77,8 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(QWidget* parent, const char* name, Layout1->addWidget(GroupPoints, 1, 0); /***************************************************************/ + setHelpFileName("explode.htm"); + Init(); } diff --git a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui index 1a27ca107..c257a8086 100644 --- a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui +++ b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui @@ -358,6 +358,14 @@ &Cancel + + + buttonHelp + + + &Help + + diff --git a/src/EntityGUI/UIFiles/ui_to_cxx b/src/EntityGUI/UIFiles/ui_to_cxx index a430c4c4b..f09cc6acc 100755 --- a/src/EntityGUI/UIFiles/ui_to_cxx +++ b/src/EntityGUI/UIFiles/ui_to_cxx @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ +# #!/bin/sh uic -o EntityGUI_Skeleton_QTD.h EntityGUI_Skeleton_QTD.ui diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 57b32e089..e38b6846f 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -32,6 +32,7 @@ #include "SUIT_Session.h" #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" +#include "SUIT_MessageBox.h" #include @@ -54,6 +55,7 @@ GEOMBase_Skeleton::GEOMBase_Skeleton(QWidget* parent, const char* name, bool mod buttonCancel->setText(tr("GEOM_BUT_CLOSE")); buttonOk->setText(tr("GEOM_BUT_OK")); buttonApply->setText(tr("GEOM_BUT_APPLY")); + buttonHelp->setText(tr("GEOM_BUT_HELP")); GroupMedium->close(TRUE); resize(0, 0); @@ -95,6 +97,9 @@ void GEOMBase_Skeleton::Init() connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); } + + // connect help button on a private slot that displays help information + connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) ); /* Move widget on the botton right corner of main widget */ // int x, y; @@ -213,3 +218,28 @@ int GEOMBase_Skeleton::getConstructorId() const return GroupConstructors->id( GroupConstructors->selected() ); return -1; } + +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void GEOMBase_Skeleton::ClickOnHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} +//================================================================================= +// function : setHelpFileName() +// purpose : set name for help file html +//================================================================================= + +void GEOMBase_Skeleton::setHelpFileName(const QString& theName) +{ + myHelpFileName = theName; +} diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index 1d3144cc3..8163822e4 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -71,16 +71,20 @@ protected: void initName( const char* thePrefix = 0 ); // initialize "Name" field with a string "thePrefix_X" (Vertex_3) virtual const char* getNewObjectName() const; // returns contents of "Name" field int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error + + void setHelpFileName( const QString& ); QLineEdit* myEditCurrentArgument; /* Current LineEdit */ GEOMBase* myGeomBase; // SAN -- TO BE REMOVED !!! GeometryGUI* myGeomGUI; /* reference GEOM GUI */ + QString myHelpFileName; protected slots: void ClickOnCancel(); void LineEditReturnPressed(); void DeactivateActiveDialog(); void ActivateThisDialog(); + void ClickOnHelp(); }; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx index 0a6614894..9c4e5040c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx @@ -28,6 +28,10 @@ #include "GEOMToolsGUI_NbIsosDlg.h" +#include "GeometryGUI.h" +#include +#include +#include #include #include @@ -104,22 +108,28 @@ GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent ) QPushButton* buttonCancel = new QPushButton( GroupButtons, "buttonCancel" ); buttonCancel->setText( tr( "GEOM_BUT_CANCEL" ) ) ; buttonCancel->setAutoDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonCancel, 0, 2 ); + GroupButtonsLayout->addWidget( buttonCancel, 0, 1 ); + + QPushButton* buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); + buttonHelp->setText( tr( "GEOM_BUT_HELP" ) ) ; + buttonHelp->setAutoDefault( TRUE ); + GroupButtonsLayout->addWidget( buttonHelp, 0, 2 ); /***************************************************************/ MyDialogLayout->addWidget(GroupC1, 0, 0); MyDialogLayout->addWidget(GroupButtons, 1, 0); - + + myHelpFileName = "isos.htm"; // signals and slots connections connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); + connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp())); /* Move widget on the botton right corner of main widget */ SUIT_Tools::centerWidget(this, parent); } - //================================================================================= // function : ~GEOMToolsGUI_NbIsosDlg() // purpose : Destroys the object and frees any allocated resources @@ -149,3 +159,20 @@ void GEOMToolsGUI_NbIsosDlg::setV( const int v ) SpinBoxV->setValue( v ); } +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void GEOMToolsGUI_NbIsosDlg::ClickOnHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) { + GeometryGUI* aGeomGUI = dynamic_cast( app->module( "Geometry" ) ); + app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName); + } + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h index 943dbdcde..257ca4c3e 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h @@ -51,9 +51,13 @@ public: void setU( const int ); void setV( const int ); +private slots: + void ClickOnHelp(); + private: QSpinBox* SpinBoxU; QSpinBox* SpinBoxV; + QString myHelpFileName; }; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 0984dd88c..174601094 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -29,6 +29,7 @@ #include "GEOMToolsGUI_TransparencyDlg.h" #include "GEOMBase.h" #include "GEOM_AISShape.hxx" +#include "GeometryGUI.h" #include "SALOME_ListIO.hxx" #include "SALOME_ListIteratorOfListIO.hxx" @@ -43,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -96,9 +98,15 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent ) buttonOk->setText( tr( "GEOM_BUT_OK" ) ); buttonOk->setAutoDefault( TRUE ); buttonOk->setDefault( TRUE ); - GroupButtonsLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 0 ); - GroupButtonsLayout->addWidget( buttonOk, 0, 1 ); - GroupButtonsLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2 ); + + QPushButton* buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); + buttonHelp->setText( tr( "GEOM_BUT_HELP" ) ); + buttonHelp->setAutoDefault( TRUE ); + buttonHelp->setDefault( TRUE ); + + GroupButtonsLayout->addWidget( buttonOk, 0, 0 ); + GroupButtonsLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1 ); + GroupButtonsLayout->addWidget( buttonHelp, 0, 2 ); /*************************************************************************/ QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" ); @@ -137,8 +145,11 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent ) // mySlider->setValue( 5 ) ; ValueHasChanged(mySlider->value()); + myHelpFileName = "transparency.htm"; + // signals and slots connections : after ValueHasChanged() connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp())); connect(mySlider, SIGNAL(valueChanged(int)), this, SLOT(ValueHasChanged(int))); } @@ -174,6 +185,23 @@ void GEOMToolsGUI_TransparencyDlg::ClickOnClose() return; } +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void GEOMToolsGUI_TransparencyDlg::ClickOnHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) { + GeometryGUI* aGeomGUI = dynamic_cast( app->module( "Geometry" ) ); + app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName); + } + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} //================================================================================= // function : ValueHasChanged() diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h index a63b514b6..673a46f4a 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h @@ -53,10 +53,12 @@ public: private : bool myFirstInit ; /* Inform for the first init */ QSlider* mySlider; + QString myHelpFileName; private slots: void ClickOnOk(); void ClickOnClose(); + void ClickOnHelp(); void ValueHasChanged( int ) ; }; diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 5dde019e0..990063dd5 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -88,6 +88,8 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("filling.htm"); + /* Initialisations */ Init(); } diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index 5cf2f1458..6d93a34c5 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -81,6 +81,8 @@ GenerationGUI_PipeDlg::GenerationGUI_PipeDlg(QWidget* parent, const char* name, Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("pipe_creation.htm"); + /* Initialisations */ Init(); } diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index bc3aa51dc..f48a3ca41 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -79,6 +79,8 @@ GenerationGUI_PrismDlg::GenerationGUI_PrismDlg(GeometryGUI* theGeometryGUI, QWid Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("extrusion.htm"); + /* Initialisations */ Init(); } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 14c0d011d..f6a83f432 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -81,6 +81,8 @@ GenerationGUI_RevolDlg::GenerationGUI_RevolDlg(GeometryGUI* theGeometryGUI, QWid Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("revolution.htm"); + /* Initialisations */ Init(); } diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 84f5db220..dd0597ab7 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -115,6 +115,8 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg(Mode mode, aMedLayout->addWidget( myAddBtn, 2, 3 ); aMedLayout->addWidget( myRemBtn, 3, 3 ); + setHelpFileName("working_with_groups.htm"); + Init(); } diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx index b1e133cfc..179f51047 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx @@ -88,6 +88,8 @@ MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg( GeometryGUI* GUI, QWidget* parent ) /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Bounding_box"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx index 9191ebd34..0c89bb0aa 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx @@ -80,6 +80,8 @@ MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg( QWidget* parent ) Layout1->addWidget( myGrp, 2, 0 ); /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Center_gravity"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx index 088c11ccd..c2ab2a8b8 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx @@ -117,6 +117,9 @@ MeasureGUI_CheckCompoundOfBlocksDlg::MeasureGUI_CheckCompoundOfBlocksDlg( Geomet Layout1->addWidget( myGrp, 1, 0 ); connect( myErrorsLBox, SIGNAL( selectionChanged() ), SLOT( onErrorsListSelectionChanged() ) ); connect( mySubShapesLBox, SIGNAL( selectionChanged() ), SLOT( onSubShapesListSelectionChanged() ) ); + + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Check_comp_blocks"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx index d63de1040..541607690 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx @@ -81,6 +81,8 @@ MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg( GeometryGUI* GUI, QWidget* p /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#check"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx index 5762c0606..c06d2b8a6 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx @@ -92,6 +92,8 @@ MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg( GeometryGUI* GUI, QWidget* paren /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Min_distance"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx index 2c36eacac..3f1ae07cd 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx @@ -96,6 +96,8 @@ MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg( GeometryGUI* GUI, QWidget* parent /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Inertia_axis"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx index 75be01ef7..c380c2335 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx @@ -83,6 +83,8 @@ MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg( GeometryGUI* GUI, QWidge /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Tolerance"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.cxx b/src/MeasureGUI/MeasureGUI_PointDlg.cxx index 7db3bee11..34d08f348 100644 --- a/src/MeasureGUI/MeasureGUI_PointDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PointDlg.cxx @@ -99,6 +99,8 @@ MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent ) Layout1->addWidget( aGrp, 1, 0 ); + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#PointCoord"; + Init(); } diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx index 596cddd4f..733892b09 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx @@ -83,6 +83,8 @@ MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg( GeometryGUI* GUI, QWidget* p /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Basic_properties"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index bbfdb0741..1b9e75d60 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -34,6 +34,7 @@ #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" #include "SalomeApp_Tools.h" +#include "SUIT_MessageBox.h" #include "SUIT_Session.h" #include "SUIT_OverrideCursor.h" @@ -63,11 +64,13 @@ MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, mySelBtn = 0; mySelEdit = 0; myDisplayer = 0; + myHelpFileName = ""; if ( !name ) setName( "MeasureGUI_Skeleton" ); buttonClose->setText( tr( "GEOM_BUT_CLOSE" ) ); + buttonHelp->setText(tr("GEOM_BUT_HELP")); buttonClose->setAutoDefault( false ); @@ -100,6 +103,9 @@ void MeasureGUI_Skeleton::Init() connect( buttonClose, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ); + + connect( buttonHelp, SIGNAL( clicked() ), + this, SLOT( ClickOnHelp() ) ); connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT ( DeactivateActiveDialog() ) ); @@ -136,6 +142,21 @@ void MeasureGUI_Skeleton::ClickOnCancel() close(); } +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::ClickOnHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} //================================================================================= // function : LineEditReturnPressed() diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.h b/src/MeasureGUI/MeasureGUI_Skeleton.h index bcf601a1e..7c335648e 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton.h @@ -52,6 +52,7 @@ public: protected slots: virtual void ClickOnCancel(); + virtual void ClickOnHelp(); virtual void DeactivateActiveDialog(); virtual void ActivateThisDialog(); virtual void SelectionIntoArgument(); @@ -82,6 +83,8 @@ protected: GeometryGUI* myGeomGUI; GEOM_Displayer* myDisplayer; + + QString myHelpFileName; }; #endif // MEASUREGUI_SKELETON_H diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx index 343064b7e..8b3ed9c68 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx @@ -1,56 +1,36 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// /**************************************************************************** ** Form implementation generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui' ** -** Created: lun oct 27 11:23:09 2003 -** by: The User Interface Compiler (uic) +** Created: Tue Mar 21 10:10:08 2006 +** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ + #include "MeasureGUI_Skeleton_QTD.h" #include -#include -#include #include +#include +#include #include #include #include #include -/* - * Constructs a MeasureGUI_Skeleton_QTD which is a child of 'parent', with the +/* + * Constructs a MeasureGUI_Skeleton_QTD as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) +MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "MeasureGUI_Skeleton_QTD" ); - resize( 228, 266 ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); - setCaption( trUtf8( "MeasureGUI_Skeleton_QTD" ) ); setSizeGripEnabled( TRUE ); MeasureGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "MeasureGUI_Skeleton_QTDLayout"); @@ -58,7 +38,6 @@ MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* GroupButtons = new QGroupBox( this, "GroupButtons" ); GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) ); - GroupButtons->setTitle( trUtf8( "" ) ); GroupButtons->setColumnLayout(0, Qt::Vertical ); GroupButtons->layout()->setSpacing( 6 ); GroupButtons->layout()->setMargin( 11 ); @@ -66,15 +45,16 @@ MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* GroupButtonsLayout->setAlignment( Qt::AlignTop ); Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); - QSpacerItem* spacer = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); - Layout3->addItem( spacer, 0, 2 ); - QSpacerItem* spacer_2 = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); - Layout3->addItem( spacer_2, 0, 0 ); + Spacer1 = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); + Layout3->addItem( Spacer1, 0, 1 ); buttonClose = new QPushButton( GroupButtons, "buttonClose" ); - buttonClose->setText( trUtf8( "&Close" ) ); - Layout3->addWidget( buttonClose, 0, 1 ); + Layout3->addWidget( buttonClose, 0, 0 ); + + buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); + + Layout3->addWidget( buttonHelp, 0, 2 ); GroupButtonsLayout->addLayout( Layout3, 0, 0 ); @@ -82,7 +62,6 @@ MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* GroupConstructors = new QButtonGroup( this, "GroupConstructors" ); GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) ); - GroupConstructors->setTitle( trUtf8( "" ) ); GroupConstructors->setColumnLayout(0, Qt::Vertical ); GroupConstructors->layout()->setSpacing( 6 ); GroupConstructors->layout()->setMargin( 11 ); @@ -92,7 +71,6 @@ MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); RadioButton1 = new QRadioButton( GroupConstructors, "RadioButton1" ); - RadioButton1->setText( trUtf8( "" ) ); Layout2->addWidget( RadioButton1 ); GroupConstructorsLayout->addLayout( Layout2, 0, 0 ); @@ -101,14 +79,16 @@ MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* GroupMedium = new QGroupBox( this, "GroupMedium" ); GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) ); - GroupMedium->setTitle( trUtf8( "" ) ); Layout1->addWidget( GroupMedium, 1, 0 ); MeasureGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 ); + languageChange(); + resize( QSize(228, 266).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); } -/* +/* * Destroys the object and frees any allocated resources */ MeasureGUI_Skeleton_QTD::~MeasureGUI_Skeleton_QTD() @@ -116,3 +96,18 @@ MeasureGUI_Skeleton_QTD::~MeasureGUI_Skeleton_QTD() // no need to delete child widgets, Qt does it all for us } +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void MeasureGUI_Skeleton_QTD::languageChange() +{ + setCaption( tr( "MeasureGUI_Skeleton_QTD" ) ); + GroupButtons->setTitle( QString::null ); + buttonClose->setText( tr( "&Close" ) ); + buttonHelp->setText( tr( "&Help" ) ); + GroupConstructors->setTitle( QString::null ); + RadioButton1->setText( QString::null ); + GroupMedium->setTitle( QString::null ); +} + diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h index 90145bfaa..3aa608a4d 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h @@ -1,45 +1,29 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// /**************************************************************************** ** Form interface generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui' ** -** Created: lun oct 27 11:23:09 2003 -** by: The User Interface Compiler (uic) +** Created: Tue Mar 21 10:10:08 2006 +** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ + #ifndef MEASUREGUI_SKELETON_QTD_H #define MEASUREGUI_SKELETON_QTD_H #include #include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QButtonGroup; + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; class QGroupBox; class QPushButton; +class QButtonGroup; class QRadioButton; class MeasureGUI_Skeleton_QTD : public QDialog -{ +{ Q_OBJECT public: @@ -48,18 +32,23 @@ public: QGroupBox* GroupButtons; QPushButton* buttonClose; + QPushButton* buttonHelp; QButtonGroup* GroupConstructors; QRadioButton* RadioButton1; QGroupBox* GroupMedium; - protected: QGridLayout* MeasureGUI_Skeleton_QTDLayout; QGridLayout* Layout1; QGridLayout* GroupButtonsLayout; QGridLayout* Layout3; + QSpacerItem* Spacer1; QGridLayout* GroupConstructorsLayout; QHBoxLayout* Layout2; + +protected slots: + virtual void languageChange(); + }; #endif // MEASUREGUI_SKELETON_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx index 7bd5a6a81..36643d6d3 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx @@ -84,6 +84,8 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent ) /***************************************************************/ + myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Whatis"; + /* Initialisation */ Init(); } diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui index d759fb401..07f94c80d 100644 --- a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui +++ b/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui @@ -89,24 +89,7 @@ 6 - - - Spacer2 - - - Horizontal - - - Expanding - - - - 120 - 0 - - - - + Spacer1 @@ -123,7 +106,7 @@ - + buttonClose @@ -131,6 +114,14 @@ &Close + + + buttonHelp + + + &Help + + diff --git a/src/MeasureGUI/UIFiles/ui_to_cxx b/src/MeasureGUI/UIFiles/ui_to_cxx index 07db6a8f4..04652a849 100755 --- a/src/MeasureGUI/UIFiles/ui_to_cxx +++ b/src/MeasureGUI/UIFiles/ui_to_cxx @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ +# #!/bin/sh #uic -o MeasureGUI_Skeleton_QTD.h MeasureGUI_Skeleton_QTD.ui diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index 0d024e7f3..292dbd64d 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -70,6 +70,8 @@ OperationGUI_ArchimedeDlg::OperationGUI_ArchimedeDlg( GeometryGUI* theGeometryGU Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("archimede.htm"); + /* Initialisations */ Init(); } diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index 79678b359..41849dcd4 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -149,6 +149,8 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg( QWidget* parent ) for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter ) anIter.data()->RangeStepAndValidator( 0.001, 999.999, SpecificStep, 3 ); + setHelpFileName("chamfer.htm"); + /* Initialisations */ Init(); } diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.cxx b/src/OperationGUI/OperationGUI_ClippingDlg.cxx index 191eb88c2..a52f04d3b 100644 --- a/src/OperationGUI/OperationGUI_ClippingDlg.cxx +++ b/src/OperationGUI/OperationGUI_ClippingDlg.cxx @@ -122,6 +122,8 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg( QWidget* parent, const char* // connect( aGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( onDeactivate() ) ) ; //connect( aGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ; + setHelpFileName("none.htm"); + Init(); } diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 583aad057..52182e28d 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -108,6 +108,8 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg( QWidget* parent ) Group2->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); Group3->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); + setHelpFileName("fillet.htm"); + /* Initialisations */ Init(); } diff --git a/src/OperationGUI/OperationGUI_MaterialDlg.cxx b/src/OperationGUI/OperationGUI_MaterialDlg.cxx index b3055d38d..f45286053 100644 --- a/src/OperationGUI/OperationGUI_MaterialDlg.cxx +++ b/src/OperationGUI/OperationGUI_MaterialDlg.cxx @@ -77,6 +77,8 @@ OperationGUI_MaterialDlg::OperationGUI_MaterialDlg (QWidget* parent, const char* Layout1->addWidget(GroupPoints, 1, 0); /***************************************************************/ + + setHelpFileName("none.htm"); Init(); } diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index 9315616f4..fc2281467 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -86,6 +86,8 @@ OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(QWidget* parent, const char Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + + setHelpFileName("partition.htm"); Init(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index ea44ad1bc..93695ad27 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -80,6 +80,8 @@ PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(GeometryGUI* theGeometryGUI, QWidget* p Layout1->addWidget(GroupPoints, 2, 0); Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + + setHelpFileName("box.htm"); Init(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 45db91182..8b2d5ac53 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -83,6 +83,8 @@ PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(GeometryGUI* theGeometryGUI, QWidget* Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + setHelpFileName( "cone.htm" ); + Init(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 19aaff74d..44dda14d4 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -81,6 +81,8 @@ PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(GeometryGUI* theGeometryGUI, Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + setHelpFileName("cylinder.htm"); + Init(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 49bca1dc2..49785f86f 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -77,6 +77,8 @@ PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(GeometryGUI* theGeometryGUI, QWid Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + setHelpFileName("sphere.htm"); + Init(); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 05e6c7b6c..0e41fb4c1 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -80,6 +80,8 @@ PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(GeometryGUI* theGeometryGUI, QWidge Layout1->addWidget(GroupPoints, 2, 0); Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + + setHelpFileName("turus.htm"); Init(); } diff --git a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx index e5bb3a708..8855ba7cb 100644 --- a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx +++ b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx @@ -101,6 +101,8 @@ RepairGUI_CloseContourDlg::RepairGUI_CloseContourDlg(QWidget* parent, const char GroupPoints->getGroupBoxLayout()->addMultiCellWidget(myIsVertexGr, 2, 2, 0, 2); /***************************************************************/ + setHelpFileName("close_contour.htm"); + Init(); } diff --git a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx index 969b7162a..1a0cb04cb 100644 --- a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx @@ -92,6 +92,8 @@ RepairGUI_DivideEdgeDlg::RepairGUI_DivideEdgeDlg (GeometryGUI* theGeometryGUI, Q GroupPoints->getGroupBoxLayout()->addLayout( aLay, 2, 0 ); /***************************************************************/ + setHelpFileName("add_point_on_edge.htm"); + Init(); } diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx index 896c0f0d4..f9a2866a8 100644 --- a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx @@ -34,6 +34,7 @@ #include "SalomeApp_Application.h" #include "LightApp_SelectionMgr.h" +#include "SUIT_MessageBox.h" #include "SUIT_Session.h" #include @@ -84,10 +85,11 @@ RepairGUI_FreeBoundDlg::RepairGUI_FreeBoundDlg( GeometryGUI* theGUI, QWidget* th QFrame* aFrame = new QFrame( this ); aFrame->setFrameStyle( QFrame::Box | QFrame::Sunken ); QPushButton* aCloseBtn = new QPushButton( tr( "GEOM_BUT_CLOSE" ), aFrame ); + QPushButton* aHelpBtn = new QPushButton( tr( "GEOM_BUT_HELP" ), aFrame ); QHBoxLayout* aBtnLay = new QHBoxLayout( aFrame, MARGIN, SPACING ); - aBtnLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); aBtnLay->addWidget( aCloseBtn ); aBtnLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + aBtnLay->addWidget( aHelpBtn ); QVBoxLayout* aLay = new QVBoxLayout( this ); aLay->setSpacing( SPACING ); @@ -95,7 +97,10 @@ RepairGUI_FreeBoundDlg::RepairGUI_FreeBoundDlg( GeometryGUI* theGUI, QWidget* th aLay->addWidget( aMainGrp ); aLay->addWidget( aFrame ); + myHelpFileName = "check_free_boundaries.htm"; + connect( aCloseBtn, SIGNAL( clicked() ), SLOT( onClose() ) ); + connect( aHelpBtn, SIGNAL( clicked() ), SLOT( onHelp() ) ); Init(); } @@ -121,6 +126,22 @@ void RepairGUI_FreeBoundDlg::onClose() erasePreview(); } +//================================================================================= +// function : onHelp() +// purpose : +//================================================================================= +void RepairGUI_FreeBoundDlg::onHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} + //================================================================================= // function : onDeactivate // purpose : Deactivate this dialog diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.h b/src/RepairGUI/RepairGUI_FreeBoundDlg.h index e317cc3a7..b52c4f86a 100644 --- a/src/RepairGUI/RepairGUI_FreeBoundDlg.h +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.h @@ -53,6 +53,7 @@ public: private slots: void onClose(); + void onHelp(); void onDeactivate(); void onActivate(); void onSelectionDone(); @@ -77,6 +78,7 @@ private: GeometryGUI* myGeomGUI; int myNbClosed; int myNbOpen; + QString myHelpFileName; }; #endif // DIALOGBOX_WHATIS_H diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx index 3143b7fec..2bf49ed40 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx @@ -32,6 +32,7 @@ #include "LightApp_SelectionMgr.h" #include "SalomeApp_Tools.h" +#include "SUIT_MessageBox.h" #include "SUIT_Session.h" #include "SUIT_OverrideCursor.h" @@ -97,10 +98,11 @@ RepairGUI_FreeFacesDlg::RepairGUI_FreeFacesDlg(GeometryGUI* GUI, QWidget* parent QFrame* aFrame = new QFrame( this ); aFrame->setFrameStyle( QFrame::Box | QFrame::Sunken ); QPushButton* aCloseBtn = new QPushButton( tr( "GEOM_BUT_CLOSE" ), aFrame ); + QPushButton* aHelpBtn = new QPushButton( tr( "GEOM_BUT_HELP" ), aFrame ); QHBoxLayout* aBtnLay = new QHBoxLayout( aFrame, MARGIN, SPACING ); - aBtnLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); aBtnLay->addWidget( aCloseBtn ); aBtnLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + aBtnLay->addWidget( aHelpBtn ); QVBoxLayout* aLay = new QVBoxLayout( this ); aLay->setSpacing( SPACING ); @@ -109,7 +111,10 @@ RepairGUI_FreeFacesDlg::RepairGUI_FreeFacesDlg(GeometryGUI* GUI, QWidget* parent aLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); aLay->addWidget( aFrame ); + myHelpFileName = "check_free_faces.htm"; + connect( aCloseBtn, SIGNAL( clicked() ), SLOT( onClose() ) ); + connect( aHelpBtn, SIGNAL( clicked() ), SLOT( onHelp() ) ); connect( mySelBtn, SIGNAL( clicked() ), this, SLOT ( onSetEditCurrentArgument() ) ); /***************************************************************/ @@ -140,6 +145,22 @@ void RepairGUI_FreeFacesDlg::onClose() erasePreview(); } +//================================================================================= +// function : onHelp() +// purpose : +//================================================================================= +void RepairGUI_FreeFacesDlg::onHelp() +{ + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").arg(1).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} + //================================================================================= // function : onDeactivate // purpose : Deactivate this dialog diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.h b/src/RepairGUI/RepairGUI_FreeFacesDlg.h index f42589b24..9376cc9a9 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.h +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.h @@ -67,6 +67,7 @@ private : private slots: void onClose(); + void onHelp(); void onDeactivate(); void onActivate(); void onSelectionDone(); @@ -79,6 +80,7 @@ private : QPushButton* mySelBtn; QLineEdit* myEdit; GeometryGUI* myGeomGUI; + QString myHelpFileName; }; diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index 789a0a704..35aa7d6e2 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -92,6 +92,8 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg(QWidget* parent, const char* name, bool mod GroupPoints->getGroupBoxLayout()->addLayout( aLay, 3, 0 ); /***************************************************************/ + setHelpFileName("glue_faces.htm"); + Init(); } diff --git a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx index 6dc3188eb..6ef473a8a 100644 --- a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx @@ -103,6 +103,8 @@ RepairGUI_RemoveHolesDlg::RepairGUI_RemoveHolesDlg(QWidget* parent, const char* GroupPoints->getGroupBoxLayout()->addLayout( aDetectLay, 3, 0 ); /***************************************************************/ + setHelpFileName("suppress_holes.htm"); + Init(); } diff --git a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx index 91822ded9..d053ce9af 100644 --- a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx @@ -94,6 +94,8 @@ RepairGUI_RemoveIntWiresDlg::RepairGUI_RemoveIntWiresDlg(QWidget* parent, const GroupPoints->getGroupBoxLayout()->addLayout( aSelectWiresLay, 2, 0 ); /***************************************************************/ + setHelpFileName("suppress_internal_wires.htm"); + Init(); } diff --git a/src/RepairGUI/RepairGUI_SewingDlg.cxx b/src/RepairGUI/RepairGUI_SewingDlg.cxx index 05ed77509..c7d1fc76f 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.cxx +++ b/src/RepairGUI/RepairGUI_SewingDlg.cxx @@ -87,6 +87,8 @@ RepairGUI_SewingDlg::RepairGUI_SewingDlg(QWidget* parent, const char* name, bool GroupPoints->getGroupBoxLayout()->addLayout( aLay, 3, 0 ); /***************************************************************/ + setHelpFileName("sewing.htm"); + Init(); } diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx index 7c9005a1a..2d063a434 100755 --- a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx @@ -55,6 +55,7 @@ using namespace std; RepairGUI_ShapeProcessDlg::RepairGUI_ShapeProcessDlg(QWidget* parent, const char* name, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { + setHelpFileName("shape_processing.htm"); init(); } diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index 4d996d2a1..3e2c0205e 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -70,6 +70,8 @@ RepairGUI_SuppressFacesDlg::RepairGUI_SuppressFacesDlg(QWidget* parent, const ch Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + + setHelpFileName("suppress_faces.htm"); Init(); } diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 8f09b83f8..bfd31321d 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -77,8 +77,9 @@ TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(QWidget* parent, const GroupPoints->PushButton2->setPixmap(image3); GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); Layout1->addWidget(GroupPoints, 2, 0); - /***************************************************************/ + + setHelpFileName("mirror_image.htm"); Init(); } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 88b262a44..6a49dd150 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -92,6 +92,8 @@ TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg(GeometryG Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + setHelpFileName("multi_rotation.htm"); + Init(); } diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 255df8858..67cd8b213 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -99,6 +99,8 @@ TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg(Geo Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ + setHelpFileName("multi_translation.htm"); + Init(); } diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index 805bc8a72..f28000a1b 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -75,6 +75,8 @@ TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg(QWidget* parent, const Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + + setHelpFileName("offset_surface.htm"); Init(); } diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index e16e3bbd3..1de63e48d 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -85,6 +85,8 @@ TransformationGUI_PositionDlg::TransformationGUI_PositionDlg(QWidget* parent, c Layout1->addWidget(Group1, 2, 0); /***************************************************************/ + + setHelpFileName("modify_the_location.htm"); Init(); } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 7b1abd28b..f373847d6 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -104,6 +104,8 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg(QWidget* parent, c connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + setHelpFileName("rotation.htm"); + Init(); } diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index a215ba028..8a7313bc4 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -107,6 +107,8 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(GeometryGUI* theGeometryG connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + setHelpFileName("scale_transform.htm"); + Init(); } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index d221fb855..2f41d5120 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -82,6 +82,8 @@ TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg(GeometryGUI* Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + setHelpFileName("translation.htm"); + Init(); }