+ /***************************************************************/
+ // Controls for detecting coincident free borders
+
+ SewFreeBordersWidget = new QWidget( GroupArguments );
+ QVBoxLayout* aSewFreeBordersLayout = new QVBoxLayout( SewFreeBordersWidget );
+ aSewFreeBordersLayout->setMargin( 0 );
+ aSewFreeBordersLayout->setSpacing( SPACING );
+
+ // Tolerance
+ QWidget* TolAndAuto = new QWidget(SewFreeBordersWidget);
+ QLabel* TextLabelTolerance = new QLabel(tr("SMESH_TOLERANCE"), TolAndAuto);
+ SpinBoxTolerance = new SMESHGUI_SpinBox(TolAndAuto);
+ SpinBoxTolerance->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
+ SpinBoxTolerance->SetValue(0.); // auto-tolerance
+
+ // Auto Sewing
+ AutoSewCheck = new QCheckBox(tr("AUTO_SEWING"), TolAndAuto);
+ AutoSewCheck->setChecked( true );
+
+ // mesh
+ QGroupBox* GroupMesh = new QGroupBox(tr("SMESH_MESH"), SewFreeBordersWidget);
+ QHBoxLayout* GroupMeshLayout = new QHBoxLayout(GroupMesh);
+ GroupMeshLayout->setSpacing(SPACING);
+ GroupMeshLayout->setMargin(MARGIN);
+
+ QLabel* TextLabelName = new QLabel(tr("SMESH_NAME"), GroupMesh);
+ //SelectMeshButton = new QPushButton(GroupMesh);
+ //SelectMeshButton->setIcon(IconSelect);
+ LineEditMesh = new QLineEdit(GroupMesh);
+ LineEditMesh->setReadOnly(true);
+
+ GroupMeshLayout->addWidget(TextLabelName);
+ //GroupMeshLayout->addWidget(SelectMeshButton);
+ GroupMeshLayout->addWidget(LineEditMesh);
+
+ QGridLayout* TolAndAutoLayout = new QGridLayout( TolAndAuto );
+ TolAndAutoLayout->setSpacing(SPACING);
+ TolAndAutoLayout->setMargin(0);
+ TolAndAutoLayout->addWidget(GroupMesh, 0, 0, 1, 2 );
+ TolAndAutoLayout->addWidget(TextLabelTolerance, 1, 0 );
+ TolAndAutoLayout->addWidget(SpinBoxTolerance, 1, 1 );
+ TolAndAutoLayout->addWidget(AutoSewCheck, 2, 0 );
+
+ aSewFreeBordersLayout->addWidget( TolAndAuto );
+
+ /******************/
+ // Coincident group
+ GroupCoincidentWidget = new QWidget(SewFreeBordersWidget);
+ QGridLayout* GroupCoincidentLayout = new QGridLayout(GroupCoincidentWidget);
+ GroupCoincidentLayout->setSpacing(SPACING);
+ GroupCoincidentLayout->setMargin(0);
+
+ QGroupBox* GroupCoincident = new QGroupBox(tr("COINCIDENT_FREE_BORDERS"), GroupCoincidentWidget);
+ QGridLayout* aCoincidentLayout = new QGridLayout(GroupCoincident);
+ aCoincidentLayout->setSpacing(SPACING);
+ aCoincidentLayout->setMargin(MARGIN);
+
+ /*******/
+ // borders
+ ListCoincident = new QListWidget(GroupCoincident);
+ ListCoincident->setSelectionMode(QListWidget::ExtendedSelection);
+
+ DetectButton = new QPushButton(tr("DETECT"), GroupCoincident);
+ RemoveGroupButton = new QPushButton(tr("SMESH_BUT_REMOVE"), GroupCoincident);
+
+ SelectAllCheck = new QCheckBox(tr("SELECT_ALL"), GroupCoincident);
+
+ aCoincidentLayout->addWidget(ListCoincident, 0, 0, 5, 2);
+ aCoincidentLayout->addWidget(DetectButton, 1, 2);
+ aCoincidentLayout->addWidget(RemoveGroupButton, 3, 2);
+ aCoincidentLayout->addWidget(SelectAllCheck, 5, 0);
+ aCoincidentLayout->setRowMinimumHeight(1, 10);
+ aCoincidentLayout->setRowStretch (4, 5);
+ aCoincidentLayout->setRowStretch (5, 0);
+
+ /*****************************************/
+ // Controls for editing the selected group
+
+ QGroupBox* GroupEdit = new QGroupBox(tr("EDIT_SELECTED_GROUP"), GroupCoincidentWidget);
+ QGridLayout* GroupEditLayout = new QGridLayout(GroupEdit);
+ GroupEditLayout->setSpacing(SPACING);
+ GroupEditLayout->setMargin(MARGIN);
+
+ ListEdit = new QListWidget(GroupEdit);
+ ListEdit->setFlow( QListView::LeftToRight );
+ ListEdit->setSelectionMode(QListWidget::ExtendedSelection);
+ SetFirstButton = new QPushButton(GroupEdit);
+ SetFirstButton->setIcon(QPixmap(SMESHGUI_MergeDlg::IconFirst()));
+ RemoveElemButton = new QPushButton(GroupEdit);
+ RemoveElemButton->setIcon(IconRemove);
+
+ MoveBorderEndsButGrp = new QButtonGroup( GroupEdit );
+ QToolButton* moveBut1 = new QToolButton( GroupEdit );
+ QToolButton* moveBut2 = new QToolButton( GroupEdit );
+ QToolButton* moveBut3 = new QToolButton( GroupEdit );
+ QToolButton* moveBut4 = new QToolButton( GroupEdit );
+ moveBut1->setArrowType( Qt::LeftArrow );
+ moveBut2->setArrowType( Qt::RightArrow );
+ moveBut3->setArrowType( Qt::LeftArrow );
+ moveBut4->setArrowType( Qt::RightArrow );
+ MoveBorderEndsButGrp->addButton( moveBut1, MOVE_LEFT_1 );
+ MoveBorderEndsButGrp->addButton( moveBut2, MOVE_RIGHT_1 );
+ MoveBorderEndsButGrp->addButton( moveBut3, MOVE_LEFT_2 );
+ MoveBorderEndsButGrp->addButton( moveBut4, MOVE_RIGHT_2 );
+
+ SwapBut = new QPushButton( "<->", GroupEdit );
+ BorderEndLine[0] = new QLineEdit( GroupEdit );
+ BorderEndLine[1] = new QLineEdit( GroupEdit );
+ BorderEndLine[0]->setReadOnly(true);
+ BorderEndLine[1]->setReadOnly(true);
+ QLabel* StepLabel = new QLabel(tr("STEP"), GroupEdit );
+ StepSpin = new SalomeApp_IntSpinBox( 1, 100000, 1, GroupEdit,
+ /*acceptNames=*/false, /*showTip=*/false );
+ StepSpin->setValue( 1 );
+
+ GroupEditLayout->addWidget(ListEdit, 0, 0, 1, 8);
+ GroupEditLayout->addWidget(SetFirstButton, 0, 8);
+ GroupEditLayout->addWidget(RemoveElemButton, 0, 9);
+ GroupEditLayout->addWidget(moveBut1, 1, 0);
+ GroupEditLayout->addWidget(BorderEndLine[0], 1, 1);
+ GroupEditLayout->addWidget(moveBut2, 1, 2);
+ GroupEditLayout->addWidget(moveBut3, 1, 3);
+ GroupEditLayout->addWidget(BorderEndLine[1], 1, 4);
+ GroupEditLayout->addWidget(moveBut4, 1, 5);
+ GroupEditLayout->setColumnStretch( 6, 5 );
+ GroupEditLayout->addWidget(SwapBut, 1, 7);
+ GroupEditLayout->addWidget(StepLabel, 1, 8);
+ GroupEditLayout->addWidget(StepSpin, 1, 9);
+ GroupEditLayout->setRowStretch( 0, 1 );
+
+ GroupCoincidentLayout->addWidget( GroupCoincident );
+ GroupCoincidentLayout->addWidget( GroupEdit );
+ GroupCoincidentLayout->setRowStretch( 0, 10 );
+ GroupCoincidentLayout->setRowStretch( 1, 1 );
+
+ aSewFreeBordersLayout->addWidget( GroupCoincidentWidget );
+
+ // layout
+ GroupArgumentsLayout->addWidget(ModeGroup);
+ GroupArgumentsLayout->addWidget(SubGroup1);
+ GroupArgumentsLayout->addWidget(SubGroup2);
+ GroupArgumentsLayout->addWidget(SewFreeBordersWidget);
+ GroupArgumentsLayout->addWidget(CheckBoxMerge);
+ GroupArgumentsLayout->addWidget(CheckBoxPolygons);
+ GroupArgumentsLayout->addWidget(CheckBoxPolyedrs);
+
+ /***************************************************************/
+ GroupButtons = new QGroupBox(this);
+ QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
+ GroupButtonsLayout->setSpacing(SPACING);
+ GroupButtonsLayout->setMargin(MARGIN);
+
+ buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
+ buttonOk->setAutoDefault(true);
+ buttonOk->setDefault(true);
+ buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons);
+ buttonApply->setAutoDefault(true);
+ buttonCancel = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons);
+ buttonCancel->setAutoDefault(true);
+ buttonHelp = new QPushButton(tr("SMESH_BUT_HELP"), GroupButtons);
+ buttonHelp->setAutoDefault(true);
+
+ GroupButtonsLayout->addWidget(buttonOk);
+ GroupButtonsLayout->addSpacing(10);
+ GroupButtonsLayout->addWidget(buttonApply);
+ GroupButtonsLayout->addSpacing(10);
+ GroupButtonsLayout->addStretch();
+ GroupButtonsLayout->addWidget(buttonCancel);
+ GroupButtonsLayout->addWidget(buttonHelp);
+
+ /***************************************************************/
+ SMESHGUI_SewingDlgLayout->addWidget(ConstructorsBox);
+ SMESHGUI_SewingDlgLayout->addWidget(GroupArguments);
+ SMESHGUI_SewingDlgLayout->addWidget(GroupButtons);
+ //SMESHGUI_SewingDlgLayout->setStretch( 2, 10 );