+ // Periodicity parameters
+ myPeriodicityGroup = new QWidget( dlg() );
+ aPeriodicityLayout1 = new QGridLayout(myPeriodicityGroup);
+
+ myPeriodicitySplitter = new QSplitter(myPeriodicityGroup);
+ myPeriodicitySplitter->setOrientation(Qt::Horizontal);
+ aPeriodicityLayout1->addWidget(myPeriodicitySplitter, 0, 0, 1, 1);
+
+ myPeriodicityTreeWidget = new QTreeWidget(myPeriodicitySplitter);
+
+ QStringList myPeriodicityTreeHeaders;
+ myPeriodicityTreeHeaders << tr("BLSURF_PERIODICITY_OBJ_SOURCE_COLUMN")
+ << tr("BLSURF_PERIODICITY_OBJ_TARGET_COLUMN")
+ << tr("BLSURF_PERIODICITY_P1_SOURCE_COLUMN")
+ << tr("BLSURF_PERIODICITY_P2_SOURCE_COLUMN")
+ << tr("BLSURF_PERIODICITY_P3_SOURCE_COLUMN")
+ << tr("BLSURF_PERIODICITY_P1_TARGET_COLUMN")
+ << tr("BLSURF_PERIODICITY_P2_TARGET_COLUMN")
+ << tr("BLSURF_PERIODICITY_P3_TARGET_COLUMN")
+ << tr("BLSURF_PERIODICITY_SHAPE_TYPE");
+ myPeriodicityTreeWidget->setHeaderLabels(myPeriodicityTreeHeaders);
+
+ // Hide the vertex name to make the widget more readable
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_P1_SOURCE_COLUMN);
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_P2_SOURCE_COLUMN);
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_P3_SOURCE_COLUMN);
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_P1_TARGET_COLUMN);
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_P2_TARGET_COLUMN);
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_P3_TARGET_COLUMN);
+ myPeriodicityTreeWidget->hideColumn(PERIODICITY_SHAPE_TYPE);
+
+
+ myPeriodicityTreeWidget->setColumnCount(PERIODICITY_NB_COLUMN);
+ myPeriodicityTreeWidget->setSortingEnabled(true);
+
+ myPeriodicityTreeWidget->setAlternatingRowColors(true);
+ myPeriodicityTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
+ myPeriodicityTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
+
+ int periodicityVisibleColumns = 2;
+ for (int column = 0; column < periodicityVisibleColumns; ++column) {
+ myPeriodicityTreeWidget->header()->setSectionResizeMode(column,QHeaderView::Interactive);
+ myPeriodicityTreeWidget->resizeColumnToContents(column);
+ }
+ myPeriodicityTreeWidget->header()->setStretchLastSection(true);
+
+ myPeriodicitySplitter->addWidget(myPeriodicityTreeWidget);
+
+ myPeriodicityRightWidget = new QWidget(myPeriodicitySplitter);
+
+ myPeriodicityRightGridLayout = new QGridLayout(myPeriodicityRightWidget);
+ myPeriodicityGroupBox1 = new QGroupBox(tr("BLSURF_PRECAD_PERIODICITY"), myPeriodicityRightWidget);
+ myPeriodicityGroupBox1Layout = new QGridLayout(myPeriodicityGroupBox1);
+
+ myPeriodicityRightGridLayout->addWidget(myPeriodicityGroupBox1, 0, 0, 1, 2);
+
+ myPeriodicityOnFaceRadioButton = new QRadioButton(tr("BLSURF_PERIODICITY_ON_FACE"), myPeriodicityGroupBox1);
+ myPeriodicityGroupBox1Layout->addWidget(myPeriodicityOnFaceRadioButton, 0, 0, 1, 2);
+
+ myPeriodicityOnFaceRadioButton->setChecked(true);
+
+ myPeriodicityOnEdgeRadioButton = new QRadioButton(tr("BLSURF_PERIODICITY_ON_EDGE"), myPeriodicityGroupBox1);
+ myPeriodicityGroupBox1Layout->addWidget(myPeriodicityOnEdgeRadioButton, 0, 2, 1, 2);
+
+
+ // FACE, EDGE AND VERTEX SELECTION
+ TColStd_MapOfInteger shapeTypesFace, shapeTypesEdge;
+ shapeTypesFace.Add( TopAbs_FACE );
+ shapeTypesFace.Add( TopAbs_EDGE );
+ shapeTypesFace.Add( TopAbs_COMPOUND );
+ shapeTypesEdge.Add( TopAbs_EDGE );
+ shapeTypesEdge.Add( TopAbs_COMPOUND );
+
+// myPeriodicityEdgeFilter = new SMESH_NumberFilter("GEOM", TopAbs_EDGE, 0, shapeTypesEdge);
+
+ myPeriodicityMainSourceLabel = new QLabel(tr("BLSURF_PERIODICITY_MAIN_SOURCE"), myPeriodicityGroupBox1);
+ myPeriodicityGroupBox1Layout->addWidget(myPeriodicityMainSourceLabel, 1, 0, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicitySourceFaceFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 0, shapeTypesFace);
+ myPeriodicitySourceFaceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicitySourceFaceFilter, 0, /*multiSel=*/false);
+// myPeriodicitySourceFaceWdg->SetDefaultText(tr("BLSURF_PERIODICITY_SELECT_FACE"), "QLineEdit { color: grey }");
+ myPeriodicityGroupBox1Layout->addWidget(myPeriodicitySourceFaceWdg, 1, 1, 1, 1);
+
+// myPeriodicitySourceEdgeWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityEdgeFilter, 0, /*multiSel=*/false);
+// myPeriodicitySourceEdgeWdg->SetDefaultText(tr("BLSURF_PERIODICITY_SELECT_EDGE"), "QLineEdit { color: grey }");
+// myPeriodicitySourceEdgeWdg->hide();
+// myPeriodicityGroupBox1Layout->addWidget(myPeriodicitySourceEdgeWdg, 1, 1, 1, 1);
+
+ myPeriodicityMainTargetLabel = new QLabel(tr("BLSURF_PERIODICITY_MAIN_TARGET"), myPeriodicityGroupBox1);
+ myPeriodicityGroupBox1Layout->addWidget(myPeriodicityMainTargetLabel, 1, 2, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicityTargetFaceFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 0, shapeTypesFace);
+ myPeriodicityTargetFaceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityTargetFaceFilter, 0, /*multiSel=*/false);
+// myPeriodicityTargetFaceWdg->SetDefaultText(tr("BLSURF_PERIODICITY_SELECT_FACE"), "QLineEdit { color: grey }");
+ myPeriodicityGroupBox1Layout->addWidget(myPeriodicityTargetFaceWdg, 1, 3, 1, 1);
+
+// myPeriodicityTargetEdgeWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityEdgeFilter, 0, /*multiSel=*/false);
+// myPeriodicityTargetEdgeWdg->SetDefaultText(tr("BLSURF_PERIODICITY_SELECT_EDGE"), "QLineEdit { color: grey }");
+// myPeriodicityTargetEdgeWdg->hide();
+// myPeriodicityGroupBox1Layout->addWidget(myPeriodicityTargetEdgeWdg, 1, 3, 1, 1);
+
+ myPeriodicityGroupBox2 = new QGroupBox(tr("BLSURF_PERIODICITY_WITH_VERTICES"), myPeriodicityRightWidget);
+ myPeriodicityGroupBox2Layout = new QGridLayout(myPeriodicityGroupBox2);
+ myPeriodicityRightGridLayout->addWidget(myPeriodicityGroupBox2, 1, 0, 1, 2);
+
+ myPeriodicityGroupBox2->setCheckable(true);
+ myPeriodicityGroupBox2->setChecked(false);
+
+ myPeriodicitySourceLabel = new QLabel(tr("BLSURF_PERIODICITY_SOURCE"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicitySourceLabel, 0, 0, 1, 2);
+
+ myPeriodicityTargetLabel = new QLabel(tr("BLSURF_PERIODICITY_TARGET"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityTargetLabel, 0, 2, 1, 2);
+
+ // P1
+ myPeriodicityP1SourceLabel = new QLabel(tr("BLSURF_PERIODICITY_P1_SOURCE"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP1SourceLabel, 1, 0, 1, 1);
+
+
+ SMESH_NumberFilter* myPeriodicityP1SourceFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+ myPeriodicityP1SourceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityP1SourceFilter, 0, /*multiSel=*/false);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP1SourceWdg, 1, 1, 1, 1);
+
+ // P2
+ myPeriodicityP2SourceLabel = new QLabel(tr("BLSURF_PERIODICITY_P2_SOURCE"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP2SourceLabel, 2, 0, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicityP2SourceFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+ myPeriodicityP2SourceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityP2SourceFilter, 0, /*multiSel=*/false);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP2SourceWdg, 2, 1, 1, 1);
+
+ // P3
+ myPeriodicityP3SourceLabel = new QLabel(tr("BLSURF_PERIODICITY_P3_SOURCE"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP3SourceLabel, 3, 0, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicityP3SourceFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+ myPeriodicityP3SourceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityP3SourceFilter, 0, /*multiSel=*/false);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP3SourceWdg, 3, 1, 1, 1);
+
+ // P1
+ myPeriodicityP1TargetLabel = new QLabel(tr("BLSURF_PERIODICITY_P1_TARGET"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP1TargetLabel, 1, 2, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicityP1TargetFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+ myPeriodicityP1TargetWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityP1TargetFilter, 0, /*multiSel=*/false);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP1TargetWdg, 1, 3, 1, 1);
+
+ // P2
+ myPeriodicityP2TargetLabel = new QLabel(tr("BLSURF_PERIODICITY_P2_TARGET"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP2TargetLabel, 2, 2, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicityP2TargetFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+ myPeriodicityP2TargetWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityP2TargetFilter, 0, /*multiSel=*/false);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP2TargetWdg, 2, 3, 1, 1);
+
+ // P3
+ myPeriodicityP3TargetLabel = new QLabel(tr("BLSURF_PERIODICITY_P3_TARGET"), myPeriodicityGroupBox2);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP3TargetLabel, 3, 2, 1, 1);
+
+ SMESH_NumberFilter* myPeriodicityP3TargetFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, TopAbs_VERTEX);
+ myPeriodicityP3TargetWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myPeriodicityP3TargetFilter, 0, /*multiSel=*/false);
+ myPeriodicityGroupBox2Layout->addWidget(myPeriodicityP3TargetWdg, 3, 3, 1, 1);
+
+ myPeriodicityVerticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ myPeriodicityGroupBox2Layout->addItem(myPeriodicityVerticalSpacer, 7, 1, 1, 1);
+
+
+ myPeriodicityAddButton = new QPushButton(tr("BLSURF_PERIODICITY_ADD"),myPeriodicityRightWidget);
+ myPeriodicityRightGridLayout->addWidget(myPeriodicityAddButton, 2, 0, 1, 1);
+
+ myPeriodicityRemoveButton = new QPushButton(tr("BLSURF_PERIODICITY_REMOVE"),myPeriodicityRightWidget);
+ myPeriodicityRightGridLayout->addWidget(myPeriodicityRemoveButton, 2, 1, 1, 1);
+
+ myPeriodicitySplitter->addWidget(myPeriodicityRightWidget);
+
+ myPeriodicitySelectionWidgets.clear();
+ myPeriodicitySelectionWidgets.append(myPeriodicitySourceFaceWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityTargetFaceWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityP1SourceWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityP2SourceWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityP3SourceWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityP1TargetWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityP2TargetWdg);
+ myPeriodicitySelectionWidgets.append(myPeriodicityP3TargetWdg);
+ avoidSimultaneousSelection(myPeriodicitySelectionWidgets);
+
+ // HyperPatch parameters
+
+ QWidget* hpGroup = new QWidget();
+ QGridLayout* hpLayout = new QGridLayout(hpGroup);
+
+ myHyPatchTable = new QTableWidget( hpGroup );
+ myHyPatchTable->setColumnCount(1);
+ myHyPatchTable->setHorizontalHeaderLabels( QStringList() << tr("BLSURF_HYPATCH_TBL_HEADER") );
+ myHyPatchTable->setAlternatingRowColors(true);
+ myHyPatchTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::Stretch );
+
+
+ QPixmap iconSelect (SUIT_Session::session()->resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+ myHyPatchFaceSelBtn = new QPushButton( iconSelect, tr("BLSURF_HYPATCH_SEL_FACE"), hpGroup );
+ myHyPatchGroupSelBtn = new QPushButton( iconSelect, tr("BLSURF_HYPATCH_SEL_GROUP"), hpGroup );
+ myHyPatchFaceSelBtn->setCheckable( true );
+ myHyPatchGroupSelBtn->setCheckable( true );
+
+ myHyPatchFaceSelector = new StdMeshersGUI_SubShapeSelectorWdg( hpGroup, TopAbs_FACE, /*toShowList=*/false );
+
+ QLabel* hpTagsLbl = new QLabel( tr("BLSURF_TAGS"), hpGroup );
+ myHyPatchTagsLE = new QLineEdit( hpGroup );
+ myHyPatchTagsLE->setValidator( new SMESHGUI_IdValidator( hpGroup ));
+
+ QPushButton* hpAddBtn = new QPushButton( tr("BLSURF_SM_ADD"), hpGroup );
+ QPushButton* hpRemBtn = new QPushButton( tr("BLSURF_SM_REMOVE"), hpGroup );
+
+ hpLayout->addWidget( myHyPatchTable, 0, 0, 5, 1 );
+ hpLayout->addWidget( myHyPatchFaceSelBtn, 0, 1, 1, 2 );
+ hpLayout->addWidget( myHyPatchGroupSelBtn, 0, 3, 1, 2 );
+ hpLayout->addWidget( hpTagsLbl, 1, 1, 1, 1 );
+ hpLayout->addWidget( myHyPatchTagsLE, 1, 2, 1, 3 );
+ hpLayout->addWidget( hpAddBtn, 2, 1, 1, 2 );
+ hpLayout->addWidget( hpRemBtn, 2, 3, 1, 2 );
+ hpLayout->addWidget( myHyPatchFaceSelector, 3, 1, 1, 4 );
+