AnglesGrpLayout->setRowMinimumHeight(1, 10);
AnglesGrpLayout->setRowStretch(3, 10);
+ // Controls for advanced parameters
+ QGridLayout* AdvancedGrpLayout = new QGridLayout();
+ AdvancedGrpLayout->setSpacing(SPACING);
+
+ // layouting
+ AdvancedGrpLayout->addWidget(TextLabelDistance, 0, 0);
+ AdvancedGrpLayout->addWidget(TextLabelDx, 0, 2);
+ AdvancedGrpLayout->addWidget(SpinBox_Dx, 0, 3);
+ AdvancedGrpLayout->addWidget(TextLabelDy, 0, 4);
+ AdvancedGrpLayout->addWidget(SpinBox_Dy, 0, 5);
+ AdvancedGrpLayout->addWidget(TextLabelDz, 0, 6);
+ AdvancedGrpLayout->addWidget(SpinBox_Dz, 0, 7);
+ AdvancedGrpLayout->addWidget(TextLabelVector, 1, 0);
+ AdvancedGrpLayout->addWidget(SelectVectorButton, 1, 1);
+ AdvancedGrpLayout->addWidget(TextLabelVx, 1, 2);
+ AdvancedGrpLayout->addWidget(SpinBox_Vx, 1, 3);
+ AdvancedGrpLayout->addWidget(TextLabelVy, 1, 4);
+ AdvancedGrpLayout->addWidget(SpinBox_Vy, 1, 5);
+ AdvancedGrpLayout->addWidget(TextLabelVz, 1, 6);
+ AdvancedGrpLayout->addWidget(SpinBox_Vz, 1, 7);
+ AdvancedGrpLayout->addWidget(TextLabelDist, 2, 0);
+ AdvancedGrpLayout->addWidget(SpinBox_VDist, 2, 3);
+ AdvancedGrpLayout->addWidget(TextLabelNbSteps, 3, 0, 1, 3);
+ AdvancedGrpLayout->addWidget(SpinBox_NbSteps, 3, 3);
+ AdvancedGrpLayout->addWidget(ByAverageNormalCheck, 4, 0, 1, 4);
+ AdvancedGrpLayout->addWidget(UseInputElemsOnlyCheck, 4, 4, 1, 4);
+
+ // Controls for advanced parameters
+ QGroupBox* RbGrp = new QGroupBox();
+ QHBoxLayout* RBLayout = new QHBoxLayout(RbGrp);
+ RBLayout->setSpacing(SPACING); RBLayout->setMargin(MARGIN);
+ RBLayout->addWidget(ExtrMethod_RBut0);
+ RBLayout->addWidget(ExtrMethod_RBut1);
+ RBLayout->addWidget(ExtrMethod_RBut2);
+
// layouting
- GroupArgumentsLayout->addWidget(SelectorWdg, 0, 0, 1, 9);
- GroupArgumentsLayout->addWidget(ExtrMethod_RBut0, 1, 0, 1, 3);
- GroupArgumentsLayout->addWidget(ExtrMethod_RBut1, 1, 3, 1, 3);
- GroupArgumentsLayout->addWidget(ExtrMethod_RBut2, 1, 6, 1, 3);
- GroupArgumentsLayout->addWidget(TextLabelDistance, 2, 0);
- GroupArgumentsLayout->addWidget(TextLabelDx, 2, 2);
- GroupArgumentsLayout->addWidget(SpinBox_Dx, 2, 3);
- GroupArgumentsLayout->addWidget(TextLabelDy, 2, 4);
- GroupArgumentsLayout->addWidget(SpinBox_Dy, 2, 5);
- GroupArgumentsLayout->addWidget(TextLabelDz, 2, 6);
- GroupArgumentsLayout->addWidget(SpinBox_Dz, 2, 7);
- GroupArgumentsLayout->addWidget(TextLabelVector, 3, 0);
- GroupArgumentsLayout->addWidget(SelectVectorButton, 3, 1);
- GroupArgumentsLayout->addWidget(TextLabelVx, 3, 2);
- GroupArgumentsLayout->addWidget(SpinBox_Vx, 3, 3);
- GroupArgumentsLayout->addWidget(TextLabelVy, 3, 4);
- GroupArgumentsLayout->addWidget(SpinBox_Vy, 3, 5);
- GroupArgumentsLayout->addWidget(TextLabelVz, 3, 6);
- GroupArgumentsLayout->addWidget(SpinBox_Vz, 3, 7);
- GroupArgumentsLayout->addWidget(TextLabelDist, 4, 0);
- GroupArgumentsLayout->addWidget(SpinBox_VDist, 4, 3);
- GroupArgumentsLayout->addWidget(TextLabelNbSteps, 5, 0, 1, 3);
- GroupArgumentsLayout->addWidget(SpinBox_NbSteps, 5, 3);
- GroupArgumentsLayout->addWidget(ByAverageNormalCheck, 6, 0, 1, 4);
- GroupArgumentsLayout->addWidget(UseInputElemsOnlyCheck, 6, 4, 1, 4);
- GroupArgumentsLayout->addWidget(BasePointGrp, 7, 0, 1, 9);
- GroupArgumentsLayout->addWidget(ScalesGrp, 8, 0, 1, 4);
- GroupArgumentsLayout->addWidget(AnglesGrp, 8, 5, 1, 4);
- GroupArgumentsLayout->addWidget(myPreviewCheckBox, 9, 0, 1, 8);
- GroupArgumentsLayout->addWidget(MakeGroupsCheck, 10,0, 1, 8);
- GroupArgumentsLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), 10, 0);
+ GroupArgumentsLayout->addWidget(RbGrp, 0, 0, 1, 4);
+ GroupArgumentsLayout->addWidget(SelectorWdg, 1, 0, 3, 2);
+ GroupArgumentsLayout->addLayout(AdvancedGrpLayout, 1, 2, 1, 2);
+ GroupArgumentsLayout->addWidget(BasePointGrp, 2, 2, 1, 2);
+ GroupArgumentsLayout->addWidget(ScalesGrp, 3, 2, 1, 1);
+ GroupArgumentsLayout->addWidget(AnglesGrp, 3, 3, 1, 1);
+ GroupArgumentsLayout->addWidget(myPreviewCheckBox, 4, 0);
+ GroupArgumentsLayout->addWidget(MakeGroupsCheck, 4, 1);
+ GroupArgumentsLayout->setRowStretch(5, 10);
+ SelectorWdg->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ SelectorWdg->setMinimumWidth(320);
/***************************************************************/
GroupButtons = new QGroupBox(this);
QIcon aComputeIcon( SUIT_Session::session()->resourceMgr()->loadPixmap( "SMESH", tr( "ICON_COMPUTE" ) ) );
SMESH::FilterManager_var aFilterMgr = SMESH::GetFilterManager();
+ // QToolBox with MeshInfo
+ myMeshTB = new QToolBox(this);
+
// name
QLabel* aNameLab = createLabel( tr( "NAME_LAB" ), this, Bold );
QLabel* aName = createField( this, "ctrlName" );
connect( aOverContVolumesBtn,SIGNAL( clicked() ), this, SLOT( computeOverConstrainedVolumesInfo() ) );
connect( myToleranceWidget, SIGNAL( valueChanged( double ) ), this, SLOT( setTolerance( double ) ) );
- l->addWidget( aNameLab, 0, 0 ); //0
- l->addWidget( aName, 0, 1, 1, 2 ); //1
- l->addWidget( aNodesLab, 1, 0, 1, 3 ); //2
- l->addWidget( aNodesFreeLab, 2, 0 ); //3
- l->addWidget( aNodesFree, 2, 1 ); //4
- l->addWidget( aFreeNodesBtn, 2, 2 ); //5
- l->addWidget( aNodesNbConnLab, 3, 0 ); //6
- l->addWidget( aNodesNbConn, 3, 1 ); //7
- l->addWidget( aNodesNbConnBtn, 3, 2 ); //8
- l->addWidget( aNodesDoubleLab, 4, 0 ); //9
- l->addWidget( aNodesDouble, 4, 1 ); //10
- l->addWidget( aDoubleNodesBtn, 4, 2 ); //11
- l->addWidget( aToleranceLab, 5, 0 ); //12
- l->addWidget( myToleranceWidget, 5, 1 ); //13
- l->addWidget( anEdgesLab, 6, 0, 1, 3 ); //14
- l->addWidget( anEdgesDoubleLab, 7, 0 ); //15
- l->addWidget( anEdgesDouble, 7, 1 ); //16
- l->addWidget( aDoubleEdgesBtn, 7, 2 ); //17
- l->addWidget( aFacesLab, 8, 0, 1, 3 ); //18
- l->addWidget( aFacesDoubleLab, 9, 0 ); //19
- l->addWidget( aFacesDouble, 9, 1 ); //20
- l->addWidget( aDoubleFacesBtn, 9, 2 ); //21
- l->addWidget( aFacesOverLab, 10, 0 ); //22
- l->addWidget( aFacesOver, 10, 1 ); //23
- l->addWidget( aOverContFacesBtn, 10, 2 ); //24
- l->addWidget( anAspectRatioLab, 11, 0 ); //25
- l->addWidget( aComputeFaceBtn, 11, 2 ); //26
- l->addWidget( myPlot, 12, 0, 1, 3 );//27
- l->addWidget( aVolumesLab, 13, 0, 1, 3 );//28
- l->addWidget( aVolumesDoubleLab, 14, 0 ); //29
- l->addWidget( aVolumesDouble, 14, 1 ); //30
- l->addWidget( aDoubleVolumesBtn, 14, 2 ); //31
- l->addWidget( aVolumesOverLab, 15, 0 ); //32
- l->addWidget( aVolumesOver, 15, 1 ); //33
- l->addWidget( aOverContVolumesBtn,15, 2 ); //34
- l->addWidget( anAspectRatio3DLab, 16, 0 ); //35
- l->addWidget( aComputeVolumeBtn, 16, 2 ); //36
- l->addWidget( myPlot3D, 17, 0, 1, 3 );//37
-
- l->setColumnStretch( 0, 0 );
- l->setColumnStretch( 1, 5 );
- l->setRowStretch ( 12, 5 );
- l->setRowStretch ( 17, 5 );
- l->setRowStretch ( 18, 1 );
+ l->addWidget( aNameLab, 0, 0 ); //0
+ l->addWidget( aName, 0, 1 ); //1
+
+ // Node group
+ QWidget* NodeGrp = new QWidget();
+ QGridLayout* NodeLayout = new QGridLayout(NodeGrp);
+ NodeLayout->setSpacing(SPACING); NodeLayout->setMargin(MARGIN);
+
+ NodeLayout->addWidget( aNodesFreeLab, 0, 0 );
+ NodeLayout->addWidget( aNodesFree, 0, 1 );
+ NodeLayout->addWidget( aFreeNodesBtn, 0, 2 );
+ NodeLayout->addWidget( aNodesNbConnLab, 1, 0 );
+ NodeLayout->addWidget( aNodesNbConn, 1, 1 );
+ NodeLayout->addWidget( aNodesNbConnBtn, 1, 2 );
+ NodeLayout->addWidget( aNodesDoubleLab, 2, 0 );
+ NodeLayout->addWidget( aNodesDouble, 2, 1 );
+ NodeLayout->addWidget( aDoubleNodesBtn, 2, 2 );
+ NodeLayout->addWidget( aToleranceLab, 3, 0 );
+ NodeLayout->addWidget( myToleranceWidget, 3, 1 );
+ NodeLayout->addWidget( myToleranceWidget, 3, 1 );
+ NodeLayout->setRowStretch(4, 5);
+
+ myMeshTB->addItem(NodeGrp, aNodesLab->text());
+ aNodesLab->setVisible(false);
+
+ // Edge group
+ QWidget* EdgeGrp = new QWidget();
+ QGridLayout* EdgeLayout = new QGridLayout(EdgeGrp);
+ EdgeLayout->setSpacing(SPACING); EdgeLayout->setMargin(MARGIN);
+
+ EdgeLayout->addWidget( anEdgesDoubleLab, 0, 0 );
+ EdgeLayout->addWidget( anEdgesDouble, 0, 1 );
+ EdgeLayout->addWidget( aDoubleEdgesBtn, 0, 2 );
+ EdgeLayout->setRowStretch(1, 5);
+
+ myMeshTB->addItem(EdgeGrp, anEdgesLab->text());
+ anEdgesLab->setVisible(false);
+
+ // Face group
+ QWidget* FaceGrp = new QWidget();
+ QGridLayout* FaceLayout = new QGridLayout(FaceGrp);
+ FaceLayout->setSpacing(SPACING); FaceLayout->setMargin(MARGIN);
+
+ FaceLayout->addWidget( aFacesDoubleLab, 0, 0 );
+ FaceLayout->addWidget( aFacesDouble, 0, 1 );
+ FaceLayout->addWidget( aDoubleFacesBtn, 0, 2 );
+ FaceLayout->addWidget( aFacesOverLab, 1, 0 );
+ FaceLayout->addWidget( aFacesOver, 1, 1 );
+ FaceLayout->addWidget( aOverContFacesBtn, 1, 2 );
+ FaceLayout->addWidget( anAspectRatioLab, 2, 0 );
+ FaceLayout->addWidget( aComputeFaceBtn, 2, 2 );
+ FaceLayout->addWidget( myPlot, 3, 0, 1, 3 );
+
+ myMeshTB->addItem(FaceGrp, aFacesLab->text());
+ aFacesLab->setVisible(false);
+
+ // Volume group
+ QWidget* VolumeGrp = new QWidget();
+ QGridLayout* VolumeLayout = new QGridLayout(VolumeGrp);
+ VolumeLayout->setSpacing(SPACING); VolumeLayout->setMargin(MARGIN);
+
+ VolumeLayout->addWidget( aVolumesDoubleLab, 0, 0 );
+ VolumeLayout->addWidget( aVolumesDouble, 0, 1 );
+ VolumeLayout->addWidget( aDoubleVolumesBtn, 0, 2 );
+ VolumeLayout->addWidget( aVolumesOverLab, 1, 0 );
+ VolumeLayout->addWidget( aVolumesOver, 1, 1 );
+ VolumeLayout->addWidget( aOverContVolumesBtn,1, 2 );
+ VolumeLayout->addWidget( anAspectRatio3DLab, 2, 0 );
+ VolumeLayout->addWidget( aComputeVolumeBtn, 2, 2 );
+ VolumeLayout->addWidget( myPlot3D, 3, 0, 1, 3 );
+
+ myMeshTB->addItem(VolumeGrp, aVolumesLab->text());
+ aVolumesLab->setVisible(false);
+
+ l->addWidget( myMeshTB, 1, 0, 1, 2 ); //2
+ l->setRowStretch( 2, 5 );
clearInternal();
}
}
}
else {
- for( int i=2; i<=13; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( false );
+ myMeshTB->setItemEnabled(0, false );
+ myMeshTB->widget(0)->setVisible( false );
}
// edges info
myButtons[3]->setEnabled( true );
}
else {
- for( int i=14; i<=17; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( false );
+ myMeshTB->setItemEnabled(1, false );
+ myMeshTB->widget(1)->setVisible( false );
}
// faces info
myButtons[5]->setEnabled( true );
myButtons[6]->setEnabled( true );
}
-#ifdef DISABLE_PLOT2DVIEWER
- for( int i=25; i<=27; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( false );
-#endif
}
else {
- for( int i=18; i<=27; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( false );
+ myMeshTB->setItemEnabled(2, false );
+ myMeshTB->widget(2)->setVisible( false );
}
// volumes info
myButtons[8]->setEnabled( true );
myButtons[9]->setEnabled( true );
}
-#ifdef DISABLE_PLOT2DVIEWER
- for( int i=35; i<=37; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( false );
-#endif
}
else {
- for( int i=28; i<=37; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( false );
+ myMeshTB->setItemEnabled(3, false );
+ myMeshTB->widget(3)->setVisible( false );
}
+ myMeshTB->setCurrentIndex(0);
+ myMeshTB->setVisible( (nbNodes + nbElemsByType[ SMESH::EDGE ] +
+ nbElemsByType[ SMESH::FACE ] +
+ nbElemsByType[ SMESH::VOLUME ]) > 0 );
}
//================================================================================
*/
void SMESHGUI_CtrlInfo::clearInternal()
{
- for( int i=0; i<=37; i++)
- dynamic_cast<QGridLayout*>(layout())->itemAt(i)->widget()->setVisible( true );
+ for (int i=0; i<=3;i++) {
+ myMeshTB->setItemEnabled(i, true );
+ myMeshTB->widget(i)->setVisible( true );
+ }
for( int i=0; i<=9; i++)
myButtons[i]->setEnabled( false );
myPlot->detachItems();