- mySelGrp = new QGroupBox( 1, Qt::Horizontal, aMainGrp );
- QFrame* aFrame = new QFrame( mySelGrp );
-
- 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 );
-
- myToAllChk = new QCheckBox( tr( "TO_ALL" ), mySelGrp );
+ mySelGrp = new QGroupBox(1, Qt::Horizontal, aMainGrp);
+
+ myEntityTypeGrp = 0;
+ if (the3d2d) {
+ myEntityTypeGrp = new QHButtonGroup(tr("SMESH_ELEMENTS_TYPE"), mySelGrp);
+ (new QRadioButton(tr("SMESH_FACE"), myEntityTypeGrp))->setChecked(true);
+ (new QRadioButton(tr("SMESH_VOLUME"), myEntityTypeGrp));
+ myEntityType = myEntityTypeGrp->id(myEntityTypeGrp->selected());
+ }
+
+ QFrame* aFrame = new QFrame(mySelGrp);
+
+ myListBox = new QListBox(aFrame);
+ myListBox->setSelectionMode(QListBox::Extended);
+ myListBox->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
+// myListBox->setColumnMode(QListBox::FitToHeight);
+ myListBox->installEventFilter(this);
+
+ 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);
+
+ myToAllChk = new QCheckBox(tr("TO_ALL"), mySelGrp);