From: vsr Date: Wed, 20 Jan 2021 14:35:07 +0000 (+0300) Subject: Merge branch 'nct/helpmenu' X-Git-Tag: V9_7_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fmed.git;a=commitdiff_plain;h=da31963dbaf5e0c4d1360861acb5678fef137af3;hp=f47c24964db12066d6bf78edda8b1aca5e2ab038 Merge branch 'nct/helpmenu' --- diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 95248370a..a55298932 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -6,6 +6,7 @@ +
@@ -19,9 +20,9 @@
- +
- +
diff --git a/src/MEDCalc/MEDCalcConstants.hxx b/src/MEDCalc/MEDCalcConstants.hxx index 8d49d10c4..11b8f22a2 100644 --- a/src/MEDCalc/MEDCalcConstants.hxx +++ b/src/MEDCalc/MEDCalcConstants.hxx @@ -34,4 +34,19 @@ const int NB_TYPE_OF_FIELDS = 4; const char* const mapTypeOfFieldLabel[NB_TYPE_OF_FIELDS] = {"ON_CELLS", "ON_NODES", "ON_GAUSS_PT", "ON_GAUSS_NE" }; +// IDs we use for actions we want to export in help info panel +namespace FIELDSOp { + enum { + OpAddDataSource = 2041, // Menu Add Data Source + // Simplified Visu ---------------------------------------------------------- + OpScalarMap = 2501, // Menu Scalar Map + OpContour = 2502, // Menu Contour + OpVectorFields = 2503, // Menu Vector fields + OpSlices = 2504, // Menu Slices + OpDeflectionShape = 2505, // Menu Deflection + OpPointSprite = 2506, // Menu PointSprite + // Interpolation + OpProcessingInterpolation = 2601, // Menu Processing interpolation + }; +} #endif diff --git a/src/MEDCalc/gui/DatasourceController.cxx b/src/MEDCalc/gui/DatasourceController.cxx index f0f18b997..ba719057e 100644 --- a/src/MEDCalc/gui/DatasourceController.cxx +++ b/src/MEDCalc/gui/DatasourceController.cxx @@ -75,7 +75,8 @@ void DatasourceController::createActions() { QString tooltip = tr("TIP_ADD_DATA_SOURCE"); QString icon = tr("ICO_DATASOURCE_ADD"); int actionId; - actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddDatasource()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(OnAddDatasource()), + icon, tooltip, FIELDSOp::OpAddDataSource); _salomeModule->createTool(actionId, toolbarId); // This action has to be placed in the general file menu with the label "Import MED file" diff --git a/src/MEDCalc/gui/FIELDS_msg_en.ts b/src/MEDCalc/gui/FIELDS_msg_en.ts index 69f0b813b..9977871d0 100644 --- a/src/MEDCalc/gui/FIELDS_msg_en.ts +++ b/src/MEDCalc/gui/FIELDS_msg_en.ts @@ -465,6 +465,66 @@ MEDModule + + HELP_WELCOME_FIELDS + Welcome to FIELDS! + + + HELP_GRP_PRESENTATION + Module Presentation + + + HELP_LABEL_PRES1 + This module provides a <b>simplified interface</b> to visualise and manipulate fields. + + + HELP_LABEL_PRES2 + It is based upon PARAVIS and MEDCoupling modules. + + + HELP_LABEL_PRES3 + After applying a simplified visualisation, it is possible to switch in PARAVIS module, and complete the presentation. + + + HELP_GRP_VISUALISATION + Simplified Visualisation + + + HELP_LABEL_VISU1 + 1) <b>Import mesh and fields</b> from a MED file (use the add data source button or the menu File/Add Data Source) + + + HELP_LABEL_VISU2 + 2) Select a field in the object browser (left window) + + + HELP_LABEL_VISU3 + 3) Select a <b>view mode</b> among these options:" + + + HELP_LABEL_VISU4 + 4) Choose a simplified representation (buttons in the tool bar, or in the presentations menu). The following simplified visualisations are available:" + + + HELP_GRP_INTERPOLATION + Fields Interpolation + + + HELP_LABEL_INTERP1 + FIELDS module also provides a graphical interface above MEDCouplingRemapper class. + + + HELP_LABEL_INTERP2 + 1) Select a <b>source field</b> in the object browser + + + HELP_LABEL_INTERP3 + 2) Click on "interpolate field" button (in the toolbar or in the processing menu: + + + HELP_LABEL_INTERP4 + 3) Within the interface, select the <b>target mesh</b>, and specify the interpolation parameters. + diff --git a/src/MEDCalc/gui/FIELDS_msg_fr.ts b/src/MEDCalc/gui/FIELDS_msg_fr.ts index 8b92efa4b..7a9d00b96 100644 --- a/src/MEDCalc/gui/FIELDS_msg_fr.ts +++ b/src/MEDCalc/gui/FIELDS_msg_fr.ts @@ -465,6 +465,66 @@ MEDModule + + HELP_WELCOME_FIELDS + Bienvenue dans FIELDS! + + + HELP_GRP_PRESENTATION + Présentation du module + + + HELP_LABEL_PRES1 + Ce module fournit une <b>interface simplifiée</b> pour visualiser et manipuler des champs. + + + HELP_LABEL_PRES2 + Il s'appuie sur les modules PARAVIS et MEDCoupling. + + + HELP_LABEL_PRES3 + Il est possible après une visualisation simplifiée de basculer dans le module PARAVIS pour compléter la présentation. + + + HELP_GRP_VISUALISATION + Visualisation simplifiée + + + HELP_LABEL_VISU1 + 1) <b>Importer un maillage et des champs</b> à partir d'un fichier MED (utiliser le bouton "importer des données MED" présent dans la barre d'outil et dans le menu Fichier) + + + HELP_LABEL_VISU2 + 2) Sélectionner un champ dans l'arbre des données (fenêtre de droite) + + + HELP_LABEL_VISU3 + 3) Sélectionner le a <b>mode de vue</b> parmi les options suivantes:" + + + HELP_LABEL_VISU4 + 4) Choisir une représentation simplifiée (boutons dans la barre d'outil et dans le menu présentations). Les visus simplifiées suivantes sont disponibles:" + + + HELP_GRP_INTERPOLATION + Interpolation de champs + + + HELP_LABEL_INTERP1 + Le module FIELDS fournit aussi une interface graphique à la classe MEDCouplingRemapper. + + + HELP_LABEL_INTERP2 + 1) Sélectionner un <b>champ source</b> dans l'arbre des données + + + HELP_LABEL_INTERP3 + 2) Cliquer sur le bouton "Interpoler le champ" (dans la barre d'outil ou dans le menu Traitement: + + + HELP_LABEL_INTERP4 + 3) Dans l'interface, sélectionner le <b>maillage cible</b>, et spécifier les paramètres d'interpolation. + @@ -621,5 +681,9 @@ LAB_VIEW_MODE_SPLIT_VIEW Scinder + + Simplified interface to visualise and manipulate fields + Interface simplifiée pour visualiser et manipuler les champs + diff --git a/src/MEDCalc/gui/FIELDS_msg_ja.ts b/src/MEDCalc/gui/FIELDS_msg_ja.ts index 59f48fb88..b494e145a 100644 --- a/src/MEDCalc/gui/FIELDS_msg_ja.ts +++ b/src/MEDCalc/gui/FIELDS_msg_ja.ts @@ -465,6 +465,66 @@ MEDModule + + HELP_WELCOME_FIELDS + Welcome to FIELDS! + + + HELP_GRP_PRESENTATION + Module Presentation + + + HELP_LABEL_PRES1 + This module provides a <b>simplified interface</b> to visualise and manipulate fields. + + + HELP_LABEL_PRES2 + It is based upon PARAVIS and MEDCoupling modules. + + + HELP_LABEL_PRES3 + After applying a simplified visualisation, it is possible to switch in PARAVIS module, and complete the presentation. + + + HELP_GRP_VISUALISATION + Simplified Visualisation + + + HELP_LABEL_VISU1 + 1) <b>Import mesh and fields</b> from a MED file (use the add data source button or the menu File/Add Data Source) + + + HELP_LABEL_VISU2 + 2) Select a field in the object browser (left window) + + + HELP_LABEL_VISU3 + 3) Select a <b>view mode</b> among these options:" + + + HELP_LABEL_VISU4 + 4) Choose a simplified representation (buttons in the tool bar, or in the presentations menu). The following simplified visualisations are available:" + + + HELP_GRP_INTERPOLATION + Fields Interpolation + + + HELP_LABEL_INTERP1 + FIELDS module also provides a graphical interface above MEDCouplingRemapper class. + + + HELP_LABEL_INTERP2 + 1) Select a <b>source field</b> in the object browser + + + HELP_LABEL_INTERP3 + 2) Click on "interpolate field" button (in the toolbar or in the processing menu: + + + HELP_LABEL_INTERP4 + 3) Within the interface, select the <b>target mesh</b>, and specify the interpolation parameters. + @@ -621,5 +681,9 @@ LAB_VIEW_MODE_SPLIT_VIEW 分割 + + Simplified interface to visualise and manipulate fields + + diff --git a/src/MEDCalc/gui/MEDModule.cxx b/src/MEDCalc/gui/MEDModule.cxx index 62481b089..4f405034d 100644 --- a/src/MEDCalc/gui/MEDModule.cxx +++ b/src/MEDCalc/gui/MEDModule.cxx @@ -25,6 +25,7 @@ #include "SALOME_LifeCycleCORBA.hxx" #include "QtxPopupMgr.h" +#include #include #include @@ -172,6 +173,8 @@ MEDModule::windows( QMap& theMap ) const // want Object browser, in the left area theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea ); + // help windows in the right area + theMap.insert( SalomeApp_Application::WT_InfoPanel, Qt::RightDockWidgetArea); #ifndef DISABLE_PYCONSOLE // want Python console, in the bottom area theMap.insert( SalomeApp_Application::WT_PyConsole, @@ -222,6 +225,50 @@ MEDModule::activateModule( SUIT_Study* theStudy ) // show own toolbars setToolShown( true ); + // Fill in Help Panel + SalomeApp_Application* app = dynamic_cast(application()); + QtxInfoPanel* ip = app->infoPanel(); + app->infoPanel()->setTitle(tr("HELP_WELCOME_FIELDS")); + + // short introduction of FIEDS module + int gp = ip->addGroup(tr("HELP_GRP_PRESENTATION")); + int lp1 = ip->addLabel(tr("HELP_LABEL_PRES1"), gp); + int lp2 = ip->addLabel(tr("HELP_LABEL_PRES2"), gp); + int lp3 = ip->addLabel(tr("HELP_LABEL_PRES3"), gp); + + + // getting started Simplified Visu + int gv = ip->addGroup(tr("HELP_GRP_VISUALISATION")); + int lv1 = ip->addLabel(tr("HELP_LABEL_VISU1"), gv); + int av1 = ip->addAction(action(FIELDSOp::OpAddDataSource) , gv); + int lv2 = ip->addLabel(tr("HELP_LABEL_VISU2"), gv); + int lv3 = ip->addLabel(tr("HELP_LABEL_VISU3"), gv); + QString qs31="
  • " + tr("LAB_VIEW_MODE_REPLACE") + "
"; + QString qs32="
  • " + tr("LAB_VIEW_MODE_OVERLAP") + "
"; + QString qs33="
  • " + tr("LAB_VIEW_MODE_NEW_LAYOUT") + "
"; + QString qs34="
  • " + tr("LAB_VIEW_MODE_SPLIT_VIEW") + "
"; + int lv31 = ip->addLabel(qs31, gv); + int lv32 = ip->addLabel(qs32, gv); + int lv33 = ip->addLabel(qs33, gv); + int lv34 = ip->addLabel(qs34, gv); + int lv4 = ip->addLabel(tr("HELP_LABEL_VISU4"), gv); + int av2 = ip->addAction(action(FIELDSOp::OpScalarMap) , gv); + int av3 = ip->addAction(action(FIELDSOp::OpContour) , gv); + int av4 = ip->addAction(action(FIELDSOp::OpVectorFields) , gv); + int av5 = ip->addAction(action(FIELDSOp::OpSlices) , gv); + int av6 = ip->addAction(action(FIELDSOp::OpDeflectionShape) , gv); + int av7 = ip->addAction(action(FIELDSOp::OpPointSprite) , gv); + + // getting started interpolation + int gi = ip->addGroup(tr("HELP_GRP_INTERPOLATION")); + int li1 = ip->addLabel(tr("HELP_LABEL_INTERP1"), gi); + int li2 = ip->addLabel(tr("HELP_LABEL_INTERP2"), gi); + int li3 = ip->addLabel(tr("HELP_LABEL_INTERP3"), gi); + int ai1 = ip->addAction(action(FIELDSOp::OpProcessingInterpolation) , gi); + int li4 = ip->addLabel(tr("HELP_LABEL_INTERP4"), gi); + + // End of Help Panel + //this->createStudyComponent(theStudy); _workspaceController->showDockWidgets(true); _presentationController->showDockWidgets(true); @@ -341,7 +388,8 @@ MEDModule::createStandardAction(const QString& label, QObject* slotobject, const char* slotmember, const QString& iconName, - const QString& tooltip) + const QString& tooltip, + int actionid) { SUIT_Desktop* dsk = getApp()->desktop(); SUIT_ResourceMgr* resMgr = getApp()->resourceMgr(); @@ -357,7 +405,7 @@ MEDModule::createStandardAction(const QString& label, else ico = QIcon(resMgr->loadPixmap("FIELDS", iconName)); - QAction* action = createAction(-1, + QAction* action = createAction(actionid, label, ico, label, diff --git a/src/MEDCalc/gui/MEDModule.hxx b/src/MEDCalc/gui/MEDModule.hxx index 6d5c6dc57..59beda3f2 100644 --- a/src/MEDCalc/gui/MEDModule.hxx +++ b/src/MEDCalc/gui/MEDModule.hxx @@ -76,7 +76,8 @@ public: QObject* slotobject, const char* slotmember, const QString& iconName, - const QString& tooltip=QString()); + const QString& tooltip=QString(), + int actionid=-1); void addActionInPopupMenu(int actionId, const QString& menus="", const QString& rule="client='ObjectBrowser'"); diff --git a/src/MEDCalc/gui/PresentationController.cxx b/src/MEDCalc/gui/PresentationController.cxx index d4bd40ccb..aa8ebc69c 100644 --- a/src/MEDCalc/gui/PresentationController.cxx +++ b/src/MEDCalc/gui/PresentationController.cxx @@ -180,7 +180,8 @@ PresentationController::createActions() label = tr("LAB_PRESENTATION_SCALAR_MAP"); tooltip = tr("TIP_PRESENTATION_SCALAR_MAP"); icon = tr(_getIconName("ICO_PRESENTATION_SCALAR_MAP").c_str()); - actionId = _salomeModule->createStandardAction(label,this, SLOT(onVisualizeScalarMap()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(onVisualizeScalarMap()), + icon, tooltip, FIELDSOp::OpScalarMap); _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -188,7 +189,8 @@ PresentationController::createActions() label = tr("LAB_PRESENTATION_CONTOUR"); tooltip = tr("TIP_PRESENTATION_CONTOUR"); icon = tr(_getIconName("ICO_PRESENTATION_CONTOUR").c_str()); - actionId = _salomeModule->createStandardAction(label,this, SLOT(onVisualizeContour()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(onVisualizeContour()), + icon, tooltip, FIELDSOp::OpContour); _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -196,7 +198,8 @@ PresentationController::createActions() label = tr("LAB_PRESENTATION_VECTOR_FIELD"); tooltip = tr("TIP_PRESENTATION_VECTOR_FIELD"); icon = tr(_getIconName("ICO_PRESENTATION_VECTOR_FIELD").c_str()); - actionId = _salomeModule->createStandardAction(label,this, SLOT(onVisualizeVectorField()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(onVisualizeVectorField()), + icon, tooltip, FIELDSOp::OpVectorFields); _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -204,7 +207,8 @@ PresentationController::createActions() label = tr("LAB_PRESENTATION_SLICES"); tooltip = tr("TIP_PRESENTATION_SLICES"); icon = tr(_getIconName("ICO_PRESENTATION_SLICES").c_str()); - actionId = _salomeModule->createStandardAction(label,this, SLOT(onVisualizeSlices()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(onVisualizeSlices()), + icon, tooltip, FIELDSOp::OpSlices); _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -212,7 +216,8 @@ PresentationController::createActions() label = tr("LAB_PRESENTATION_DEFLECTION_SHAPE"); tooltip = tr("TIP_PRESENTATION_DEFLECTION_SHAPE"); icon = tr(_getIconName("ICO_PRESENTATION_DEFLECTION_SHAPE").c_str()); - actionId = _salomeModule->createStandardAction(label,this, SLOT(onVisualizeDeflectionShape()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(onVisualizeDeflectionShape()), + icon, tooltip, FIELDSOp::OpDeflectionShape); _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); @@ -220,7 +225,8 @@ PresentationController::createActions() label = tr("LAB_PRESENTATION_POINT_SPRITE"); tooltip = tr("TIP_PRESENTATION_POINT_SPRITE"); icon = tr(_getIconName("ICO_PRESENTATION_POINT_SPRITE").c_str()); - actionId = _salomeModule->createStandardAction(label,this, SLOT(onVisualizePointSprite()),icon,tooltip); + actionId = _salomeModule->createStandardAction(label, this, SLOT(onVisualizePointSprite()), + icon, tooltip, FIELDSOp::OpPointSprite); _salomeModule->createTool(actionId, presentationToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, presentationMenuId); diff --git a/src/MEDCalc/gui/ProcessingController.cxx b/src/MEDCalc/gui/ProcessingController.cxx index b03d414cc..7b52bb86b 100644 --- a/src/MEDCalc/gui/ProcessingController.cxx +++ b/src/MEDCalc/gui/ProcessingController.cxx @@ -73,7 +73,8 @@ ProcessingController::createActions() label = tr("LAB_PROCESSING_INTERPOLATE_FIELD"); icon = tr("ICO_PROCESSING_INTERPOLATE_FIELD"); - actionId = _salomeModule->createStandardAction(label,this, SLOT(OnInterpolateField()),icon,label); + actionId = _salomeModule->createStandardAction(label, this, SLOT(OnInterpolateField()), + icon, label, FIELDSOp::OpProcessingInterpolation); _salomeModule->createTool(actionId, processingToolbarId); _salomeModule->action(actionId)->setIconVisibleInMenu(true); _salomeModule->createMenu(actionId, processingMenuId);