Commit c0385d84 authored by Ken Edmundson's avatar Ken Edmundson
Browse files

PROG: Added bundle output control network file name. Added method...

PROG: Added bundle output control network file name. Added method on_controlNetworkComboBox_currentTextChanged to update the output control network filename when the input control network selected filename changes. E.g. if input control net name is fred.net, the output filename QLineEdit is automatically changed to fred-out.net. The user can always manually change the output control net name to anything they choose.
parent c9f7017e
Loading
Loading
Loading
Loading
+24 −3
Original line number Diff line number Diff line
@@ -60,6 +60,19 @@ namespace Isis {
        m_ui->controlNetworkComboBox->addItem(control->displayProperties()->displayName(), v);
      }
    }
    // add control nets from bundle solutions, if any
    int numBundles = project->bundleSolutionInfo().size();
    for (int i = 0; i < numBundles; i++) {
      Control *bundleControl = project->bundleSolutionInfo().at(i)->control();

      QVariant v = qVariantFromValue((void*)bundleControl);

      m_ui->controlNetworkComboBox->addItem(bundleControl->displayProperties()->displayName(), v);
    }

    // initialize default output control network filename
    FileName fname = m_ui->controlNetworkComboBox->currentText();
    m_ui->outputControlNet->setText(fname.baseName() + "-out.net");

    QList<BundleSolutionInfo *> bundleSolutionInfo = m_project->bundleSolutionInfo();
    if (useLastSettings && bundleSolutionInfo.size() > 0) {
@@ -67,7 +80,7 @@ namespace Isis {
     // Retrieve the control net name used in the last bundle adjustment.
     // Note that this returns a fully specified path and filename, while the cnet combo box
     // only stores file names.
     selectControl(bundleSolutionInfo.last()->controlNetworkFileName());
     selectControl(bundleSolutionInfo.last()->inputControlNetFileName());
     fillFromSettings(lastBundleSettings);
    }

@@ -86,8 +99,6 @@ namespace Isis {

    m_ui->pointingAprioriSigmaTable->setHorizontalHeaderLabels(tableHeaders);



    // initializations for target body tab

    // fill target combo box from project
@@ -679,6 +690,11 @@ namespace Isis {
  }


  QString JigsawSetupDialog::outputControlName() {
    return QString(m_ui->outputControlNet->text());
  }


  void JigsawSetupDialog::makeReadOnly() {
    m_ui->controlNetworkComboBox->setEnabled(false);
    m_ui->observationModeCheckBox->setEnabled(false);
@@ -1100,4 +1116,9 @@ namespace Isis {
  void JigsawSetupDialog::hideTargetParametersGroupBox() {
    m_ui->targetParametersGroupBox->setEnabled(false);
  }

  void Isis::JigsawSetupDialog::on_controlNetworkComboBox_currentTextChanged(const QString &arg1) {
    FileName fname = arg1;
    m_ui->outputControlNet->setText(fname.baseName() + "-out.net");
  }
}
+12 −3
Original line number Diff line number Diff line
@@ -50,6 +50,13 @@ namespace Isis {
   *                           allows for proper restoring of user defined weightings.
   *   @history 2017-08-14 Summer Stapleton - Updated icons/images to properly licensed or open 
   *                           source images. Fixes #5105.
   *   @history 2018-03-19 Ken Edmundson - Added bundle output control network file name. Added
   *                           method on_controlNetworkComboBox_currentTextChanged to update the
   *                           output control network filename when the input control network
   *                           selected filename changes. E.g. if input control net name is
   *                           fred.net, the output filename QLineEdit is automatically changed to
   *                           fred-out.net. The user can always manually change the output control
   *                           net name to anything they choose.
   */

  class JigsawSetupDialog : public QDialog {
@@ -65,6 +72,7 @@ namespace Isis {

    Control *selectedControl();                                 // TODO: return const references ???
    QString selectedControlName();                              // TODO: return const references ???
    QString outputControlName();                                // TODO: return const references ???
    BundleSettingsQsp bundleSettings();                         // TODO: return const references ???

    void loadSettings(const BundleSettingsQsp settings);
@@ -78,6 +86,7 @@ namespace Isis {
    // general tab
    void on_positionComboBox_currentIndexChanged(int index);
    void on_pointingComboBox_currentIndexChanged(int index);
    void on_controlNetworkComboBox_currentTextChanged(const QString &arg1);

    // maximum liklihood tab
    void on_maximumLikelihoodModel1ComboBox_currentIndexChanged(int index);