]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Put the checkbox Mesh layers on all wrap in the tab Faces with layers.
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 16 Mar 2017 14:00:07 +0000 (15:00 +0100)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 16 Mar 2017 14:00:07 +0000 (15:00 +0100)
src/GUI/HYBRIDPluginGUI_Enums.h
src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx
src/GUI/HYBRIDPluginGUI_HypothesisCreator.h
src/GUI/HYBRIDPlugin_msg_en.ts

index c834884567b00f44b4e1a96d23c468402e58218e..629d4b14736f710799c49835eb12e01a959b126a 100644 (file)
@@ -29,9 +29,9 @@
 enum {
   STD_TAB = 0,
   ADV_TAB,
-  ENF_MESH_TAB,
   FACE_SEL_LAYERS_TAB,
-  FACE_SEL_IMPRINTING_TAB
+  FACE_SEL_IMPRINTING_TAB,
+  ENF_MESH_TAB
 };
 
 // Enforced vertices array columns
index 9165bb15d2970951438a09f7ad297c21be3ac97e..d0ae0e408adbab5cdcad95feb95e7312320c3181 100644 (file)
@@ -607,7 +607,6 @@ QFrame* HYBRIDPluginGUI_HypothesisCreator::buildFrame()
 
   // Enforced meshes parameters
   myEnfMeshGroup = new QWidget();
-  myLayersOnAllWrapCheck = new QCheckBox( tr( "HYBRID_LAYERS_ON_ALL_WRAP" ), myEnfMeshGroup );
   QGridLayout* anEnfMeshLayout = new QGridLayout(myEnfMeshGroup);
   
   myEnforcedMeshTableWidget = new QTableWidget(myEnfGroup);
@@ -671,8 +670,8 @@ QFrame* HYBRIDPluginGUI_HypothesisCreator::buildFrame()
   // GroupBox2VLayout->addWidget( info2 );
   
   // anEnfMeshLayout->addWidget( GroupBox2,                ENF_MESH_WARNING, 0, 1, 2 );
-  anEnfMeshLayout->addWidget(myLayersOnAllWrapCheck, ENF_MESH_MESH, 0, 1 , 1);
-  anEnfMeshLayout->addWidget(myEnforcedMeshTableWidget, ENF_MESH_MESH+1, 0, ENF_MESH_NB_LINES , 1);
+  //anEnfMeshLayout->addWidget(myLayersOnAllWrapCheck, ENF_MESH_MESH, 0, 1 , 1);
+  anEnfMeshLayout->addWidget(myEnforcedMeshTableWidget, ENF_MESH_MESH, 0, ENF_MESH_NB_LINES , 1);
   
   QGridLayout* anEnfMeshLayout2 = new QGridLayout(myEnfMeshGroup);
   anEnfMeshLayout2->addWidget(myEnfMeshWdg,             ENF_MESH_MESH, 0, 1, 2);
@@ -685,24 +684,26 @@ QFrame* HYBRIDPluginGUI_HypothesisCreator::buildFrame()
   anEnfMeshLayout2->addWidget(removeEnfMeshButton,      ENF_MESH_BTN, 1, 1, 1);
   anEnfMeshLayout2->setRowStretch(ENF_MESH_NB_LINES, 1);
   
-  anEnfMeshLayout->addLayout(anEnfMeshLayout2,          ENF_MESH_MESH+1, 1, ENF_MESH_NB_LINES, 1);
+  anEnfMeshLayout->addLayout(anEnfMeshLayout2,          ENF_MESH_MESH, 1, ENF_MESH_NB_LINES, 1);
   anEnfMeshLayout->setRowStretch(ENF_MESH_MESH, 10);
 
 
   // selection of faces for layers
 
   QWidget* faceSelLayersGroup = new QWidget( dlg() );
+  myLayersOnAllWrapCheck = new QCheckBox( tr( "HYBRID_LAYERS_ON_ALL_WRAP" ), faceSelLayersGroup );
   QGridLayout* faceSelLayersLayout = new QGridLayout( faceSelLayersGroup );
+  faceSelLayersLayout->addWidget(myLayersOnAllWrapCheck, 0, 0 );
 
-  QLabel* facesLbl = new QLabel( tr("HYBRID_FACE_IDS"), faceSelLayersGroup );
-  faceSelLayersLayout->addWidget( facesLbl, 0, 0 );
+  myFacesLbl = new QLabel( tr("HYBRID_FACE_IDS"), faceSelLayersGroup );
+  faceSelLayersLayout->addWidget( myFacesLbl, 1, 0 );
 
   myFaceSelectorLayers = new StdMeshersGUI_SubShapeSelectorWdg( faceSelLayersGroup, TopAbs_FACE, true, true );
   QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
   QString aSubEntry  = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
   myFaceSelectorLayers->SetGeomShapeEntry( aSubEntry, aMainEntry );
-  faceSelLayersLayout->addWidget( myFaceSelectorLayers, 1, 0, 2, 2 );
-  faceSelLayersLayout->setRowStretch( 1, 10);
+  faceSelLayersLayout->addWidget( myFaceSelectorLayers, 2, 0);
+  faceSelLayersLayout->setRowStretch( 2, 10);
 
   // selection of faces for imprinting
 
@@ -720,13 +721,13 @@ QFrame* HYBRIDPluginGUI_HypothesisCreator::buildFrame()
   // add tabs
   tab->insertTab( STD_TAB, myStdGroup, tr( "SMESH_ARGUMENTS" ) );
   tab->insertTab( ADV_TAB, myAdvGroup, tr( "HYBRID_ADV_ARGS" ) );
-  tab->insertTab( ENF_MESH_TAB, myEnfMeshGroup, tr( "HYBRID_ENFORCED_MESHES" ) );
   if ( aMainEntry.isEmpty() && aSubEntry.isEmpty() ) // mesh not based of geometry
     faceSelLayersGroup->hide();
   else {
     tab->insertTab( FACE_SEL_LAYERS_TAB, faceSelLayersGroup, tr( "HYBRID_FACES_LAYERS_TAB" ));
     tab->insertTab( FACE_SEL_IMPRINTING_TAB, faceSelImprintingGroup, tr( "HYBRID_FACES_IMPRINTING_TAB" ));
   }
+  tab->insertTab( ENF_MESH_TAB, myEnfMeshGroup, tr( "HYBRID_ENFORCED_MESHES" ) );
   tab->setCurrentIndex( STD_TAB );
 
   // connections
@@ -1493,12 +1494,9 @@ void HYBRIDPluginGUI_HypothesisCreator::updateWidgets()
     myAdvWidget->removeLogOnSuccessCheck->setEnabled( logFileRemovable );
   }
   bool enabled = !myLayersOnAllWrapCheck->isChecked();
-  myEnforcedMeshTableWidget->setEnabled(enabled);
-  addEnfMeshButton->setEnabled(enabled);
-  removeEnfMeshButton->setEnabled(enabled);
-  myEnfMeshWdg->setEnabled(enabled);
+  myFacesLbl->setEnabled(enabled);
+  myFaceSelectorLayers->setEnabled(enabled);
   if ( QTabWidget* tab = qobject_cast<QTabWidget*>( myStdGroup->parentWidget()->parentWidget() )) {
-    tab->setTabEnabled( FACE_SEL_LAYERS_TAB, enabled );
     tab->setTabEnabled( FACE_SEL_IMPRINTING_TAB, enabled );
   }
 }
index e74d8c376354acfb055369a1f2cc5fdb9fe4bdc4..2d3b70e9f2032b9e1093f613e87ac87f29dff34e 100644 (file)
@@ -280,6 +280,7 @@ private:
   SMESHGUI_SpinBox*   myMultinormalsAngleSpin;
   QCheckBox*          mySmoothNormalsCheck;
 
+  QLabel* myFacesLbl;
   StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorLayers;
   StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorImprinting;
 };
index a61d576084e8d0aaee93dba589d0f43bd1c76d0c..5da01eb43c9d8512fb00fdb035c701b5325a1e7e 100644 (file)
@@ -220,7 +220,7 @@ downward means inward and upward means outward ...
     </message>
     <message>
         <source>HYBRID_ENFORCED_MESHES</source>
-        <translation>Layers meshes</translation>
+        <translation>Enforced meshes</translation>
     </message>
     <message>
         <source>HYBRID_ENF_NAME_COLUMN</source>