X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_NbSegmentsCreator.cxx;h=50906a0cad09c12727115067f295b1411158df23;hb=96313c9c5d4c9ffea4ffb4f0502fec58f3a74e0e;hp=9e8e0bda842b80b5672c123d7dacee87a15723ca;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx index 9e8e0bda8..50906a0ca 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx @@ -26,6 +26,7 @@ #include "StdMeshersGUI_NbSegmentsCreator.h" #include "StdMeshersGUI_DistrTable.h" #include "StdMeshersGUI_DistrPreview.h" +#include "StdMeshersGUI_SubShapeSelectorWdg.h" #include #include @@ -99,7 +100,7 @@ QFrame* StdMeshersGUI_NbSegmentsCreator::buildFrame() QVBoxLayout* lay = new QVBoxLayout( fr ); lay->setMargin( 0 ); - lay->setSpacing( 0 ); + lay->setSpacing( SPACING ); QGroupBox* GroupC1 = new QGroupBox( tr( "SMESH_ARGUMENTS" ), fr ); lay->addWidget( GroupC1 ); @@ -195,11 +196,27 @@ QFrame* StdMeshersGUI_NbSegmentsCreator::buildFrame() myPreviewRow = row; row++; + // 8) reverce edge parameters + myReversedEdgesBox = new QGroupBox(tr( "SMESH_REVERSED_EDGES" ), fr); + QHBoxLayout* edgeLay = new QHBoxLayout( myReversedEdgesBox ); + + myDirectionWidget = new StdMeshersGUI_SubShapeSelectorWdg(); + QString aGeomEntry = getShapeEntry(); + QString aMainEntry = getMainShapeEntry(); + if ( aGeomEntry == "" ) + aGeomEntry = h->GetObjectEntry(); + myDirectionWidget->SetGeomShapeEntry( aGeomEntry ); + myDirectionWidget->SetMainShapeEntry( aMainEntry ); + myDirectionWidget->SetListOfIDs( h->GetReversedEdges() ); + edgeLay->addWidget( myDirectionWidget ); + + lay->addWidget( myReversedEdgesBox ); + connect( myNbSeg, SIGNAL( valueChanged( const QString& ) ), this, SLOT( onValueChanged() ) ); connect( myDistr, SIGNAL( activated( int ) ), this, SLOT( onValueChanged() ) ); connect( myTable, SIGNAL( valueChanged( int, int ) ), this, SLOT( onValueChanged() ) ); connect( myExpr, SIGNAL( textChanged( const QString& ) ), this, SLOT( onValueChanged() ) ); - connect( myConv, SIGNAL( cuttonClicked( int ) ), this, SLOT( onValueChanged() ) ); + connect( myConv, SIGNAL( buttonClicked( int ) ), this, SLOT( onValueChanged() ) ); return fr; } @@ -348,6 +365,11 @@ bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothe if( distr==2 || distr==3 ) h->SetConversionMode( h_data.myConv ); + if( distr==1 || distr==2 || distr==3 ) { + h->SetReversedEdges( myDirectionWidget->GetListOfIDs() ); + h->SetObjectEntry( myDirectionWidget->GetMainShapeEntry() ); + } + if( distr==2 ) h->SetTableFunction( h_data.myTable ); @@ -400,6 +422,8 @@ void StdMeshersGUI_NbSegmentsCreator::onValueChanged() myScale->setShown( distr==1 ); myLScale->setShown( distr==1 ); + myReversedEdgesBox->setShown( !distr==0 ); + myDirectionWidget->showPreview( !distr==0 ); bool isFunc = distr==2 || distr==3; myPreview->setShown( isFunc ); @@ -434,8 +458,11 @@ void StdMeshersGUI_NbSegmentsCreator::onValueChanged() if ( (QtxComboBox*)sender() == myDistr && dlg() ) { QApplication::instance()->processEvents(); + myGroupLayout->invalidate(); + dlg()->layout()->invalidate(); dlg()->updateGeometry(); - dlg()->setMinimumSize( dlg()->minimumSizeHint().width(), dlg()->minimumSizeHint().height() ); + dlg()->setMinimumSize( dlg()->minimumSizeHint() ); dlg()->resize( dlg()->minimumSize() ); + QApplication::instance()->processEvents(); } }