- 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 );
+ QFrame* aFrame = new QFrame(mySelGrp);
+
+ myListBox = new QListBox(aFrame);
+ myListBox->setSelectionMode(QListBox::Extended);
+ myListBox->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
+ 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);
+
+ // Split/Join criterion group
+ myCriterionGrp = new QGroupBox(3, Qt::Vertical, tr("SPLIT_JOIN_CRITERION"), aMainGrp);
+
+ myGroupChoice = new QButtonGroup(3, Qt::Vertical, myCriterionGrp);
+ myGroupChoice->setInsideMargin(0);
+ myGroupChoice->setFrameStyle(QFrame::NoFrame);
+ (new QRadioButton(tr("USE_DIAGONAL_1_3"), myGroupChoice))->setChecked(true);
+ (new QRadioButton(tr("USE_DIAGONAL_2_4"), myGroupChoice));
+ (new QRadioButton(tr("USE_NUMERIC_FUNC"), myGroupChoice));
+
+ myComboBoxFunctor = new QComboBox(myCriterionGrp);
+ myComboBoxFunctor->insertItem(tr("ASPECTRATIO_ELEMENTS"));
+ myComboBoxFunctor->insertItem(tr("MINIMUMANGLE_ELEMENTS"));
+ myComboBoxFunctor->insertItem(tr("SKEW_ELEMENTS"));
+ myComboBoxFunctor->insertItem(tr("AREA_ELEMENTS"));
+ //myComboBoxFunctor->insertItem(tr("LENGTH2D_EDGES")); // for existing elements only
+ //myComboBoxFunctor->insertItem(tr("MULTI2D_BORDERS")); // for existing elements only
+ myComboBoxFunctor->setCurrentItem(0);
+
+ myCriterionGrp->hide();
+ myGroupChoice->hide();
+ myComboBoxFunctor->setEnabled(false);