Unverified Commit 18865033 authored by ihumphrey's avatar ihumphrey Committed by GitHub
Browse files

Merge pull request #204 from chrisryancombs/ipceBundleWindow

This fixes ticket #5428. (see PR #191).
parents e67b445e c4e8ae56
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -92,6 +92,20 @@ namespace Isis {
  }


/**
 * This method is no longer necessary and will remain commented out until it needs to be implemented 
 *  
 * If WorkOrder:setupExecution() returns true, this creates a setup dialog.   
 *    
 * When the setup is successful (i.e. the user does not cancel the dialog), this work order   
 * will be read to execute.   
 *    
 * @return bool Returns True if setup dialog for the bundle adjustment is successful.   
 */   
// bool JigsawWorkOrder::setupExecution() {    
// }


  /**
   * This check is used by Directory::supportedActions(DataType data).
   *
+10 −26
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@ namespace Isis {
  /**
   * @brief Constructor.
   *
   * Creates a dialog for running a jigsaw (bundle adjustment) and changing the solve settings.
   * Creates a widget for running a jigsaw (bundle adjustment) and changing the solve settings.
   *
   * @param Project *project Pointer to the project this dialog belongs to.
   * @param Project *project Pointer to the project this widget belongs to.
   * @param QWidget *parent Pointer to parent widget.
   */
  JigsawRunWidget::JigsawRunWidget(Project *project, QWidget *parent) : m_ui(new Ui::JigsawRunWidget) {
@@ -44,11 +44,11 @@ namespace Isis {
  /**
   * @brief Constructor that takes bundle settings and a selected control.
   *
   * Creates a dialog after the jigsaw solve settings have been set up and a control has been
   * Creates a widget after the jigsaw solve settings have been set up and a control has been
   * selected.
   *
   * @param Project *project Pointer to the project this dialog belongs to.
   * @param BundleSettingsQsp bundleSettings Settings to give to this dialog to use for a jigsaw.
   * @param Project *project Pointer to the project this widget belongs to.
   * @param BundleSettingsQsp bundleSettings Settings to give to this widget to use for a jigsaw.
   * @param Control *selectedControl Pointer to the selected control to adjust.
   * @param QWidget *parent Pointer to the parent widget.
   */
@@ -84,30 +84,21 @@ namespace Isis {
    // If aborting a bundle, only close will be enabled.
    m_accept = new QPushButton(tr("&Accept"));
    m_reject = new QPushButton(tr("&Reject"));
    m_close = new QPushButton(tr("&Close"));
    m_accept->setEnabled(false);
    m_reject->setEnabled(false);
    m_ui->JigsawRunButton->setEnabled(false);
    m_close->setEnabled(true);

    // Add tool tips to the buttons
    m_accept->setToolTip(tr("Accept the bundle results and save them to the project."));
    m_reject->setToolTip(tr("Reject and discard the bundle results. This resets the dialog."));
    m_close->setToolTip(tr("Close this dialog."));
    m_reject->setToolTip(tr("Reject and discard the bundle results. This resets the widget."));

    // Add the buttons to the QDialogButtonBox defined in the UI file.
    // Note that according to the Qt doc'n for QDialogButtonBox, addButton() causes the
    // dialog box to take ownership of the QPushButton's, so we don't manually manage their memory.
    m_ui->buttonBox->addButton(m_accept, QDialogButtonBox::ActionRole);
    m_ui->buttonBox->addButton(m_reject, QDialogButtonBox::ActionRole);
    m_ui->buttonBox->addButton(m_close, QDialogButtonBox::AcceptRole);

    // Accept will handle saving the results.
    connect(m_accept, SIGNAL(clicked(bool)),
           this, SLOT(acceptBundleResults()));
    connect(m_accept, SIGNAL(clicked(bool)), this, SLOT(acceptBundleResults()));
    // Reject will handle discarding the results.
    connect(m_reject, SIGNAL(clicked(bool)),
           this, SLOT(rejectBundleResults()));
    connect(m_reject, SIGNAL(clicked(bool)), this, SLOT(rejectBundleResults()));

    m_bundleAdjust = NULL;
    m_bundleSolutionInfo = NULL;
@@ -271,7 +262,6 @@ namespace Isis {

      // change "Run" button text to "Abort" (or maybe pause)
      m_bRunning = true;
      m_close->setEnabled(false);
      m_ui->JigsawRunButton->setText("&Abort");
      update();
    }
@@ -469,8 +459,6 @@ namespace Isis {

    // Make sure that when we add our results, we let the use last settings box be checkable.
    m_ui->useLastSettings->setEnabled(true);
    //  Once the bundle has been accepted, re-enable the close button
    m_close->setEnabled(true);

  //       m_ui->convergenceStatusLabel->setText("Bundle converged, camera pointing updated");
    //This bundle was bad so we should delete all remenants.
@@ -493,7 +481,6 @@ namespace Isis {
    // Disable the "Accept" and "Reject" buttons, enable the "Close" button
    m_accept->setEnabled(false);
    m_reject->setEnabled(false);
    m_close->setEnabled(true);

    // Clear the dialog so the lcd's are 0 and the status text is cleared.
    clearDialog();
@@ -559,9 +546,6 @@ namespace Isis {
    updateScrollBar();

    update();

    //  Re-enable the close button
    m_close->setEnabled(true);
  }


@@ -594,9 +578,9 @@ namespace Isis {


  /**
   * @brief Notifies the dialog that the bundle thread has finished.
   * @brief Notifies the widget that the bundle thread has finished.
   *
   * This slot is used to notify the dialog that the bundle has finished. The bundle thread
   * This slot is used to notify the widget that the bundle has finished. The bundle thread
   * finishes when the bundle adjust finishes (either successfully or unsuccessfully, or if the
   * user aborts the run).
   */
+2 −3
Original line number Diff line number Diff line
@@ -121,9 +121,8 @@ namespace Isis {

  private:
    bool m_bRunning; /**< Indicates whether or not the bundle adjust is running. */
    QPushButton *m_accept; /**< Dialog's accept button that is used to save the bundle results. */
    QPushButton *m_close; /**< Dialog's close button that is used to close the dialog. */
    QPushButton *m_reject; /**< Dialog's reject button that is used to discard the results. */
    QPushButton *m_accept; /**< widget's accept button that is used to save the bundle results. */
    QPushButton *m_reject; /**< widget's reject button that is used to discard the results. */

    /**
     * Functor used to copy images to a specified destination directory. This is used by