Loading isis/src/qisis/apps/ipce/IpceMainWindow.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ #include "FileName.h" #include "IException.h" #include "IString.h" #include "JigsawDialog.h" #include "MosaicSceneWidget.h" #include "ProgressWidget.h" #include "Project.h" Loading Loading @@ -216,7 +217,8 @@ namespace Isis { void IpceMainWindow::addView(QWidget *newWidget) { if ( qobject_cast<SensorInfoWidget *>(newWidget) || qobject_cast<TargetInfoWidget *>(newWidget) || qobject_cast<TemplateEditorWidget *>(newWidget)) { qobject_cast<TemplateEditorWidget *>(newWidget)|| qobject_cast<JigsawDialog *>(newWidget)) { QDockWidget *dock = new QDockWidget( newWidget->windowTitle() ); dock->setAttribute(Qt::WA_DeleteOnClose, true); dock->setWidget(newWidget); Loading isis/src/qisis/objs/Directory/Directory.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ #include "ImportImagesWorkOrder.h" #include "ImportShapesWorkOrder.h" #include "ImportTemplateWorkOrder.h" #include "JigsawDialog.h" #include "JigsawWorkOrder.h" #include "MatrixSceneWidget.h" #include "MatrixViewWorkOrder.h" Loading Loading @@ -933,6 +934,17 @@ namespace Isis { return result; } JigsawDialog *Directory::addJigsawView() { JigsawDialog *result = new JigsawDialog(m_project); result->setAttribute(Qt::WA_DeleteOnClose); result->show(); emit newWidgetAvailable(result); return result; } /** * @brief Add sensor data view widget to the window. Loading isis/src/qisis/objs/Directory/Directory.h +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ namespace Isis { class Footprint2DView; class HistoryTreeWidget; class ImageFileListWidget; class JigsawDialog; class MatrixSceneWidget; class MosaicSceneWidget; class Project; Loading Loading @@ -253,6 +254,7 @@ namespace Isis { CnetEditorView *addCnetEditorView(Control *control); CubeDnView *addCubeDnView(); Footprint2DView *addFootprint2DView(); JigsawDialog *addJigsawView(); MatrixSceneWidget *addMatrixView(); TargetInfoWidget *addTargetInfoView(TargetBodyQsp target); TemplateEditorWidget *addTemplateEditorView(Template *currentTemplate); Loading isis/src/qisis/objs/Directory/JigsawWorkOrder.cpp +21 −40 Original line number Diff line number Diff line Loading @@ -114,38 +114,25 @@ namespace Isis { bool JigsawWorkOrder::setupExecution() { bool success = WorkOrder::setupExecution(); if (success) { QStringList internalData; // Create a blocking setup dialog initially and check to make sure we get valid info JigsawSetupDialog setup(project()); if (setup.exec() == QDialog::Accepted) { m_bundleSettings = setup.bundleSettings(); if (setup.selectedControl()) { internalData.append(QStringList(setup.selectedControl()->id())); } // This else should not happen, the work order should be disabled if there are no controls. else { QString msg = "Cannot run a bundle adjustment without a selected control network."; QMessageBox::critical(qobject_cast<QWidget *>(parent()), "Error", msg); success = false; } // set output control network file name if (!setup.outputControlName().isEmpty()) { internalData.append(setup.outputControlName()); } else { QString msg = "You must set an output control network filename."; QMessageBox::critical(qobject_cast<QWidget *>(parent()), "Error", msg); success = false; } } else { success = false; } setInternalData(internalData); } // if (success) { // // Create a blocking setup dialog initially and check to make sure we get valid info // JigsawSetupDialog setup(project()); // if (setup.exec() == QDialog::Accepted) { // m_bundleSettings = setup.bundleSettings(); // if (setup.selectedControl()) { // setInternalData(QStringList(setup.selectedControl()->id())); // } // // This else should not happen, the work order should be disabled if there are no controls. // else { // QString msg = "Cannot run a bundle adjustment without a selected control network."; // QMessageBox::critical(qobject_cast<QWidget *>(parent()), "Error", msg); // success = false; // } // } // else { // success = false; // } // } return success; } Loading Loading @@ -176,13 +163,7 @@ namespace Isis { Project *proj = project(); // Get the selected control and bundle settings and give them to the JigsawDialog for now. Control *selectedControl = proj->control(internalData().first()); QString outputControlFileName = internalData().at(1); JigsawDialog *runDialog = new JigsawDialog(project(), m_bundleSettings, selectedControl, outputControlFileName); runDialog->setAttribute(Qt::WA_DeleteOnClose); runDialog->show(); // Control *selectedControl = project()->control(internalData().first()); JigsawDialog *runDialog = project()->directory()->addJigsawView(); } } isis/src/qisis/objs/JigsawDialog/JigsawDialog.cpp +10 −11 Original line number Diff line number Diff line Loading @@ -34,8 +34,7 @@ namespace Isis { * @param Project *project Pointer to the project this dialog belongs to. * @param QWidget *parent Pointer to parent widget. */ JigsawDialog::JigsawDialog(Project *project, QWidget *parent) : QDialog(parent), m_ui(new Ui::JigsawDialog) { JigsawDialog::JigsawDialog(Project *project, QWidget *parent) : m_ui(new Ui::JigsawDialog) { m_project = project; m_selectedControl = NULL; init(); Loading @@ -56,8 +55,8 @@ namespace Isis { JigsawDialog::JigsawDialog(Project *project, BundleSettingsQsp bundleSettings, Control *selectedControl, QString outputControlFileName, QWidget *parent) : QDialog(parent), m_ui(new Ui::JigsawDialog) { QWidget *parent) : m_ui(new Ui::JigsawDialog) { m_project = project; m_bundleSettings = bundleSettings; m_selectedControl = selectedControl; Loading Loading @@ -101,12 +100,12 @@ namespace Isis { 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())); // Reject will handle discarding the results. connect(m_reject, SIGNAL(clicked(bool)), this, SLOT(rejectBundleResults())); // // Accept will handle saving the results. // connect(m_accept, SIGNAL(clicked(bool)), // this, SLOT(acceptBundleResults())); // // Reject will handle discarding the results. // connect(m_reject, SIGNAL(clicked(bool)), // this, SLOT(rejectBundleResults())); m_bundleAdjust = NULL; m_bundleSolutionInfo = NULL; Loading @@ -130,7 +129,7 @@ namespace Isis { m_ui->useLastSettings->setToolTip(lastSettingsToolTip); m_ui->useLastSettings->setWhatsThis(lastSettingsWhat); setWindowFlags(Qt::WindowStaysOnTopHint); // setWindowFlags(Qt::WindowStaysOnTopHint); } Loading Loading
isis/src/qisis/apps/ipce/IpceMainWindow.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ #include "FileName.h" #include "IException.h" #include "IString.h" #include "JigsawDialog.h" #include "MosaicSceneWidget.h" #include "ProgressWidget.h" #include "Project.h" Loading Loading @@ -216,7 +217,8 @@ namespace Isis { void IpceMainWindow::addView(QWidget *newWidget) { if ( qobject_cast<SensorInfoWidget *>(newWidget) || qobject_cast<TargetInfoWidget *>(newWidget) || qobject_cast<TemplateEditorWidget *>(newWidget)) { qobject_cast<TemplateEditorWidget *>(newWidget)|| qobject_cast<JigsawDialog *>(newWidget)) { QDockWidget *dock = new QDockWidget( newWidget->windowTitle() ); dock->setAttribute(Qt::WA_DeleteOnClose, true); dock->setWidget(newWidget); Loading
isis/src/qisis/objs/Directory/Directory.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ #include "ImportImagesWorkOrder.h" #include "ImportShapesWorkOrder.h" #include "ImportTemplateWorkOrder.h" #include "JigsawDialog.h" #include "JigsawWorkOrder.h" #include "MatrixSceneWidget.h" #include "MatrixViewWorkOrder.h" Loading Loading @@ -933,6 +934,17 @@ namespace Isis { return result; } JigsawDialog *Directory::addJigsawView() { JigsawDialog *result = new JigsawDialog(m_project); result->setAttribute(Qt::WA_DeleteOnClose); result->show(); emit newWidgetAvailable(result); return result; } /** * @brief Add sensor data view widget to the window. Loading
isis/src/qisis/objs/Directory/Directory.h +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ namespace Isis { class Footprint2DView; class HistoryTreeWidget; class ImageFileListWidget; class JigsawDialog; class MatrixSceneWidget; class MosaicSceneWidget; class Project; Loading Loading @@ -253,6 +254,7 @@ namespace Isis { CnetEditorView *addCnetEditorView(Control *control); CubeDnView *addCubeDnView(); Footprint2DView *addFootprint2DView(); JigsawDialog *addJigsawView(); MatrixSceneWidget *addMatrixView(); TargetInfoWidget *addTargetInfoView(TargetBodyQsp target); TemplateEditorWidget *addTemplateEditorView(Template *currentTemplate); Loading
isis/src/qisis/objs/Directory/JigsawWorkOrder.cpp +21 −40 Original line number Diff line number Diff line Loading @@ -114,38 +114,25 @@ namespace Isis { bool JigsawWorkOrder::setupExecution() { bool success = WorkOrder::setupExecution(); if (success) { QStringList internalData; // Create a blocking setup dialog initially and check to make sure we get valid info JigsawSetupDialog setup(project()); if (setup.exec() == QDialog::Accepted) { m_bundleSettings = setup.bundleSettings(); if (setup.selectedControl()) { internalData.append(QStringList(setup.selectedControl()->id())); } // This else should not happen, the work order should be disabled if there are no controls. else { QString msg = "Cannot run a bundle adjustment without a selected control network."; QMessageBox::critical(qobject_cast<QWidget *>(parent()), "Error", msg); success = false; } // set output control network file name if (!setup.outputControlName().isEmpty()) { internalData.append(setup.outputControlName()); } else { QString msg = "You must set an output control network filename."; QMessageBox::critical(qobject_cast<QWidget *>(parent()), "Error", msg); success = false; } } else { success = false; } setInternalData(internalData); } // if (success) { // // Create a blocking setup dialog initially and check to make sure we get valid info // JigsawSetupDialog setup(project()); // if (setup.exec() == QDialog::Accepted) { // m_bundleSettings = setup.bundleSettings(); // if (setup.selectedControl()) { // setInternalData(QStringList(setup.selectedControl()->id())); // } // // This else should not happen, the work order should be disabled if there are no controls. // else { // QString msg = "Cannot run a bundle adjustment without a selected control network."; // QMessageBox::critical(qobject_cast<QWidget *>(parent()), "Error", msg); // success = false; // } // } // else { // success = false; // } // } return success; } Loading Loading @@ -176,13 +163,7 @@ namespace Isis { Project *proj = project(); // Get the selected control and bundle settings and give them to the JigsawDialog for now. Control *selectedControl = proj->control(internalData().first()); QString outputControlFileName = internalData().at(1); JigsawDialog *runDialog = new JigsawDialog(project(), m_bundleSettings, selectedControl, outputControlFileName); runDialog->setAttribute(Qt::WA_DeleteOnClose); runDialog->show(); // Control *selectedControl = project()->control(internalData().first()); JigsawDialog *runDialog = project()->directory()->addJigsawView(); } }
isis/src/qisis/objs/JigsawDialog/JigsawDialog.cpp +10 −11 Original line number Diff line number Diff line Loading @@ -34,8 +34,7 @@ namespace Isis { * @param Project *project Pointer to the project this dialog belongs to. * @param QWidget *parent Pointer to parent widget. */ JigsawDialog::JigsawDialog(Project *project, QWidget *parent) : QDialog(parent), m_ui(new Ui::JigsawDialog) { JigsawDialog::JigsawDialog(Project *project, QWidget *parent) : m_ui(new Ui::JigsawDialog) { m_project = project; m_selectedControl = NULL; init(); Loading @@ -56,8 +55,8 @@ namespace Isis { JigsawDialog::JigsawDialog(Project *project, BundleSettingsQsp bundleSettings, Control *selectedControl, QString outputControlFileName, QWidget *parent) : QDialog(parent), m_ui(new Ui::JigsawDialog) { QWidget *parent) : m_ui(new Ui::JigsawDialog) { m_project = project; m_bundleSettings = bundleSettings; m_selectedControl = selectedControl; Loading Loading @@ -101,12 +100,12 @@ namespace Isis { 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())); // Reject will handle discarding the results. connect(m_reject, SIGNAL(clicked(bool)), this, SLOT(rejectBundleResults())); // // Accept will handle saving the results. // connect(m_accept, SIGNAL(clicked(bool)), // this, SLOT(acceptBundleResults())); // // Reject will handle discarding the results. // connect(m_reject, SIGNAL(clicked(bool)), // this, SLOT(rejectBundleResults())); m_bundleAdjust = NULL; m_bundleSolutionInfo = NULL; Loading @@ -130,7 +129,7 @@ namespace Isis { m_ui->useLastSettings->setToolTip(lastSettingsToolTip); m_ui->useLastSettings->setWhatsThis(lastSettingsWhat); setWindowFlags(Qt::WindowStaysOnTopHint); // setWindowFlags(Qt::WindowStaysOnTopHint); } Loading