72    connect(parent, SIGNAL( elementClicked(QString) ),
 
   77    setWindowTitle(
"Matrix Options");
 
   81    QTabWidget *optionsTabs = 
new QTabWidget();
 
   82    optionsTabs->setGeometry( QRect(9, 9, 100, 100) );
 
   90    QGridLayout *mainLayout = 
new QGridLayout();
 
   91    colorOptionsPage->setLayout(mainLayout);
 
   92    QHBoxLayout *colorPageLayout = 
new QHBoxLayout(); 
 
   97    QVBoxLayout *colorToleranceLayout = 
new QVBoxLayout();
 
   99    m_colorToleranceRadioButton = 
new QRadioButton();
 
  100    m_colorToleranceRadioButton->setText(
"Pick Tolerance");
 
  101    colorToleranceLayout->addWidget(m_colorToleranceRadioButton);
 
  102    connect( m_colorToleranceRadioButton, SIGNAL( clicked() ),
 
  105    QHBoxLayout *colorToleranceOptionsLayout = 
new QHBoxLayout();
 
  107    m_colorToleranceSlider = 
new QSlider();
 
  108    m_colorToleranceSlider->setOrientation(Qt::Vertical);
 
  109    m_colorToleranceSlider->setRange(0, 1000);
 
  110    colorToleranceOptionsLayout->addWidget(m_colorToleranceSlider);
 
  111    connect( m_colorToleranceSlider, SIGNAL( valueChanged(
int) ),
 
  114    QVBoxLayout *colorToleranceEditsLayout = 
new QVBoxLayout();
 
  115    QHBoxLayout *colorBadCorrLayout = 
new QHBoxLayout();
 
  117    QLabel *colorBadCorrLabel = 
new QLabel();
 
  118    colorBadCorrLabel->setText(
"Bad Correlation");
 
  120    colorBadCorrLayout->addWidget(colorBadCorrLabel);
 
  128    colorToleranceEditsLayout->addLayout(colorBadCorrLayout);
 
  130    QHBoxLayout *colorEnterTolLayout = 
new QHBoxLayout();
 
  132    QLabel *colorTolLabel = 
new QLabel();
 
  133    colorTolLabel->setText(
"Tolerance");
 
  134    colorEnterTolLayout->addWidget(colorTolLabel);
 
  136    m_colorToleranceLineEdit = 
new QLineEdit();
 
  137    m_colorToleranceLineEdit->setValidator( 
new QDoubleValidator(-1, 1, 10, 
this) );
 
  138    colorEnterTolLayout->addWidget(m_colorToleranceLineEdit);
 
  139    connect( m_colorToleranceLineEdit, SIGNAL( textChanged(
const QString &) ),
 
  142    colorToleranceEditsLayout->addLayout(colorEnterTolLayout);
 
  144    QHBoxLayout *colorGoodCorrLayout = 
new QHBoxLayout();
 
  145    QLabel *colorGoodCorrLabel = 
new QLabel();
 
  146    colorGoodCorrLabel->setText(
"Good Correlation");
 
  148    colorGoodCorrLayout->addWidget(colorGoodCorrLabel);
 
  155    colorToleranceEditsLayout->addLayout(colorGoodCorrLayout);
 
  157    colorToleranceOptionsLayout->addLayout(colorToleranceEditsLayout);
 
  159    colorToleranceLayout->addLayout(colorToleranceOptionsLayout);
 
  161    colorPageLayout->addLayout(colorToleranceLayout);
 
  166    QVBoxLayout *colorGradientLayout = 
new QVBoxLayout();
 
  174    QSpacerItem *colorGradSpacer = 
new QSpacerItem(20,
 
  176                                                   QSizePolicy::Minimum,
 
  177                                                   QSizePolicy::Expanding);
 
  178    colorGradientLayout->addItem(colorGradSpacer);
 
  180    colorPageLayout->addLayout(colorGradientLayout);
 
  182    mainLayout->addLayout(colorPageLayout, 0, 1, 1, 1);
 
  184    optionsTabs->addTab(colorOptionsPage, QString() );
 
  185    optionsTabs->setTabText(optionsTabs->indexOf(colorOptionsPage), 
"Color Options");
 
  192    QHBoxLayout *focusPageLayout = 
new QHBoxLayout();
 
  193    focusPageLayout->setContentsMargins(0, 0, 0, 0);
 
  194    QVBoxLayout *focusOptionsLayout = 
new QVBoxLayout();
 
  212    QVBoxLayout *focusSpecParamLayout = 
new QVBoxLayout();
 
  220    QLabel *focusSpecParam1Label = 
new QLabel();
 
  221    focusSpecParam1Label->setText(
"Image 1:");
 
  222    focusSpecParamLayout->addWidget(focusSpecParam1Label);
 
  224    QHBoxLayout *focusSpecParam1Layout = 
new QHBoxLayout();
 
  227    focusSpecParam1Layout->addWidget(m_image1ComboBox);
 
  228    connect( m_image1ComboBox, SIGNAL( currentIndexChanged(
const QString &) ),
 
  234    focusSpecParam1Layout->addWidget(m_parameter1ComboBox);
 
  236    focusSpecParamLayout->addLayout(focusSpecParam1Layout);
 
  238    QLabel *focusSpecParam2Label = 
new QLabel();
 
  239    focusSpecParam2Label->setText(
"Image 2:");
 
  240    focusSpecParamLayout->addWidget(focusSpecParam2Label);
 
  242    QHBoxLayout *focusSpecParam2Layout = 
new QHBoxLayout();
 
  245    focusSpecParam2Layout->addWidget(m_image2ComboBox);
 
  246    connect( m_image2ComboBox, SIGNAL( currentIndexChanged(
const QString &) ),
 
  250    focusSpecParam2Layout->addWidget(m_parameter2ComboBox);
 
  252    focusSpecParamLayout->addLayout(focusSpecParam2Layout);
 
  254    focusOptionsLayout->addLayout(focusSpecParamLayout);
 
  256    focusPageLayout->addLayout(focusOptionsLayout);
 
  261    QVBoxLayout *focusTolLayout = 
new QVBoxLayout();
 
  269    QHBoxLayout *focusTolEditLayout = 
new QHBoxLayout();
 
  271    QLabel *focusTolLabel = 
new QLabel();
 
  272    focusTolLabel->setText(
"Tolerance:");
 
  273    focusTolEditLayout->addWidget(focusTolLabel);
 
  275    m_focusToleranceLineEdit = 
new QLineEdit();
 
  276    m_focusToleranceLineEdit->setValidator( 
new QDoubleValidator(-1, 1, 10, 
this) );
 
  277    focusTolEditLayout->addWidget(m_focusToleranceLineEdit);
 
  281    focusTolLayout->addLayout(focusTolEditLayout);
 
  283    QHBoxLayout *focusElementsLayout = 
new QHBoxLayout();
 
  284    QVBoxLayout *focusGoodElementsLayout = 
new QVBoxLayout();
 
  286    QLabel *focusGoodElementsLabel = 
new QLabel();
 
  287    focusGoodElementsLabel->setFocusPolicy(Qt::NoFocus);
 
  288    focusGoodElementsLabel->setText(
"Good");
 
  289    focusGoodElementsLayout->addWidget(focusGoodElementsLabel);
 
  291    m_goodElementsComboBox = 
new QComboBox();
 
  292    focusGoodElementsLayout->addWidget(m_goodElementsComboBox);
 
  294    focusElementsLayout->addLayout(focusGoodElementsLayout);
 
  296    QVBoxLayout *focusBadElementsLayout = 
new QVBoxLayout();
 
  298    QLabel *focusBadElementsLabel = 
new QLabel();
 
  299    focusBadElementsLabel->setText(
"Bad");
 
  300    focusBadElementsLayout->addWidget(focusBadElementsLabel);
 
  303    focusBadElementsLayout->addWidget(m_badElementsComboBox);
 
  305    focusElementsLayout->addLayout(focusBadElementsLayout);
 
  307    focusTolLayout->addLayout(focusElementsLayout);
 
  309    focusPageLayout->addLayout(focusTolLayout);
 
  311    focusOptionsPage->setLayout(focusPageLayout);
 
  312    optionsTabs->addTab( focusOptionsPage, QString() );
 
  313    optionsTabs->setTabText(optionsTabs->indexOf(focusOptionsPage), 
"Focus Options");
 
  318    QVBoxLayout *m_currentElementData = 
new QVBoxLayout();
 
  319    m_currentElementData->setContentsMargins(0, 0, 0, 0);
 
  323    QLabel *currentCorrLabel = 
new QLabel();
 
  324    currentCorrLabel->setText(
"Current Correlation Info:");
 
  325    m_currentElementData->addWidget(currentCorrLabel);
 
  328    m_currentValueLabel = 
new QLabel();
 
  329    m_currentValueLabel->setText(
"-");
 
  330    m_currentElementData->addWidget(m_currentValueLabel);
 
  359    optionsTabs->setCurrentIndex(0);
 
  361    QPushButton *applyButton = 
new QPushButton(
"&Apply");
 
  362    applyButton->setIcon( QIcon::fromTheme(
"dialog-ok-apply") );
 
  363    connect( applyButton, SIGNAL( clicked() ),
 
  367    QVBoxLayout *topLayout = 
new QVBoxLayout();
 
  368    topLayout->addWidget(optionsTabs);
 
  369    topLayout->addWidget(applyButton);
 
  370    topLayout->addLayout(m_currentElementData); 
 
  371    setLayout(topLayout);
 
  373    QMetaObject::connectSlotsByName(
this);