- myListBox = new QListBox( aFrame );
- myListBox->setSelectionMode( QListBox::Extended );
- myListBox->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding) );
-// myListBox->setColumnMode( QListBox::FitToHeight );
-
- myFilterBtn = new QPushButton( tr( "FILTER" ) , aFrame );
- myAddBtn = new QPushButton( tr( "ADD" ) , aFrame );
- myRemoveBtn = new QPushButton( tr( "REMOVE" ) , aFrame );
- mySortBtn = new QPushButton( tr( "SORT_LIST" ), aFrame );
-
- QGridLayout* aLay = new QGridLayout( aFrame, 5, 2, 0, 5 );
- aLay->addMultiCellWidget( myListBox, 0, 4, 0, 0 );
- aLay->addWidget( myFilterBtn, 0, 1 );
- aLay->addWidget( myAddBtn, 1, 1 );
- aLay->addWidget( myRemoveBtn, 2, 1 );
- aLay->addWidget( mySortBtn, 3, 1 );
-
- QSpacerItem* aSpacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- aLay->addItem( aSpacer, 4, 1 );
+ QGridLayout* mySelGrpLayout = new QGridLayout(mySelGrp);
+ mySelGrpLayout->setMargin(MARGIN);
+ mySelGrpLayout->setSpacing(SPACING);
+
+ myEntityTypeGrp = 0;
+ if (the3d2d) {
+ QGroupBox* aEntityTypeGrp = new QGroupBox(tr("SMESH_ELEMENTS_TYPE"), mySelGrp);
+ myEntityTypeGrp = new QButtonGroup(mySelGrp);
+ QHBoxLayout* aEntityLayout = new QHBoxLayout(aEntityTypeGrp);
+ aEntityLayout->setMargin(MARGIN);
+ aEntityLayout->setSpacing(SPACING);
+
+ QRadioButton* aFaceRb = new QRadioButton(tr("SMESH_FACE"), aEntityTypeGrp);
+ QRadioButton* aVolumeRb = new QRadioButton(tr("SMESH_VOLUME"), aEntityTypeGrp);
+
+ aEntityLayout->addWidget(aFaceRb);
+ aEntityLayout->addWidget(aVolumeRb);
+
+ myEntityTypeGrp->addButton(aFaceRb, 0);
+ myEntityTypeGrp->addButton(aVolumeRb, 1);
+ aFaceRb->setChecked(true);
+ myEntityType = myEntityTypeGrp->checkedId();
+
+ mySelGrpLayout->addWidget(aEntityTypeGrp, 0, 0, 1, 2);
+ }
+
+ myListBox = new QListWidget(mySelGrp);
+ myListBox->setSelectionMode(QListWidget::ExtendedSelection);
+ myListBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ myListBox->installEventFilter(this);
+
+ myFilterBtn = new QPushButton(tr("FILTER"), mySelGrp);
+ myAddBtn = new QPushButton(tr("ADD"), mySelGrp);
+ myRemoveBtn = new QPushButton(tr("REMOVE"), mySelGrp);
+ mySortBtn = new QPushButton(tr("SORT_LIST"), mySelGrp);
+
+ int row = mySelGrpLayout->rowCount();
+ mySelGrpLayout->addWidget(myListBox, row, 0, 6, 1);
+ mySelGrpLayout->addWidget(myFilterBtn, row, 1);
+ mySelGrpLayout->addWidget(myAddBtn, row+2, 1);
+ mySelGrpLayout->addWidget(myRemoveBtn, row+3, 1);
+ mySelGrpLayout->addWidget(mySortBtn, row+5, 1);
+ mySelGrpLayout->setRowMinimumHeight(row+1, 10);
+ mySelGrpLayout->setRowMinimumHeight(row+4, 10);
+ mySelGrpLayout->setRowStretch(row+1, 5);
+ mySelGrpLayout->setRowStretch(row+4, 5);
+
+ myToAllChk = new QCheckBox(tr("TO_ALL"), mySelGrp);
+ mySelGrpLayout->addWidget(myToAllChk, mySelGrpLayout->rowCount(), 0,
+ 1, mySelGrpLayout->columnCount());
+
+ // Split/Join criterion group
+ myCriterionGrp = new QGroupBox(tr("SPLIT_JOIN_CRITERION"), aMainGrp);
+ QVBoxLayout* aCriterionLayout = new QVBoxLayout(myCriterionGrp);
+ aCriterionLayout->setMargin(MARGIN);
+ aCriterionLayout->setSpacing(SPACING);