Loading isis/src/qisis/objs/ControlPointEditWidget/ControlPointEditWidget.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -222,6 +222,8 @@ namespace Isis { m_cnetFileNameLabel = new QLabel("Control Network: " + m_cnetFileName); // Create a combobox to allow user to select either the default registration file or one of the // imported registration files. m_templateComboBox = new QComboBox(); m_templateComboBox->setToolTip("Choose a template file"); m_templateComboBox->setWhatsThis("FileName of the sub-pixel " Loading @@ -239,6 +241,7 @@ namespace Isis { QFormLayout *templateFileLayout = new QFormLayout(); templateFileLayout->addRow("Template File:", m_templateComboBox); // Set-up connections to give registration combobox functionality connect(m_templateComboBox, SIGNAL(activated(QString)), this, SLOT(setTemplateFile(QString))); connect(m_measureEditor, SIGNAL(setTemplateFailed(QString)), Loading isis/src/qisis/objs/Directory/Directory.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -1234,23 +1234,6 @@ namespace Isis { return; } // if (templateEditorWidget->textChanged()) { // QMessageBox *box = new QMessageBox(QMessageBox::NoIcon, QString("Current Template Has Unsaved Changes"), // QString("Would you like to save your current template?"), // NULL, qobject_cast<QWidget *>(parent()), Qt::Dialog); // QPushButton *save = box->addButton("Save", QMessageBox::AcceptRole); // box->addButton("Don't Save", QMessageBox::RejectRole); // QPushButton *cancel = box->addButton("Cancel", QMessageBox::NoRole); // box->exec(); // // if (box->clickedButton() == (QAbstractButton*)cancel) { // return; // } // else if (box->clickedButton() == (QAbstractButton*)save) { // templateEditorWidget->saveAsText(); // } // } m_templateEditorWidgets.removeAll(templateEditorWidget); m_project->setClean(false); } Loading isis/src/qisis/objs/Directory/ImportMapTemplateWorkOrder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ namespace Isis { } if (!m_list->isEmpty()) { project()->addMapTemplates(m_list); project()->addTemplates(m_list); project()->setClean(false); } Loading isis/src/qisis/objs/Directory/ImportRegistrationTemplateWorkOrder.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -154,11 +154,10 @@ namespace Isis { } if (!m_list->isEmpty()) { project()->addRegTemplates(m_list); project()->addTemplates(m_list); project()->setClean(false); } } Loading isis/src/qisis/objs/Project/Project.cpp +10 −21 Original line number Diff line number Diff line Loading @@ -1106,32 +1106,21 @@ namespace Isis { /** * Add new templates to m_mapTemplates and update project item model * Add new templates to m_mapTemplates or m_regTemplates and update project item model * * @param newFileList QList of FileNames for each new imported template */ void Project::addMapTemplates(TemplateList *templateList) { void Project::addTemplates(TemplateList *templateList) { foreach (Template *templateFile, *templateList) { connect( this, SIGNAL( projectRelocated(Project *) ), templateFile, SLOT( updateFileName(Project *) ) ); } if (templateList->type() == "maps") { m_mapTemplates->append(templateList); emit templatesAdded(templateList); } /** * Add new templates to m_regTemplates and update project item model * * @param newFileList QList of FileNames for each new imported template */ void Project::addRegTemplates(TemplateList *templateList) { foreach (Template *templateFile, *templateList) { connect( this, SIGNAL( projectRelocated(Project *) ), templateFile, SLOT( updateFileName(Project *) ) ); } else if (templateList->type() == "registrations") { m_regTemplates->append(templateList); } emit templatesAdded(templateList); } Loading Loading @@ -3076,12 +3065,12 @@ namespace Isis { } else if (localName == "mapTemplateLists") { foreach (TemplateList *templateList, m_mapTemplateLists) { m_project->addMapTemplates(templateList); m_project->addTemplates(templateList); } } else if (localName == "regTemplateLists") { foreach (TemplateList *templateList, m_regTemplateLists) { m_project->addRegTemplates(templateList); m_project->addTemplates(templateList); } } else if (localName == "workOrder") { Loading Loading
isis/src/qisis/objs/ControlPointEditWidget/ControlPointEditWidget.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -222,6 +222,8 @@ namespace Isis { m_cnetFileNameLabel = new QLabel("Control Network: " + m_cnetFileName); // Create a combobox to allow user to select either the default registration file or one of the // imported registration files. m_templateComboBox = new QComboBox(); m_templateComboBox->setToolTip("Choose a template file"); m_templateComboBox->setWhatsThis("FileName of the sub-pixel " Loading @@ -239,6 +241,7 @@ namespace Isis { QFormLayout *templateFileLayout = new QFormLayout(); templateFileLayout->addRow("Template File:", m_templateComboBox); // Set-up connections to give registration combobox functionality connect(m_templateComboBox, SIGNAL(activated(QString)), this, SLOT(setTemplateFile(QString))); connect(m_measureEditor, SIGNAL(setTemplateFailed(QString)), Loading
isis/src/qisis/objs/Directory/Directory.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -1234,23 +1234,6 @@ namespace Isis { return; } // if (templateEditorWidget->textChanged()) { // QMessageBox *box = new QMessageBox(QMessageBox::NoIcon, QString("Current Template Has Unsaved Changes"), // QString("Would you like to save your current template?"), // NULL, qobject_cast<QWidget *>(parent()), Qt::Dialog); // QPushButton *save = box->addButton("Save", QMessageBox::AcceptRole); // box->addButton("Don't Save", QMessageBox::RejectRole); // QPushButton *cancel = box->addButton("Cancel", QMessageBox::NoRole); // box->exec(); // // if (box->clickedButton() == (QAbstractButton*)cancel) { // return; // } // else if (box->clickedButton() == (QAbstractButton*)save) { // templateEditorWidget->saveAsText(); // } // } m_templateEditorWidgets.removeAll(templateEditorWidget); m_project->setClean(false); } Loading
isis/src/qisis/objs/Directory/ImportMapTemplateWorkOrder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ namespace Isis { } if (!m_list->isEmpty()) { project()->addMapTemplates(m_list); project()->addTemplates(m_list); project()->setClean(false); } Loading
isis/src/qisis/objs/Directory/ImportRegistrationTemplateWorkOrder.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -154,11 +154,10 @@ namespace Isis { } if (!m_list->isEmpty()) { project()->addRegTemplates(m_list); project()->addTemplates(m_list); project()->setClean(false); } } Loading
isis/src/qisis/objs/Project/Project.cpp +10 −21 Original line number Diff line number Diff line Loading @@ -1106,32 +1106,21 @@ namespace Isis { /** * Add new templates to m_mapTemplates and update project item model * Add new templates to m_mapTemplates or m_regTemplates and update project item model * * @param newFileList QList of FileNames for each new imported template */ void Project::addMapTemplates(TemplateList *templateList) { void Project::addTemplates(TemplateList *templateList) { foreach (Template *templateFile, *templateList) { connect( this, SIGNAL( projectRelocated(Project *) ), templateFile, SLOT( updateFileName(Project *) ) ); } if (templateList->type() == "maps") { m_mapTemplates->append(templateList); emit templatesAdded(templateList); } /** * Add new templates to m_regTemplates and update project item model * * @param newFileList QList of FileNames for each new imported template */ void Project::addRegTemplates(TemplateList *templateList) { foreach (Template *templateFile, *templateList) { connect( this, SIGNAL( projectRelocated(Project *) ), templateFile, SLOT( updateFileName(Project *) ) ); } else if (templateList->type() == "registrations") { m_regTemplates->append(templateList); } emit templatesAdded(templateList); } Loading Loading @@ -3076,12 +3065,12 @@ namespace Isis { } else if (localName == "mapTemplateLists") { foreach (TemplateList *templateList, m_mapTemplateLists) { m_project->addMapTemplates(templateList); m_project->addTemplates(templateList); } } else if (localName == "regTemplateLists") { foreach (TemplateList *templateList, m_regTemplateLists) { m_project->addRegTemplates(templateList); m_project->addTemplates(templateList); } } else if (localName == "workOrder") { Loading