From: Christophe Bourcier Date: Thu, 16 Mar 2017 14:00:07 +0000 (+0100) Subject: Put the checkbox Mesh layers on all wrap in the tab Faces with layers. X-Git-Tag: SHAPER_2.7.0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8737cc9cb4f8c696782f995679258b946d05c6d3;p=plugins%2Fhybridplugin.git Put the checkbox Mesh layers on all wrap in the tab Faces with layers. --- diff --git a/src/GUI/HYBRIDPluginGUI_Enums.h b/src/GUI/HYBRIDPluginGUI_Enums.h index c834884..629d4b1 100644 --- a/src/GUI/HYBRIDPluginGUI_Enums.h +++ b/src/GUI/HYBRIDPluginGUI_Enums.h @@ -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 diff --git a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx index 9165bb1..d0ae0e4 100644 --- a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.cxx @@ -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( myStdGroup->parentWidget()->parentWidget() )) { - tab->setTabEnabled( FACE_SEL_LAYERS_TAB, enabled ); tab->setTabEnabled( FACE_SEL_IMPRINTING_TAB, enabled ); } } diff --git a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h index e74d8c3..2d3b70e 100644 --- a/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h +++ b/src/GUI/HYBRIDPluginGUI_HypothesisCreator.h @@ -280,6 +280,7 @@ private: SMESHGUI_SpinBox* myMultinormalsAngleSpin; QCheckBox* mySmoothNormalsCheck; + QLabel* myFacesLbl; StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorLayers; StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorImprinting; }; diff --git a/src/GUI/HYBRIDPlugin_msg_en.ts b/src/GUI/HYBRIDPlugin_msg_en.ts index a61d576..5da01eb 100644 --- a/src/GUI/HYBRIDPlugin_msg_en.ts +++ b/src/GUI/HYBRIDPlugin_msg_en.ts @@ -220,7 +220,7 @@ downward means inward and upward means outward ... HYBRID_ENFORCED_MESHES - Layers meshes + Enforced meshes HYBRID_ENF_NAME_COLUMN