123    QGridLayout *gridLayout = 
new QGridLayout();
 
  124    gridLayout->setSizeConstraint(QLayout::SetFixedSize);
 
  128    QString tempFileName = 
FileName(
"$ISISROOT/appdata/images/icons").
expanded();
 
  129    QString toolIconDir = tempFileName;
 
  133    QToolButton *leftZoomIn = 
new QToolButton();
 
  134    leftZoomIn->setIcon(QPixmap(toolIconDir + 
"/viewmag+.png"));
 
  135    leftZoomIn->setIconSize(isize);
 
  136    leftZoomIn->setToolTip(
"Zoom In 2x");
 
  137    leftZoomIn->setWhatsThis(
"Zoom In 2x on left measure.");
 
  139    QToolButton *leftZoomOut = 
new QToolButton();
 
  140    leftZoomOut->setIcon(QPixmap(toolIconDir + 
"/viewmag-.png"));
 
  141    leftZoomOut->setIconSize(isize);
 
  142    leftZoomOut->setToolTip(
"Zoom Out 2x");
 
  143    leftZoomOut->setWhatsThis(
"Zoom Out 2x on left measure.");
 
  145    QToolButton *leftZoom1 = 
new QToolButton();
 
  146    leftZoom1->setIcon(QPixmap(toolIconDir + 
"/viewmag1.png"));
 
  147    leftZoom1->setIconSize(isize);
 
  148    leftZoom1->setToolTip(
"Zoom 1:1");
 
  149    leftZoom1->setWhatsThis(
"Show left measure at full resolution.");
 
  151    QHBoxLayout *leftZoomPan = 
new QHBoxLayout;
 
  152    leftZoomPan->addWidget(leftZoomIn);
 
  153    leftZoomPan->addWidget(leftZoomOut);
 
  154    leftZoomPan->addWidget(leftZoom1);
 
  157    QToolButton *leftPanUp = 0;
 
  158    QToolButton *leftPanDown = 0;
 
  159    QToolButton *leftPanLeft = 0;
 
  160    QToolButton *leftPanRight = 0;
 
  163      leftPanUp = 
new QToolButton(parent);
 
  164      leftPanUp->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/up.png").
 
  166      leftPanUp->setIconSize(isize);
 
  167      leftPanUp->setToolTip(
"Move up 1 screen pixel");
 
  168      leftPanUp->setStatusTip(
"Move up 1 screen pixel");
 
  169      leftPanUp->setWhatsThis(
"Move the left measure up 1 screen pixel.");
 
  171      leftPanDown = 
new QToolButton(parent);
 
  172      leftPanDown->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/down.png").
 
  174      leftPanDown->setIconSize(isize);
 
  175      leftPanDown->setToolTip(
"Move down 1 screen pixel");
 
  176      leftPanDown->setStatusTip(
"Move down 1 screen pixel");
 
  177      leftPanDown->setWhatsThis(
"Move the left measure down 1 screen pixel.");
 
  179      leftPanLeft = 
new QToolButton(parent);
 
  180      leftPanLeft->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/back.png").
 
  182      leftPanLeft->setIconSize(isize);
 
  183      leftPanLeft->setToolTip(
"Move left 1 screen pixel");
 
  184      leftPanLeft->setWhatsThis(
"Move the left measure to the left by 1 screen" 
  187      leftPanRight = 
new QToolButton(parent);
 
  188      leftPanRight->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/forward.png").
 
  190      leftPanRight->setIconSize(isize);
 
  191      leftPanRight->setToolTip(
"Move right 1 screen pixel");
 
  192      leftPanRight->setWhatsThis(
"Move the left measure to the right by 1" 
  195      leftZoomPan->addWidget(leftPanUp);
 
  196      leftZoomPan->addWidget(leftPanDown);
 
  197      leftZoomPan->addWidget(leftPanLeft);
 
  198      leftZoomPan->addWidget(leftPanRight);
 
  201    leftZoomPan->addStretch();
 
  202    gridLayout->addLayout(leftZoomPan, row, 0);
 
  205    m_rightZoomIn->setIcon(QPixmap(toolIconDir + 
"/viewmag+.png"));
 
  218    m_rightZoom1->setIcon(QPixmap(toolIconDir + 
"/viewmag1.png"));
 
  221    m_rightZoom1->setWhatsThis(
"Show right measure at full resolution.");
 
  223    QHBoxLayout *rightZoomPan = 
new QHBoxLayout;
 
  229    QToolButton *rightPanUp = 
new QToolButton(parent);
 
  230    rightPanUp->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/up.png").
 
  232    rightPanUp->setIconSize(isize);
 
  233    rightPanUp->setToolTip(
"Move up 1 screen pixel");
 
  234    rightPanUp->setWhatsThis(
"Move the right measure up 1 screen pixel.");
 
  236    QToolButton *rightPanDown = 
new QToolButton(parent);
 
  237    rightPanDown->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/down.png").
 
  239    rightPanDown->setIconSize(isize);
 
  240    rightPanDown->setToolTip(
"Move down 1 screen pixel");
 
  241    rightPanUp->setWhatsThis(
"Move the right measure down 1 screen pixel.");
 
  243    QToolButton *rightPanLeft = 
new QToolButton(parent);
 
  244    rightPanLeft->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/back.png").
 
  246    rightPanLeft->setIconSize(isize);
 
  247    rightPanLeft->setToolTip(
"Move left 1 screen pixel");
 
  248    rightPanLeft->setWhatsThis(
"Move the right measure to the left by 1 screen" 
  251    QToolButton *rightPanRight = 
new QToolButton(parent);
 
  252    rightPanRight->setIcon(QIcon(
FileName(
"$ISISROOT/appdata/images/icons/forward.png").
 
  254    rightPanRight->setIconSize(isize);
 
  255    rightPanRight->setToolTip(
"Move right 1 screen pixel");
 
  256    rightPanRight->setWhatsThis(
"Move the right measure to the right by 1" 
  259    rightZoomPan->addWidget(rightPanUp);
 
  260    rightZoomPan->addWidget(rightPanDown);
 
  261    rightZoomPan->addWidget(rightPanLeft);
 
  262    rightZoomPan->addWidget(rightPanRight);
 
  263    rightZoomPan->addStretch();
 
  265    gridLayout->addLayout(rightZoomPan, row++, 1);
 
  269    QCheckBox *leftLockStretch = 
new QCheckBox(
"lock stretch");
 
  272    QString whatsThisTextForStretchLocking = 
"If checked then a new stretch " 
  273        "will NOT be calculated for each pan or zoom change.  Note that stretch" 
  274        " changes made using the stretch tool will ALWAYS take effect, " 
  275        "regardless of the state of this checkbox.";
 
  276    leftLockStretch->setWhatsThis(whatsThisTextForStretchLocking);
 
  277    QHBoxLayout *leftzflsLayout = 
new QHBoxLayout;
 
  279    leftzflsLayout->addWidget(leftLockStretch);
 
  280    gridLayout->addLayout(leftzflsLayout, row, 0);
 
  283    QCheckBox *rightLockStretch = 
new QCheckBox(
"lock stretch");
 
  284    rightLockStretch->setWhatsThis(whatsThisTextForStretchLocking);
 
  285    QHBoxLayout *rightzflsLayout = 
new QHBoxLayout;
 
  287    rightzflsLayout->addWidget(rightLockStretch);
 
  288    gridLayout->addLayout(rightzflsLayout, row++, 1);
 
  297    connect(
this, SIGNAL(newControlNetwork(
ControlNet *)),
 
  305    connect(leftLockStretch, SIGNAL(stateChanged(
int)),
 
  307            SLOT(changeStretchLock(
int)));
 
  308    leftLockStretch->setChecked(
false);
 
  312    connect(leftZoomIn, SIGNAL(clicked()), 
m_leftView, SLOT(zoomIn()));
 
  313    connect(leftZoomOut, SIGNAL(clicked()), 
m_leftView, SLOT(zoomOut()));
 
  314    connect(leftZoom1, SIGNAL(clicked()), 
m_leftView, SLOT(zoom1()));
 
  318    connect(leftZoomOut, SIGNAL(clicked()), 
this, SLOT(
updateRightGeom()));
 
  323    connect(
m_leftView, SIGNAL(tackPointChanged(
double)),
 
  328    connect(
this, SIGNAL(updateLeftView(
double, 
double)),
 
  329            m_leftView, SLOT(refreshView(
double, 
double)));
 
  331    connect (
m_leftView, SIGNAL(userMovedTackPoint()),
 
  336      connect(leftPanUp, SIGNAL(clicked()), 
m_leftView, SLOT(panUp()));
 
  337      connect(leftPanDown, SIGNAL(clicked()), 
m_leftView, SLOT(panDown()));
 
  338      connect(leftPanLeft, SIGNAL(clicked()), 
m_leftView, SLOT(panLeft()));
 
  339      connect(leftPanRight, SIGNAL(clicked()), 
m_leftView, SLOT(panRight()));
 
  350    connect(
this, SIGNAL(newControlNetwork(
ControlNet *)),
 
  354    connect(rightLockStretch, SIGNAL(stateChanged(
int)),
 
  356    rightLockStretch->setChecked(
false);
 
  360    connect(
m_rightView, SIGNAL(tackPointChanged(
double)),
 
  362    connect(
this, SIGNAL(updateRightView(
double, 
double)),
 
  365    connect (
m_rightView, SIGNAL(userMovedTackPoint()),
 
  373    connect(rightPanUp, SIGNAL(clicked()), 
m_rightView, SLOT(panUp()));
 
  374    connect(rightPanDown, SIGNAL(clicked()), 
m_rightView, SLOT(panDown()));
 
  375    connect(rightPanLeft, SIGNAL(clicked()), 
m_rightView, SLOT(panLeft()));
 
  376    connect(rightPanRight, SIGNAL(clicked()), 
m_rightView, SLOT(panRight()));
 
  387    QButtonGroup *bgroup = 
new QButtonGroup();
 
  392    QCheckBox *linkZoom = NULL;
 
  394      m_nogeom->setText(
"No geom/rotate");
 
  395      m_nogeom->setToolTip(
"Reset right measure to it's native geometry.");
 
  396      m_nogeom->setWhatsThis(
"Reset right measure to it's native geometry.  " 
  397                             "If measure was rotated, set rotation back to 0.  " 
  398                             "If measure was geomed to match the left measure, " 
  399                             "reset the geometry back to it's native state.");
 
  400      m_geom   = 
new QRadioButton(
"Geom");
 
  401      m_geom->setToolTip(
"Geom right measure to match geometry of left measure.");
 
  402      m_geom->setWhatsThis(
"Using an affine transform, geom the right measure to match the " 
  403                           "geometry of the left measure.");
 
  404      bgroup->addButton(
m_geom);
 
  408      linkZoom = 
new QCheckBox(
"Link Zoom");
 
  409      linkZoom->setToolTip(
"Link zooming between the left and right views.");
 
  410      linkZoom->setWhatsThis(
"When zooming in the left view, the right view will " 
  411                             "be set to the same zoom factor as the left view.");
 
  412      connect(linkZoom, SIGNAL(toggled(
bool)), 
this, SLOT(
setZoomLink(
bool)));
 
  415      m_nogeom->setToolTip(
"Reset right measure to it's native geometry.");
 
  416      m_nogeom->setWhatsThis(
"Reset right measure to it's native geometry.  " 
  417                             "If measure was rotated, set rotation back to 0.");
 
  421    QRadioButton *rotate = 
new QRadioButton(
"Rotate");
 
  422    bgroup->addButton(rotate);
 
  424    connect(rotate, SIGNAL(clicked()), 
this, SLOT(
setRotate()));
 
  433    m_dial->setWrapping(
false);
 
  434    m_dial->setNotchesVisible(
true);
 
  435    m_dial->setNotchTarget(5.);
 
  436    m_dial->setEnabled(
false);
 
  437    m_dial->setToolTip(
"Rotate right measure");
 
  438    m_dial->setWhatsThis(
"Rotate the right measure by degrees.");
 
  443    m_dialNumber->setWhatsThis(
"Rotate the right measure by given number" 
  448    QCheckBox *showPoints = 
new QCheckBox(
"Show control points");
 
  449    showPoints->setToolTip(
"Draw control point crosshairs");
 
  450    showPoints->setWhatsThis(
"This will toggle whether crosshairs are drawn" 
  451                     " for the control points located within the measure''s" 
  452                     " view.  For areas of dense measurements, turning this" 
  453                     " off will allow easier viewing of features.");
 
  454    connect(showPoints, SIGNAL(toggled(
bool)), 
m_leftView, SLOT(setPoints(
bool)));
 
  455    connect(showPoints, SIGNAL(toggled(
bool)), 
m_rightView, SLOT(setPoints(
bool)));
 
  456    showPoints->setChecked(
true);
 
  458    QCheckBox *cross = 
new QCheckBox(
"Show crosshair");
 
  459    connect(cross, SIGNAL(toggled(
bool)), 
m_leftView, SLOT(setCross(
bool)));
 
  460    connect(cross, SIGNAL(toggled(
bool)), 
m_rightView, SLOT(setCross(
bool)));
 
  461    cross->setChecked(
true);
 
  462    cross->setToolTip(
"Show the red crosshair across measure view");
 
  463    cross->setWhatsThis(
"This will toggle whether the crosshair across the" 
  464                        " measure view will be shown");
 
  466    QCheckBox *circle = 
new QCheckBox(
"Circle");
 
  467    circle->setChecked(
false);
 
  468    circle->setToolTip(
"Draw circle");
 
  469    circle->setWhatsThis(
"Draw circle on measure view.  This can aid in" 
  470                         " centering a crater under the crosshair.");
 
  471    connect(circle, SIGNAL(toggled(
bool)), 
this, SLOT(
setCircle(
bool)));
 
  473    m_slider = 
new QScrollBar(Qt::Horizontal);
 
  481    m_slider->setToolTip(
"Adjust circle size");
 
  482    m_slider->setWhatsThis(
"This allows the cirle size to be adjusted.");
 
  484    QVBoxLayout *vlayout = 
new QVBoxLayout();
 
  486      vlayout->addWidget(linkZoom);
 
  490      vlayout->addWidget(
m_geom);
 
  492    vlayout->addWidget(rotate);
 
  493    vlayout->addWidget(
m_dial);
 
  495    vlayout->addWidget(showPoints);
 
  496    vlayout->addWidget(cross);
 
  497    vlayout->addWidget(circle);
 
  499    gridLayout->addLayout(vlayout, row++, 2);
 
  522    m_oldPosition->setToolTip(
"Measure Sample/Line before sub-pixel " 
  524    m_oldPosition->setWhatsThis(
"Original Sample/Line of the right measure " 
  525            "before the sub-pixel registration.  If you select the \"Undo\" " 
  526            "button, the measure will revert back to this Sample/Line.");
 
  528    m_goodFit->setToolTip(
"Goodness of Fit result from sub-pixel registration.");
 
  529    m_goodFit->setWhatsThis(
"Resulting Goodness of Fit from sub-pixel " 
  531    QVBoxLayout *autoRegLayout = 
new QVBoxLayout;
 
  532    autoRegLayout->setMargin(0);
 
  541    QHBoxLayout *leftLayout = 
new QHBoxLayout();
 
  542    QToolButton *stop = 
new QToolButton();
 
  543    stop->setIcon(QPixmap(toolIconDir + 
"/blinkStop.png"));
 
  544    stop->setIconSize(QSize(22, 22));
 
  545    stop->setToolTip(
"Blink Stop");
 
  546    QString text = 
"<b>Function:</b> Stop automatic timed blinking";
 
  547    stop->setWhatsThis(text);
 
  548    connect(stop, SIGNAL(released()), 
this, SLOT(
blinkStop()));
 
  550    QToolButton *start = 
new QToolButton();
 
  551    start->setIcon(QPixmap(toolIconDir + 
"/blinkStart.png"));
 
  552    start->setIconSize(QSize(22, 22));
 
  553    start->setToolTip(
"Blink Start");
 
  554    text = 
"<b>Function:</b> Start automatic timed blinking.  Cycles \ 
  555           through linked viewports at variable rate";
 
  556    start->setWhatsThis(text);
 
  557    connect(start, SIGNAL(released()), 
this, SLOT(
blinkStart()));
 
  566    text = 
"<b>Function:</b> Change automatic blink rate between " +
 
  573    leftLayout->addWidget(stop);
 
  574    leftLayout->addWidget(start);
 
  578      QPushButton *find = 
new QPushButton(
"Find");
 
  579      find->setShortcut(Qt::Key_F);
 
  580      find->setToolTip(
"Move right measure to same Latitude/Longitude as left. " 
  581                       "<strong>Shortcut: F</strong>");
 
  582      find->setWhatsThis(
"Find the Latitude/Longitude under the crosshair in the " 
  583                         "left measure and move the right measure to the same " 
  584                         "latitude/longitude.");
 
  585      leftLayout->addWidget(find);
 
  586      connect(find, SIGNAL(clicked()), 
this, SLOT(
findPoint()));
 
  589    leftLayout->addStretch();
 
  590    gridLayout->addLayout(leftLayout, row, 0);
 
  592    QHBoxLayout *rightLayout = 
new QHBoxLayout();
 
  595    m_autoReg->setToolTip(
"Sub-pixel register the right measure to the left. " 
  596                          "<strong>Shortcut: R</strong>");
 
  597    m_autoReg->setWhatsThis(
"Sub-pixel register the right measure to the left " 
  598                       "and move the result under the crosshair.  After " 
  599                       "viewing the results, the option exists to move the " 
  600                       "measure back to the original position by selecting " 
  601                       "<strong>\"Undo Registration\"</strong>.");
 
  604      m_saveMeasure->setToolTip(
"Save the both the left and right measure to the edit control " 
  605                                "point (control point currently being edited). " 
  606                                "<strong>Shortcut: M</strong>. " 
  607                                " <strong>Note: The edit control point " 
  608                                "will not be saved to the network until you select " 
  609                                "<strong>\"Save Point\"</strong>");
 
  613      m_saveMeasure->setToolTip(
"Save the right measure to the edit control " 
  614                                "point (control point currently being edited). " 
  615                                "<strong>Shortcut: M</strong>. " 
  616                                " <strong>Note: The edit control point " 
  617                                "will not be saved to the network until you select " 
  618                                "<strong>\"Save Point\"</strong>");
 
  627    QPushButton *blinkButton = 
new QPushButton(
"Advanced Blink");
 
  628    blinkButton->setCheckable(
true);
 
  629    connect(blinkButton, &QAbstractButton::toggled, 
m_blinkExtension, &QWidget::setVisible);
 
  630    connect(blinkButton, SIGNAL(clicked()), 
this, SLOT(showBlinkExtension()));
 
  632    QHBoxLayout *rightBlinkLayout = 
new QHBoxLayout();
 
  633    QToolButton *stopRight = 
new QToolButton();
 
  634    stopRight->setIcon(QPixmap(toolIconDir + 
"/blinkStop.png"));
 
  635    stopRight->setIconSize(QSize(22, 22));
 
  636    stopRight->setToolTip(
"Blink Stop");
 
  637    text = 
"<b>Function:</b> Stop automatic timed blinking";
 
  638    stopRight->setWhatsThis(text);
 
  639    connect(stopRight, SIGNAL(released()), 
this, SLOT(
blinkStopRight()));
 
  641    QToolButton *startRight = 
new QToolButton();
 
  642    startRight->setIcon(QPixmap(toolIconDir + 
"/blinkStart.png"));
 
  643    startRight->setIconSize(QSize(22, 22));
 
  644    startRight->setToolTip(
"Blink Start");
 
  645    text = 
"<b>Function:</b> Start automatic timed blinking.  Cycles \ 
  646           through linked viewports at variable rate";
 
  647    startRight->setWhatsThis(text);
 
  648    connect(startRight, SIGNAL(released()), 
this, SLOT(
blinkStartRight()));
 
  657    text = 
"<b>Function:</b> Change automatic blink rate between " +
 
  664    rightBlinkLayout->addWidget(stopRight);
 
  665    rightBlinkLayout->addWidget(startRight);
 
  691    rightLayout->addWidget(blinkButton);
 
  692    rightLayout->addStretch();
 
  693    gridLayout->addLayout(rightLayout, row++, 1);
 
  698    setLayout(gridLayout);