]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Add references into VISU dialogs to the corresponding help page from GUI documentation.
authormkr <mkr@opencascade.com>
Tue, 28 Mar 2006 07:43:56 +0000 (07:43 +0000)
committermkr <mkr@opencascade.com>
Tue, 28 Mar 2006 07:43:56 +0000 (07:43 +0000)
49 files changed:
src/GUITOOLS/VisuGUI_TableDlg.cxx
src/GUITOOLS/VisuGUI_TableDlg.h
src/VISUGUI/VISU_msg_en.po
src/VISUGUI/VisuGUI_BuildProgressDlg.cxx
src/VISUGUI/VisuGUI_BuildProgressDlg.h
src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h
src/VISUGUI/VisuGUI_CursorDlg.cxx
src/VISUGUI/VisuGUI_CursorDlg.h
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.h
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_CutPlanesDlg.h
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeDlg.h
src/VISUGUI/VisuGUI_EditContainerDlg.cxx
src/VISUGUI/VisuGUI_EditContainerDlg.h
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.h
src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx
src/VISUGUI/VisuGUI_IsoSurfacesDlg.h
src/VISUGUI/VisuGUI_NameDlg.cxx
src/VISUGUI/VisuGUI_NameDlg.h
src/VISUGUI/VisuGUI_OffsetDlg.cxx
src/VISUGUI/VisuGUI_OffsetDlg.h
src/VISUGUI/VisuGUI_Plot3DDlg.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.h
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.h
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_Selection.h
src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx
src/VISUGUI/VisuGUI_SetupPlot2dDlg.h
src/VISUGUI/VisuGUI_StreamLinesDlg.cxx
src/VISUGUI/VisuGUI_StreamLinesDlg.h
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISUGUI/VisuGUI_TimeAnimation.h
src/VISUGUI/VisuGUI_TransparencyDlg.cxx
src/VISUGUI/VisuGUI_TransparencyDlg.h
src/VISUGUI/VisuGUI_VectorsDlg.cxx
src/VISUGUI/VisuGUI_VectorsDlg.h
src/VVTK/VVTK_PickingDlg.cxx
src/VVTK/VVTK_PickingDlg.h
src/VVTK/VVTK_RecorderDlg.cxx
src/VVTK/VVTK_RecorderDlg.h
src/VVTK/VVTK_SegmentationCursorDlg.cxx
src/VVTK/VVTK_SegmentationCursorDlg.h

index 24443ef7b6cdb5fa0e6972fd08a10d143b82876c..3ff5726ade29bcee9b206d9e3cc3567c45cf4295 100644 (file)
 
 #include "SUIT_Tools.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+
+#include "LightApp_Application.h"
 
 #include "SALOMEDSClient_Study.hxx"
 #include "SALOMEDSClient_GenericAttribute.hxx"
@@ -130,20 +134,23 @@ VisuGUI_TableDlg::VisuGUI_TableDlg( QWidget* parent,
   btnLayout->setMargin( 0 ); btnLayout->setSpacing( SPACING_SIZE );
   
   myOKBtn = new QPushButton( tr( "BUT_OK" ), this );
+  myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
   if ( edit ) {
     myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this );
     btnLayout->addWidget( myOKBtn );
     btnLayout->addItem( new QSpacerItem( SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
     btnLayout->addWidget( myCancelBtn );
+    btnLayout->addWidget( myHelpBtn );
     connect( myOKBtn,     SIGNAL( clicked() ), this, SLOT( onOK() ) );
     connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
   }
   else {
-    btnLayout->addItem( new QSpacerItem( SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
     btnLayout->addWidget( myOKBtn );
     btnLayout->addItem( new QSpacerItem( SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+    btnLayout->addWidget( myHelpBtn );
     connect( myOKBtn,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   }
+  connect( myHelpBtn,     SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 
   mainLayout->addWidget( top );
   mainLayout->addLayout( btnLayout );
@@ -283,6 +290,23 @@ void VisuGUI_TableDlg::onOK()
     accept();
 }
 
+/*!
+  <Help> button slot, shows corresponding help page
+*/
+void VisuGUI_TableDlg::onHelp()
+{
+  QString aHelpFileName = "/files/displaying_tables.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 /*!
    Populates table with data
 */
index 82481f9e1c832a75065eb93deae6904ff49b7615..5d98a002ec917c63cc67a50887f1db6fcf83f713 100644 (file)
@@ -38,6 +38,7 @@ public:
 
 public slots:
   void onOK();
+  void onHelp(); 
 
 private:
   void initDlg();
@@ -47,6 +48,7 @@ private:
   VisuGUI_TableWidget*   myRealTable;
   QPushButton*           myOKBtn;
   QPushButton*           myCancelBtn;
+  QPushButton*           myHelpBtn;
 
   _PTR(SObject) myObject;
 };
index 3a569991c6eed7ab0836925fb2c085cbbb9b7cad..3bf41a43444148884817ca2f0ae3c273732b3bc0 100644 (file)
@@ -1620,6 +1620,9 @@ msgstr "Start"
 msgid "VisuGUI_BuildProgressDlg::CLOSE"
 msgstr "Close"
 
+msgid "VisuGUI_BuildProgressDlg::HELP"
+msgstr "Help"
+
 msgid "VisuGUI_BuildProgressDlg::ERR_ERROR_IN_THE_FILE"
 msgstr "Error in the file"
 
index 58f5180a9f09fc51ec4699b5069cc913a3547760..fc6b9f18f75923f0acb4d232a090a87f0b28c3ac 100644 (file)
 
 #include "VisuGUI_BuildProgressDlg.h"
 
+#include "VisuGUI.h"
 #include "VisuGUI_Tools.h"
 
 #include "SUIT_FileDlg.h"
+#include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
+#include "LightApp_Application.h"
+
 #include <vtkTimerLog.h>
 
 #include <qcheckbox.h>
@@ -192,8 +196,13 @@ VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
   aCloseButton->setAutoDefault( true );
   CommonGroupLayout->addWidget( aCloseButton, 0, 2 );
 
+  QPushButton* aHelpButton = new QPushButton( tr( "HELP" ), CommonGroup );
+  aHelpButton->setAutoDefault( true );
+  CommonGroupLayout->addWidget( aHelpButton, 0, 3 );
+
   connect( myStartButton, SIGNAL( clicked() ), this, SLOT( onStart() ) );
   connect(  aCloseButton, SIGNAL( clicked() ), this, SLOT( onClose() ) );
+  connect(  aHelpButton,  SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 
   myTimer = new QTimer( this );
   connect( myTimer, SIGNAL( timeout() ), this, SLOT( onTimer() ) );
@@ -250,6 +259,22 @@ void VisuGUI_BuildProgressDlg::onClose()
   done( 0 );
 }
 
+void VisuGUI_BuildProgressDlg::onHelp()
+{
+  QString aHelpFileName = "/files/importing_med_objects.htm"; // ?
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 bool VisuGUI_BuildProgressDlg::onBrowseFile()
 {
   QString aRootDir = QString( getenv( "VISU_ROOT_DIR") );
index aaabf442a8bd6b647aba20c456eda3cf3aa34369..eed85b228c05f2efa6795d6955d47dcef42baa09 100644 (file)
@@ -61,6 +61,7 @@ protected slots:
 
   void             onStart();
   void             onClose();
+  void             onHelp();
 
   bool             onBrowseFile();
   void             onTimer();
index 7efe49051c2e58fa16595c9cb54df17ce6a028fe..c2d918bd346eea0184972ef197725b8a978edbb7 100644 (file)
@@ -30,6 +30,7 @@
 #include "VISU_PipeLine.hxx"
 
 #include "LightApp_SelectionMgr.h"
+#include "LightApp_Application.h"
 
 #include "SVTK_ViewWindow.h"
 
@@ -320,6 +321,10 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
+  buttonHelp = new QPushButton (GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("BUT_HELP"));
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
   buttonCancel = new QPushButton (GroupButtons, "buttonCancel");
   buttonCancel->setText(tr("BUT_CLOSE"));
   buttonCancel->setAutoDefault(TRUE);
@@ -376,6 +381,7 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
   connect(buttonOk    , SIGNAL(clicked()), this, SLOT(ClickOnOk()));
   connect(buttonApply , SIGNAL(clicked()), this, SLOT(ClickOnApply()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+  connect(buttonHelp  , SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
 
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
 
@@ -564,6 +570,24 @@ void VisuGUI_ClippingDlg::ClickOnCancel()
   close();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void VisuGUI_ClippingDlg::ClickOnHelp()
+{
+  QString aHelpFileName = "clipping.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myVisuGUI ? app->moduleName(myVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 //=================================================================================
 // function : onSelectionChanged()
 // purpose  : Called when selection is changed
index 0a2b61b694df8bf974c3d150677168174cbebe0f..7fe980993a119ced3d97a10082dfbc721e0cfa52 100644 (file)
@@ -122,6 +122,7 @@ private:
     QPushButton*      buttonOk;
     QPushButton*      buttonCancel;
     QPushButton*      buttonApply;
+    QPushButton*      buttonHelp;
 
     bool myIsSelectPlane;
 
@@ -146,6 +147,7 @@ public slots:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
 };
 
 #endif // DIALOGBOX_TRANSPARENCYDLG_H
index e1adefcf3240d5e335e56433c56c4da5b229188f..8fb2149704ef600abfacd1a8c591a614c663cf49 100644 (file)
 //  $Header$
 
 using namespace std;
+
+#include "VisuGUI.h"
 #include "VisuGUI_CursorDlg.h"
+
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+
+#include "LightApp_Application.h"
+
 #include <qlayout.h>
 
 /*!
@@ -93,12 +102,17 @@ VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent,  const char* name, bool m
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
+  buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
   TopLayout->addWidget(TopGroupBox,  0, 0);
   TopLayout->addWidget(GroupButtons, 1, 0);
 
   // signals and slots connections
   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 }
 
 /*!
@@ -107,3 +121,23 @@ VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent,  const char* name, bool m
 VisuGUI_CursorDlg::~VisuGUI_CursorDlg()
 {
 }
+
+/*!
+  function : onHelp()
+  purpose  :
+*/
+void VisuGUI_CursorDlg::onHelp()
+{
+  QString aHelpFileName = "/files/changing_visualization_parameters_of_the_presenetation.htm#Width";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index 018709cf97a51d0cf166100a6ee353699a5caba4..f3afd0dab62e41be8949e04a5dd04904425ac893 100644 (file)
@@ -50,6 +50,11 @@ public:
     QGroupBox*   GroupButtons;
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
+    QPushButton* buttonHelp;
+
+private slots:
+    void onHelp();
+
 };
 
 #endif // VISUGUI_CURSORDLG_H
index 545e8c8168e9512dcde831a3e6afd821baf99495..bdfe873e653b6d4a911131d1d902e242e90cb55e 100644 (file)
 
 #include "SVTK_ViewWindow.h"
 
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 #include "SalomeApp_Study.h"
 
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include "OB_Browser.h"
 
@@ -220,6 +223,9 @@ VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_CANCEL"), aBtnBox);
   aBtnLayout->addWidget(aCloseBtn);
 
+  QPushButton* aHelpBtn = new QPushButton(tr("BUT_HELP"), aBtnBox);
+  aBtnLayout->addWidget(aHelpBtn);
+
   aMainLayout->addWidget(aBtnBox);
 
   myCutLines = NULL;
@@ -244,6 +250,7 @@ VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
 
   connect(aOkBtn, SIGNAL(clicked()), this, SLOT(accept()));
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
   //connect(myMgr, SIGNAL(closeAllViews()), this, SLOT(reject()));
   //connect(VisuGUI::application()->desktop(),
   //        SIGNAL(windowActivated(SUIT_ViewWindow*)),
@@ -885,6 +892,22 @@ void VisuGUI_CutLinesDlg::onPlanePos (const QString& theValue)
   }
 }
 
+void VisuGUI_CutLinesDlg::onHelp()
+{
+  QString aHelpFileName = "/files/cut_lines_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 //jfa tmp:void VisuGUI_CutLinesDlg::onWindowActivated (SUIT_ViewWindow* theWnd)
 //jfa tmp:{
 //jfa tmp:  if (theWnd != myStudyWnd)
index f196660e1b36519e59d9e0e4902969a713c99040..8a74804ecfd570d60a4566fa0d45413888b6d287 100644 (file)
@@ -52,6 +52,7 @@ private slots:
   void onAllCurvesInvertedCheck(bool theInvert);
   void onRotation (double theValue);
   void onPlanePos (const QString& theValue);
+  void onHelp();
   //jfa tmp:void onWindowActivated (SUIT_ViewWindow*);
 
 private:
index 486a475d200b47b435f13d0fd01f54d9940c1843..3d6989a542a878753a379eb385254750ff4c9f98 100644 (file)
 
 #include "SVTK_ViewWindow.h"
 
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 
 #include "SUIT_Application.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_ViewWindow.h"
 #include "SUIT_ViewManager.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include <qlayout.h>
 #include <qcheckbox.h>
@@ -500,10 +503,15 @@ VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule)
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
+  QPushButton* buttonHelp = new QPushButton(tr("&Help"), GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
   TopLayout->addWidget(GroupButtons);
 
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
   //connect(myMgr, SIGNAL(closeAllViews()), this, SLOT(reject()));
   //connect(VisuGUI::application()->desktop(),
   //        SIGNAL(windowActivated(SUIT_ViewWindow*)),
@@ -541,6 +549,22 @@ void VisuGUI_CutPlanesDlg::reject() {
   QDialog::reject();
 }
 
+void VisuGUI_CutPlanesDlg::onHelp()
+{
+  QString aHelpFileName = "/files/cut_lines_resentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 //void VisuGUI_CutPlanesDlg::onWindowActivated (SUIT_ViewWindow* theWnd)
 //{
 //  if (theWnd != myStudyWnd)
index e5ccea9ff9236f6552a37ce07eb502ec0b976382..c7b61fced0baabd5b4e310b14b1064997c83ef18 100644 (file)
@@ -115,6 +115,7 @@ protected slots:
     void accept();
     void reject();
     void onWindowActivated (SUIT_ViewWindow*);
+    void onHelp();
 
 private:
     VisuGUI_CutPlanesPane* myCutPane;
index da99973c16718890daaa60e28ef7efa0a7a0bcd9..30dd444346d4ba1ae4609072f6f0ceb473e6e683 100644 (file)
 
 #include "VisuGUI_DeformedShapeDlg.h"
 
+#include "VisuGUI.h"
 #include "VisuGUI_Tools.h"
 
 #include "VISU_DeformedShape_i.hh"
 
 #include "SalomeApp_Module.h"
+#include "LightApp_Application.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include <qlayout.h>
 #include <qtabwidget.h>
@@ -113,6 +118,10 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
+  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
   // Add Tab box and Buttons to the top layout
   TopLayout->addWidget(aTabBox);
   TopLayout->addWidget(GroupButtons);
@@ -120,6 +129,7 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   // signals and slots connections
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
 }
 
 void VisuGUI_DeformedShapeDlg::initFromPrsObject (VISU::DeformedShape_i* thePrs)
@@ -149,3 +159,19 @@ void VisuGUI_DeformedShapeDlg::reject()
   myScalarPane->deletePreview();
   QDialog::reject();
 }
+
+void VisuGUI_DeformedShapeDlg::onHelp()
+{
+  QString aHelpFileName = "/files/deformed_shape_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index 573c439a9fa76f36a41872d4e135913f78256a0d..5a907e9a44426a17ecb1dd6ea01f741ef98aa75e 100644 (file)
@@ -67,6 +67,7 @@ public:
 protected slots:
   void accept();
   void reject();
+  void onHelp();
 
  private:
     QtxDblSpinBox* ScalFact;
index eed32a53721cc81c373f3585e982af23bb5df15d..89203f9a75e0007ce5092cdb998ce79c8cf91b8e 100644 (file)
@@ -18,6 +18,9 @@
 
 #include "SalomeApp_Application.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include <qlayout.h>
 #include <qcheckbox.h>
@@ -280,10 +283,15 @@ VisuGUI_EditContainerDlg::VisuGUI_EditContainerDlg (VisuGUI* theModule, bool the
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
+  QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
   TopLayout->addWidget(GroupButtons);
 
   connect(buttonOk,     SIGNAL(clicked()),      this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()),      this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()),      this, SLOT(onHelp()));
 }
 
 void VisuGUI_EditContainerDlg::initFromPrsObject (VISU::Container_i* theContainer)
@@ -427,3 +435,17 @@ void VisuGUI_EditContainerDlg::onRightSelected()
   }
   myLeftBtn->setEnabled(isSelected);
 }
+
+void VisuGUI_EditContainerDlg::onHelp()
+{
+  QString aHelpFileName = "/files/creating_xy_plot.htm";
+  SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myVisuGUI ? app->moduleName(myVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index 8493d0ffa0b35a2a52a2aeb2e0c8d9fe1b7c0fe2..7aa9034d5c7373434a0f2ef6313b4768652e6dc2 100644 (file)
@@ -48,6 +48,7 @@ class VisuGUI_EditContainerDlg: public QDialog
   void onRightClicked();
   void onLeftSelected();
   void onRightSelected();
+  void onHelp();
 
  private:
   QString getSObjectName (_PTR(SObject) theSObject);
index bfe5bb0d506e1ce71a4837b503e73e2f68327304..dfbe850fed9d75ed41cdc49bbde2f2985c2c5234 100644 (file)
@@ -39,7 +39,7 @@
 #include "VVTK_PrimitiveBox.h"
 #include "VVTK_SizeBox.h"
 
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 #include "SalomeApp_Module.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
@@ -594,12 +594,17 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
+
   TopLayout->addWidget( PrsGroup );
   TopLayout->addWidget( aTabBox );
   TopLayout->addWidget( GroupButtons );
 
   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 }
 
 void VisuGUI_GaussPointsDlg::initFromPrsObject( VISU::GaussPoints_i* thePrs )
@@ -731,3 +736,17 @@ void VisuGUI_GaussPointsDlg::accept()
   //if( myScalarPane->check() )
   QDialog::accept();
 }
+
+void VisuGUI_GaussPointsDlg::onHelp()
+{
+  QString aHelpFileName = "types_of_gauss_points_presentations.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index c845d013c0ac9d6a66deb6c915fe3484f0935db2..64bcc7fa71b4b6226711d6acc44c4b7a1426256e 100644 (file)
@@ -141,6 +141,7 @@ public:
 
 protected slots:
   void    onToggleDefShape( bool );
+  void    onHelp();
 
   void    accept();
 
index 34d170b91a3ed5ac73e19d431a23fc2e11158397..e80ff19478971f1707523a12ee902317725d98b9 100644 (file)
 #include "VisuGUI.h"
 #include "VisuGUI_Tools.h"
 
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include <limits.h>
 
@@ -201,12 +203,16 @@ VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (SalomeApp_Module* theModule)
   QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
   TopLayout->addWidget(GroupButtons);
 
   // signals and slots connections
   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 }
 
 void VisuGUI_IsoSurfacesDlg::accept()
@@ -223,3 +229,19 @@ void VisuGUI_IsoSurfacesDlg::reject()
   myScalarPane->deletePreview();
   QDialog::reject();
 }
+
+void VisuGUI_IsoSurfacesDlg::onHelp()
+{
+  QString aHelpFileName = "/files/iso_surfaces_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index dc0547f1d6a78e24e856b22e7a2ddd18b66aa20d..dbe12991f2baa3113dc0650001bd0f529e3872ae 100644 (file)
@@ -86,6 +86,7 @@ class VisuGUI_IsoSurfacesDlg : public QDialog
  protected slots:
   void accept();
   void reject();
+  void onHelp();
 
  private:
   VisuGUI_IsoSurfPane*   myIsoPane;
index c847861fbb1076e9e11a246eb9d7437b7f38c325..deecabdcfb66a3509c8b58dd3db581523e7ce90a 100644 (file)
 //  $Header$
 
 #include "VisuGUI_NameDlg.h"
+#include "VisuGUI.h"
 
 #include <SUIT_Session.h>
 #include <SUIT_Application.h>
 #include <SUIT_Desktop.h>
 #include <SUIT_Tools.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+
+#include <LightApp_Application.h>
 
 #include <qgroupbox.h>
 #include <qlabel.h>
@@ -73,6 +78,11 @@ VisuGUI_NameDlg::VisuGUI_NameDlg( QWidget* parent )
   myButtonCancel->setText( tr( "BUT_CANCEL"  ) );
   myButtonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( myButtonCancel );
+
+  myButtonHelp = new QPushButton( GroupButtons, "buttonHelp" );
+  myButtonHelp->setText( tr( "BUT_HELP"  ) );
+  myButtonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( myButtonHelp );
   /***************************************************************/
   
   topLayout->addWidget( GroupC1 );
@@ -81,6 +91,7 @@ VisuGUI_NameDlg::VisuGUI_NameDlg( QWidget* parent )
   // signals and slots connections
   connect( myButtonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( myButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( myButtonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
   
   /* Move widget on the botton right corner of main widget */
   SUIT_Tools::centerWidget( this, parent );
@@ -118,6 +129,22 @@ void VisuGUI_NameDlg::accept()
   QDialog::accept();
 }
 
+void VisuGUI_NameDlg::onHelp()
+{
+  QString aHelpFileName = "/files/renaming_presentations.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 /*!
   Creates modal <Rename> dialog and returns name entered [ static ]
 */
index 56a9819b0675716491eba2c66726a03655ad63b3..b12231db4424bfb7ed954211371dc53121557c32 100644 (file)
@@ -36,10 +36,12 @@ public:
     
 protected slots:
   void accept();
+  void onHelp(); 
   
 private:
   QPushButton*    myButtonOk;
   QPushButton*    myButtonCancel;
+  QPushButton*    myButtonHelp;
   QLineEdit*      myLineEdit;
 };
 
index 3fca41a1d23db6973f7ec8d02551a5601f94ac12..ed732b9cf80ee56322e925fdc1838ff5899204d0 100644 (file)
 #include "VISU_ViewManager_i.hh"
 #include "VISU_Actor.h"
 
+#include "LightApp_Application.h"
 #include "SalomeApp_Application.h"
 #include "SVTK_ViewWindow.h"
 #include "SVTK_ViewModel.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include "QtxDblSpinBox.h"
 
@@ -115,12 +119,18 @@ myModule(theModule)
   QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 4);
+  GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 5);  
+
+  QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 6);
 
   TopLayout->addWidget(GroupButtons);
 
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonApply,  SIGNAL(clicked()), this, SLOT(onApply()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
 }
 
 void VisuGUI_OffsetDlg::addPresentation (VISU::Prs3d_i* thePrs)
@@ -227,3 +237,17 @@ void VisuGUI_OffsetDlg::onApply()
     updateOffset(myPrsList.at(i), aOffset);
   }
 }
+
+void VisuGUI_OffsetDlg::onHelp()
+{
+  QString aHelpFileName = "/files/scaling_presentations.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myModule ? app->moduleName(myModule->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index b06092f9578db3cef7fed3a06fd09631c7666f7f..98a0bdb09f2bc58b05af3c9a527fb7455cda135a 100644 (file)
@@ -56,6 +56,7 @@ class VisuGUI_OffsetDlg: public QDialog
   virtual void accept();
   virtual void reject();
   void onApply();
+  void onHelp();
 
  private:
   void updateOffset (VISU::Prs3d_i* thePrs, float* theOffset);
index 04ba4334ef924c468b13079771bde7d30f1a6ca5..ed955d7f298fb00d7e2f336d9612afa56e9ee543 100644 (file)
 
 #include "SALOME_Actor.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+#include "LightApp_Application.h"
 
 #include <qlayout.h>
 #include <qvalidator.h>
@@ -539,12 +543,16 @@ VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule)
   QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
+  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
   TopLayout->addWidget(GroupButtons);
 
   // signals and slots connections
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
 }
 
 //=======================================================================
@@ -571,3 +579,23 @@ void VisuGUI_Plot3DDlg::reject()
   
   QDialog::reject();
 }
+
+//=======================================================================
+//function : onHelp
+//purpose  :
+//=======================================================================
+void VisuGUI_Plot3DDlg::onHelp()
+{
+  QString aHelpFileName = "plot_3d_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index a1e59f90c2fb1f1229fb33097c688871c910b35b..325441f5bef61e32e54858af60c596aa61f927b1 100644 (file)
@@ -110,6 +110,7 @@ class VisuGUI_Plot3DDlg : public QDialog
  protected slots:
   void accept();
   void reject();
+  void onHelp();
 
  private:
   VisuGUI_Plot3DPane*    myIsoPane;
index c3f9bcf7afc9bbd71e7a6c300b4815140ff691d8..bf91604a397451e9e674f5eabd400dcad6e32eba 100644 (file)
@@ -42,8 +42,9 @@
 #include "VISU_ScalarMap_i.hh"
 #include "VISU_ScalarMapAct.h"
 
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 
+#include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
@@ -1095,10 +1096,15 @@ VisuGUI_ScalarBarDlg::VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool Se
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
+
   TopLayout->addWidget( GroupButtons );
 
   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 }
 
 /*!
@@ -1122,6 +1128,25 @@ void VisuGUI_ScalarBarDlg::reject()
   QDialog::reject();
 }
 
+/*!
+  Called when <Help> button is clicked, shows the corresponding help page in defined browser
+*/
+void VisuGUI_ScalarBarDlg::onHelp()
+{
+  QString aHelpFileName = "/files/scalar_map_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 
 //#######################################################################################
 VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
@@ -1178,10 +1203,31 @@ VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
+
   TopLayout->addWidget( GroupButtons );
 
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
+}
+
+void VisuGUI_TextPrefDlg::onHelp()
+{
+  QString aHelpFileName = "/files/scalar_map_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
 }
 
 void VisuGUI_TextPrefDlg::storeBeginValues()
index 02ac4462f5b8f0356110b8b50d4ec6c0c5e3a41c..7a6adbf6334c8c3013a78ad1b8fc22196365c134 100644 (file)
@@ -86,6 +86,7 @@ class VisuGUI_TextPrefDlg: public QDialog
  protected slots:
   void accept();
   void reject();
+  void onHelp();
 
  private:
   QLineEdit* myTitleEdt;
@@ -203,6 +204,7 @@ class VisuGUI_ScalarBarDlg : public QDialog
  protected slots:
   void accept();
   void reject();
+  void onHelp();
 
  protected:
   VisuGUI_ScalarBarPane* myScalarPane;
index 3aac42a0318429ea2dc0a06d109d7a99afd8c5f0..d23580337d703a0034db43ee723608eeb7bd79c9 100644 (file)
 #include "VISU_Convertor.hxx"
 
 #include "SalomeApp_Module.h"
+#include "LightApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SALOME_ListIO.hxx"
 
@@ -139,6 +143,10 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
+  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
+
   // Add Tab box and Buttons to the top layout
   TopLayout->addWidget(aTabBox);
   TopLayout->addWidget(GroupButtons);
@@ -146,6 +154,7 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
   // signals and slots connections
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(accept()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(onHelp()));
   connect(myFieldsCombo,     SIGNAL(activated(int)), this, SLOT(onFieldChanged(int)));
   connect(myTimeStampsCombo, SIGNAL(activated(int)), this, SLOT(onTimeStampChanged(int)));
 }
@@ -379,6 +388,20 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::reject()
   QDialog::reject();
 }
 
+void VisuGUI_ScalarMapOnDeformedShapeDlg::onHelp()
+{
+  QString aHelpFileName = "scalar_map_on_deformed_shape_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myVisuGUI ? app->moduleName(myVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 void VisuGUI_ScalarMapOnDeformedShapeDlg::AddAllFieldNames(){
   TMF::const_iterator aIterMesh = myMeshFieldsTimes.begin();
   for(;aIterMesh != myMeshFieldsTimes.end();aIterMesh++){
index 6bc817c6b4b128c3d9bdd33ae3f759dafd3fe386..720a470e785645ba4fdd5fd53ba074a966fbfbac 100644 (file)
@@ -74,6 +74,7 @@ public:
 protected slots:
   void accept();
   void reject();
+  void onHelp();
 
 private slots:
   void onFieldChanged(int i=0);
index 371d50a50bf7f028d303132b8cf7b5e644beb78e..7e5e658e8474796dd0722af8480ef8d07025b65f 100644 (file)
 
 #include "SalomeApp_Study.h"
 #include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 #include "LightApp_VTKSelector.h"
 
 #include "SUIT_MessageBox.h"
 #include "SUIT_ViewWindow.h"
 #include "SUIT_Session.h"
+#include "SUIT_ResourceMgr.h"
 
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
@@ -250,6 +252,9 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
   QPushButton* aCloseBtn = new QPushButton (tr("BUT_CLOSE"), aBtnBox);
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(close()));
 
+  QPushButton* aHelpBtn = new QPushButton (tr("BUT_HELP"), aBtnBox);
+  connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
+
   TopLayout->addWidget(aBtnBox, 3, 0);
 
   SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
@@ -617,3 +622,17 @@ void VisuGUI_SelectionDlg::onCellIdEdit (const QString& theText)
   else
     clearFields();
 }
+
+void VisuGUI_SelectionDlg::onHelp()
+{
+  QString aHelpFileName = "/files/getting_elements_attributes.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myModule ? app->moduleName(myModule->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index 467e9c182d810b2d6e45589fd95ced5cfa034824..0e1f873d85b0d925c8b577b63bd36788d8e556d6 100644 (file)
@@ -55,6 +55,7 @@ private slots:
   void onSelectionEvent ();
   void onPointIdEdit (const QString& theText);
   void onCellIdEdit (const QString& theText);
+  void onHelp();
 
  private:
   void clearFields ();
index 120785fa09892ef8966a928289aab865ab64a675..1d85acf0992ff103049fdb0c79622e9532cd6c83 100644 (file)
@@ -8,10 +8,15 @@
 //  $Header$
 
 #include "VisuGUI_SetupPlot2dDlg.h"
+#include "VisuGUI.h"
 #include "SPlot2d_Curve.h"
 
 #include "SUIT_Tools.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+
+#include "LightApp_Application.h"
 
 #include <SALOMEDSClient_AttributeTableOfInteger.hxx>
 #include <SALOMEDSClient_AttributeTableOfReal.hxx>
@@ -183,20 +188,24 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
   
   myView->setMinimumWidth( frame->sizeHint().width() + MARGIN_SIZE * 2 );
 
-  /* OK/Cancel buttons */
+  /* OK/Cancel/Help buttons */
   myOkBtn = new QPushButton( tr( "BUT_OK" ), this, "buttonOk" );
   myOkBtn->setAutoDefault( TRUE );
   myOkBtn->setDefault( TRUE );
   myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this, "buttonCancel" );
   myCancelBtn->setAutoDefault( TRUE );
+  myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this, "buttonHelp" );
+  myHelpBtn->setAutoDefault( TRUE );
 
-  topLayout->addMultiCellWidget( myView, 0, 0, 0, 2 );
+  topLayout->addMultiCellWidget( myView, 0, 0, 0, 3 );
   topLayout->addWidget( myOkBtn, 1, 0 );
   topLayout->setColStretch( 1, 5 );
   topLayout->addWidget( myCancelBtn, 1, 2 );
+  topLayout->addWidget( myHelpBtn, 1, 3 );
 
   connect( myOkBtn,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( myHelpBtn,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 
   enableControls();
 
@@ -426,6 +435,24 @@ void VisuGUI_SetupPlot2dDlg::onVBtnToggled( bool on )
   }
   enableControls();
 }
+/*!
+  Slot, called when <Help> button is clicked
+*/
+void VisuGUI_SetupPlot2dDlg::onHelp()
+{
+  QString aHelpFileName = "/files/creating_curves.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
 /*!
   Enables/disables buttons 
 */
index 1ce1e2aaa449d499b1ae75b50f01c3de0ad53811..616fc1adcd851543d39f16483f6da4cb3620296c 100644 (file)
@@ -46,12 +46,14 @@ public:
 private slots:
   void onHBtnToggled( bool );
   void onVBtnToggled( bool );
+  void onHelp();
   void enableControls();
 
 private:
   QScrollView*                myView;
   QPushButton*                myOkBtn;
   QPushButton*                myCancelBtn;
+  QPushButton*                myHelpBtn;
   QPtrList<VisuGUI_ItemContainer> myItems;
 
   _PTR(SObject)               myObject;
index e6fa3cc2990d31d80e38b22352cb6d40a2045515..6d4196ba623f1c9e3dbf37a65c4ccf3341a78608 100644 (file)
 #include "VISU_Actor.h"
 
 #include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
 #include "SVTK_ViewWindow.h"
 
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_MessageBox.h"
 
@@ -277,8 +279,14 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
   QPushButton* aCancelBtn = new QPushButton( tr( "&Cancel" ) , aGroupButtons, "buttonCancel" );
   aCancelBtn->setAutoDefault( TRUE );
   aGroupButtonsLayout->addWidget( aCancelBtn, 0, 2 );
+
+  QPushButton* aHelpBtn = new QPushButton( tr( "&Help" ) , aGroupButtons, "buttonHelp" );
+  aHelpBtn->setAutoDefault( TRUE );
+  aGroupButtonsLayout->addWidget( aHelpBtn, 0, 3 );
+
   connect( aOkBtn,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( aHelpBtn,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 
   aBoxLayout->addWidget(aGroupButtons);
 
@@ -593,3 +601,17 @@ void VisuGUI_StreamLinesDlg::reject()
   myScalarPane->deletePreview();
   QDialog::reject();
 }
+
+void VisuGUI_StreamLinesDlg::onHelp()
+{
+  QString aHelpFileName = "/files/stream_lines_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myVisuGUI ? app->moduleName(myVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index c5f45e205a729106fb4a33133786fe13a86552ff..1c5a336f4cc77c694225dd3ae19f57735f132a91 100644 (file)
@@ -40,6 +40,7 @@ public:
 protected slots:
   void accept();
   void reject();
+  void onHelp();
 
 private slots:
   void onSelectionActive(bool theActive);
index 92a3b4ab17f259bdef81745cccb795ad1ed671e8..e22eca4216f49e640e611cc89869931d909686fc 100644 (file)
 #include "VISU_Actor.h"
 
 #include "SalomeApp_Study.h"
-#include "SalomeApp_Application.h"
+#include "LightApp_Application.h"
 
 #include "SVTK_ViewWindow.h"
 
 #include "SUIT_OverrideCursor.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_FileDlg.h"
 
@@ -1151,6 +1153,9 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_CLOSE"), aBtnBox);
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(close()));
 
+  QPushButton* aHelpBtn = new QPushButton(tr("BUT_HELP"), aBtnBox);
+  connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
+
   SUIT_Study* aStudy = VISU::GetAppStudy(myModule);
   connect(aStudy, SIGNAL(destroyed()), this, SLOT(close()));
 
@@ -1367,6 +1372,21 @@ void VisuGUI_TimeAnimationDlg::onStop()
   }
 }
 
+//------------------------------------------------------------------------
+void VisuGUI_TimeAnimationDlg::onHelp()
+{
+  QString aHelpFileName = "/files/animating_presentations.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(myModule ? app->moduleName(myModule->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::saveToStudy()
 {
index 4d2cea5f0d736b2b4237f4de46a8da8e4cce028e..3c58b2b354e8b207447e9c8b4d2c5640a5e4f764 100644 (file)
@@ -156,6 +156,7 @@ class VisuGUI_TimeAnimationDlg: public QDialog
    void onExecution(long theNewFrame, double theTime);
    void onBrowse();
    void onStop();
+   void onHelp();
    void saveToStudy();
    void publishToStudy();
 
index b9556c4c2a05a52da0cfd3d716c537b6f7019036..9c093759035a18c989f1c378554fbd712e343170 100644 (file)
@@ -35,6 +35,9 @@
 
 #include "SUIT_Desktop.h"
 #include "SUIT_OverrideCursor.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
 
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
@@ -42,6 +45,7 @@
 
 #include "LightApp_Study.h"
 #include "LightApp_SelectionMgr.h"
+#include "LightApp_Application.h"
 
 #include "SVTK_ViewWindow.h"
 
@@ -128,9 +132,14 @@ VisuGUI_TransparencyDlg::VisuGUI_TransparencyDlg( VisuGUI* theModule,
   buttonOk->setText(tr("BUT_CLOSE"));
   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);
+
+  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("BUT_HELP"));
+  buttonHelp->setAutoDefault(TRUE);
+
+  GroupButtonsLayout->addWidget(buttonOk, 0, 0);
+  GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 2);
 
   VisuGUI_TransparencyDlgLayout->addWidget(GroupC1,      0, 0);
   VisuGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
@@ -140,6 +149,7 @@ VisuGUI_TransparencyDlg::VisuGUI_TransparencyDlg( VisuGUI* theModule,
 
   // signals and slots connections : after ValueHasChanged()
   connect(buttonOk, SIGNAL(clicked()),         this, SLOT(ClickOnOk()));
+  connect(buttonHelp, SIGNAL(clicked()),       this, SLOT(ClickOnHelp()));
   connect(Slider1,  SIGNAL(valueChanged(int)), this, SLOT(SetTransparency()));
   connect(Slider1,  SIGNAL(sliderMoved(int)),  this, SLOT(ValueHasChanged()));
   connect(mySelectionMgr,  SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
@@ -163,6 +173,26 @@ void VisuGUI_TransparencyDlg::ClickOnOk()
   close();
 }
 
+//=======================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=======================================================================
+void VisuGUI_TransparencyDlg::ClickOnHelp()
+{
+  QString aHelpFileName = "/files/changing_visualization_parameters_of_the_presenetation.htm#Changing3";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 //=================================================================================
 // function : SetTransparency()
 // purpose  : Called when value of slider change
index 6dbc9437e2068fa404b8838a19d396d9411fe6ff..7787d70b81fe5bfa1c48390da54ae9f4042be796 100644 (file)
@@ -61,6 +61,7 @@ private :
   SVTK_ViewWindow*        myViewWindow;
 
   QPushButton*            buttonOk;
+  QPushButton*            buttonHelp;
   QLabel*                 TextLabelOpaque;
   QLabel*                 ValueLab;
   QLabel*                 TextLabelTransparent;
@@ -68,6 +69,7 @@ private :
 
 public slots:
   void ClickOnOk();
+  void ClickOnHelp(); 
   void ValueHasChanged();
   void SetTransparency();
   void onSelectionChanged();
index a5e2f2c590ea8845052d11f462a26f65b4c0c067..e16e94bc2aa9dff6477fb6a3cca0b557db986750 100644 (file)
 #include "VisuGUI_Tools.h"
 
 #include "VISU_Vectors_i.hh"
-
+#include "LightApp_Application.h"
 #include "SalomeApp_Module.h"
+
 #include "SUIT_Desktop.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
 
 #include <qlayout.h>
 #include <qcolordialog.h>
@@ -162,6 +166,9 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
+  buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
   // top layout
   aTabBox->addTab(aBox, "Vectors");
@@ -178,6 +185,7 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   connect( UseMagn,      SIGNAL( clicked() ), this, SLOT( enableSetColor() ) );
   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+  connect( buttonHelp,   SIGNAL( clicked() ), this, SLOT( onHelp() ) );
   
   // default values
   UseMagn->setChecked( TRUE );
@@ -420,3 +428,19 @@ void VisuGUI_VectorsDlg::reject()
   myScalarPane->deletePreview();
   QDialog::reject();
 }
+
+void VisuGUI_VectorsDlg::onHelp()
+{
+  QString aHelpFileName = "/files/vectors_presentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
index 2abdf591ce65c109d998ba92b315a03f710298bc..5d6d9f3b2a850406d15d343de97a265b56d42d96 100644 (file)
@@ -82,6 +82,7 @@ public:
 protected slots:
   void accept();
   void reject();
+  void onHelp();
 
 private:
     QGroupBox*      TopGroup;
@@ -104,6 +105,7 @@ private:
     QGroupBox*      GroupButtons;
     QPushButton*    buttonOk;
     QPushButton*    buttonCancel;
+    QPushButton*    buttonHelp;
 
     QColor          myColor;
     VisuGUI_ScalarBarPane* myScalarPane;
index 06e1dabbdeeff91e1c4dcfc174b89ba65c5f015b..ba84802508a95def37779c879067577ce3b3440e 100644 (file)
@@ -13,6 +13,7 @@
 #include "VISU_GaussPtsAct.h"
 #include "VISU_GaussPtsSettings.h"
 
+#include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
@@ -40,6 +41,8 @@
 #include "QtxDblSpinBox.h"
 #include "QtxIntSpinBox.h"
 
+#include "LightApp_Application.h"
+
 using namespace std;
 
 VVTK_PickingDlg::VVTK_PickingDlg( QWidget* parent, const char* name )
@@ -206,11 +209,16 @@ VVTK_PickingDlg::VVTK_PickingDlg( QWidget* parent, const char* name )
   buttonClose->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonClose, 0, 2 );
 
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
+
   TopLayout->addWidget( aBox );
   TopLayout->addWidget( GroupButtons );
 
   connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onClickApply() ) );
   connect( buttonClose, SIGNAL( clicked() ), this, SLOT( onClickClose() ) );
+  connect( buttonHelp,  SIGNAL( clicked() ), this, SLOT( onClickHelp() ) );
 }
 
 VVTK_PickingDlg::~VVTK_PickingDlg()
@@ -364,6 +372,20 @@ void VVTK_PickingDlg::onClickClose()
   reject();
 }
 
+void VVTK_PickingDlg::onClickHelp()
+{
+  QString aHelpFileName = "picking.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 void VVTK_PickingDlg::done( int r )
 {
   myAction->setOn( false );
index 72d3a4ecb42fa54f6298736f15216375a414fcb7..a2099bb4df86de1ec302c8e13959ee4aacd6ed56 100644 (file)
@@ -66,6 +66,7 @@ protected slots:
 
   void             onClickApply();
   void             onClickClose();
+  void             onClickHelp();
 
   void             onColorButtonPressed();
 
index b188c99e001d1c752c5ea879907b4522730fef5e..986240382f7fda2bda2c7788121e68da80d9a4e2 100644 (file)
 #include "VVTK_Recorder.h"
 
 #include "SUIT_FileDlg.h"
+#include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
 #include "QtxDblSpinBox.h"
 #include "QtxIntSpinBox.h"
 
+#include "LightApp_Application.h"
+
 #include <qcheckbox.h>
 #include <qcombobox.h>
 #include <qgroupbox.h>
@@ -127,8 +130,13 @@ VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecord
   aCloseButton->setAutoDefault( true );
   CommonGroupLayout->addWidget( aCloseButton, 0, 2 );
 
+  QPushButton* aHelpButton = new QPushButton( tr( "HELP" ), CommonGroup );
+  aHelpButton->setAutoDefault( true );
+  CommonGroupLayout->addWidget( aHelpButton, 0, 3 );
+
   connect( aStartButton, SIGNAL( clicked() ), this, SLOT( onStart() ) );
   connect( aCloseButton, SIGNAL( clicked() ), this, SLOT( onClose() ) );
+  connect( aHelpButton,  SIGNAL( clicked() ), this, SLOT( onHelp() ) );
 }
 
 VVTK_RecorderDlg::~VVTK_RecorderDlg()
@@ -162,6 +170,20 @@ void VVTK_RecorderDlg::onClose()
   reject();
 }
 
+void VVTK_RecorderDlg::onHelp()
+{
+  QString aHelpFileName = "animation_in_gauss_viewer.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 bool VVTK_RecorderDlg::onBrowseFile()
 {
   QString aRootDir = QString( getenv( "VISU_ROOT_DIR") );
index f46ef1b1b63dd9c8827a09e89ba3b94857530105..ee31cf1d0f2784e3bda00a6e95a17e5527265fea 100644 (file)
@@ -61,6 +61,7 @@ public:
 protected slots:
   void             onStart();
   void             onClose();
+  void             onHelp();
 
   bool             onBrowseFile();
 
index c58035435679e38da20418db2c90cd98a3b39e7c..6b49cc5c2922005c453edb9e160a8260133def6f 100644 (file)
@@ -22,6 +22,7 @@
 #include "VISU_GaussPointsPL.hxx"
 #include "VISU_OpenGLPointSpriteMapper.hxx"
 
+#include "LightApp_Application.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
@@ -381,11 +382,16 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   buttonClose->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonClose, 0, 2 );
 
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp->setAutoDefault( TRUE );
+  GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
+
   TopLayout->addWidget( myTabBox );
   TopLayout->addWidget( GroupButtons );
 
   connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onClickApply() ) );
   connect( buttonClose, SIGNAL( clicked() ), this, SLOT( onClickClose() ) );
+  connect( buttonHelp,  SIGNAL( clicked() ), this, SLOT( onClickHelp() ) );
 }
 
 VVTK_SegmentationCursorDlg::~VVTK_SegmentationCursorDlg()
@@ -803,6 +809,20 @@ void VVTK_SegmentationCursorDlg::onClickClose()
   reject();
 }
 
+void VVTK_SegmentationCursorDlg::onClickHelp()
+{
+  QString aHelpFileName = "segmentation.htm";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app)
+    app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
+  else {
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          QObject::tr("BUT_OK"));
+  }
+}
+
 void VVTK_SegmentationCursorDlg::done( int r )
 {
   myPlaneAction->setOn( false );
index edac2165018ef44762f43f1d4f0945fc604f3355..3ca4a19538ce6a2f6fec921be75968dad1724ad3 100644 (file)
@@ -116,6 +116,7 @@ protected slots:
 
   void             onClickApply();
   void             onClickClose();
+  void             onClickHelp();
 
 signals:
   void             scgClose();