Commit fdae9bac authored by Christopher Combs's avatar Christopher Combs
Browse files

Added Control Measure info to ControlMeasureEditWidget. Fixes #5067

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7962 41f8697f-d340-4b68-9986-7bafba869bb8
parent 6cfd27af
Loading
Loading
Loading
Loading
+68 −15
Original line number Diff line number Diff line
@@ -514,6 +514,24 @@ namespace Isis {
    vlayout->addWidget(m_slider);
    gridLayout->addLayout(vlayout, row++, 2);

    // Show sample / line for measure of chips shown
    m_leftSampLinePosition = new QLabel();
    m_leftSampLinePosition->setToolTip("Sample/Line under the crosshair");
    gridLayout->addWidget(m_leftSampLinePosition, row, 0);
    m_rightSampLinePosition = new QLabel();
    m_rightSampLinePosition->setToolTip("Sample/Line under the crosshair");
    gridLayout->addWidget(m_rightSampLinePosition, row++, 1);

    if (m_useGeometry) {
      //  Show lat / lon for measure of chips shown
      m_leftLatLonPosition = new QLabel();
      m_leftLatLonPosition->setToolTip("Latitude/Longitude under the crosshair");
      gridLayout->addWidget(m_leftLatLonPosition, row, 0);
      m_rightLatLonPosition = new QLabel();
      m_rightLatLonPosition->setToolTip("Latitude/Longitude under the crosshair");
      gridLayout->addWidget(m_rightLatLonPosition, row++, 1);
    }

    //  Add auto registration extension
    m_autoRegExtension = new QWidget;
    m_oldPosition = new QLabel;
@@ -842,11 +860,26 @@ namespace Isis {
   *   @history 2012-07-26 Tracie Sucharski - Added ability to link zooming between left and
   *                          right viewports.  TODO:  Re-think design, should this be put
   *                          somewhere else.  This was the fastest solution for now.
   *   @history 2017-08-03 Christopher Combs - Added label updates for sample, line, lat and lon
   */
  void ControlMeasureEditWidget::updateLeftPositionLabel(double zoomFactor) {
    QString pos = "Sample: " + QString::number(m_leftView->tackSample()) +
                  "    Line:  " + QString::number(m_leftView->tackLine());
    m_leftSampLinePosition->setText(pos);

    if (m_useGeometry) {
      //  Get lat/lon from point in left
      m_leftGroundMap->SetImage(m_leftView->tackSample(), m_leftView->tackLine());
      double lat = m_leftGroundMap->UniversalLatitude();
      double lon = m_leftGroundMap->UniversalLongitude();

      pos = "Latitude: " + QString::number(lat) +
            "    Longitude:  " + QString::number(lon);
      m_leftLatLonPosition->setText(pos);
    }

    //  Print zoom scale factor
    QString pos = "Zoom Factor: " + QString::number(zoomFactor);
    pos = "Zoom Factor: " + QString::number(zoomFactor);
    m_leftZoomFactor->setText(pos);

    //  If zooms are linked, make right match left
@@ -862,6 +895,9 @@ namespace Isis {
   * @param zoomFactor[in]  zoom factor
   *
   * @author Tracie Sucharski
   *
   * @internal
   *   @history 2017-08-03 Christopher Combs - Added label updates for sample, line, lat and lon
   */
  void ControlMeasureEditWidget::updateRightPositionLabel(double zoomFactor) {

@@ -871,10 +907,28 @@ namespace Isis {
      m_autoRegShown = false;
      m_autoRegExtension->hide();
      m_autoReg->setText("Register");
      m_autoReg->setToolTip("Sub-pixel register the right measure to the left. "
                            "<strong>Shortcut: R</strong>");
      m_autoReg->setShortcut(Qt::Key_R);
    }

    QString pos = "Sample: " + QString::number(m_rightView->tackSample()) +
                  "    Line:  " + QString::number(m_rightView->tackLine());
    m_rightSampLinePosition->setText(pos);

    if (m_useGeometry) {
      //  Get lat/lon from point in right
      m_rightGroundMap->SetImage(m_rightView->tackSample(), m_rightView->tackLine());
      double lat = m_rightGroundMap->UniversalLatitude();
      double lon = m_rightGroundMap->UniversalLongitude();

      pos = "Latitude: " + QString::number(lat) +
            "    Longitude:  " + QString::number(lon);
      m_rightLatLonPosition->setText(pos);
    }

    //  Print zoom scale factor
    QString pos = "Zoom Factor: " + QString::number(zoomFactor);
    pos = "Zoom Factor: " + QString::number(zoomFactor);
    m_rightZoomFactor->setText(pos);

  }
@@ -1716,4 +1770,3 @@ namespace Isis {
    m_rightView->loadView(*(m_blinkChipViewportListRight)[m_blinkIndexRight]);
  }
}
+19 −17
Original line number Diff line number Diff line
@@ -137,6 +137,8 @@ namespace Isis {
    *   @history 2016-04-28 Tracie Sucharski - Removed position information, this will be shown
    *                           in ControlNetEditor type view.  Added blink capability.
    *   @history 2016-06-27 Ian Humphrey - Updated documentation and coding standards. Fixes #4004.
    *   @history 2017-07-27  Christopher Combs - Added sample, line, lat, and lon labels.
    *                           Fixes #5067.
    *
    *   @todo  Re-think design of the change made on 2012-07-26.  The linking was put into
    *                          ::updateLeftPositionLabel because it was the fastest solution, but
@@ -268,17 +270,17 @@ namespace Isis {



      ControlPoint *m_editPoint;
      SerialNumberList *m_serialNumberList;
      QWidget *m_blinkExtension;
      QListWidget *m_blinkListWidget;
      ControlPoint *m_editPoint;            //!< The control point currently being edited
      SerialNumberList *m_serialNumberList; //!< The serial numbers for each measure of m_editpoint
      QWidget *m_blinkExtension;  //!< Widget for selecting images and timing to blink through them
      QListWidget *m_blinkListWidget;       //!< List of images being blinked through


      QDoubleSpinBox *m_blinkTimeBoxRight;
      bool m_timerOnRight;
      QTimer *m_timerRight;
      QList<ChipViewport *> m_blinkChipViewportListRight;
      unsigned char m_blinkIndexRight;
      QDoubleSpinBox *m_blinkTimeBoxRight;  //!< Input for time between image blinks
      bool m_timerOnRight;                  //!< Timer is on for right viewport
      QTimer *m_timerRight;                 //!< Timer for tracking image blink time
      QList<ChipViewport *> m_blinkChipViewportListRight;  //!< List of viewports to blink through
      unsigned char m_blinkIndexRight;                     //!< Index of image being blinked

  };
};
+25 −26
Original line number Diff line number Diff line
@@ -1606,4 +1606,3 @@ namespace Isis {
    ProgramLauncher::RunSystemCommand(command);
  }
}