Loading isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.cpp +0 −39 Original line number Diff line number Diff line Loading @@ -1451,45 +1451,6 @@ namespace Isis { stream.writeEndElement(); //end bundleSolutionInfo } #if 0 /** * Saves the BundleSolutionInfo to the project * * @param stream The stream to which the BundleSolutionInfo will be saved * @param project The project to which this BundleSolutionInfo will be saved */ void BundleSolutionInfo::save(QXmlStreamWriter &stream, const Project *project) const { stream.writeStartElement("bundleSolutionInfo"); // save ID, cnet file name, and run time to stream stream.writeStartElement("generalAttributes"); stream.writeTextElement("id", m_id->toString()); stream.writeTextElement("runTime", runTime()); stream.writeTextElement("fileName", m_controlNetworkFileName->expanded()); stream.writeTextElement("imagesCSV", m_csvSavedImagesFilename); stream.writeTextElement("pointsCSV", m_csvSavedPointsFilename); stream.writeTextElement("residualsCSV", m_csvSavedResidualsFilename); stream.writeEndElement(); // end general attributes // save settings to stream m_settings->save(stream, project); // save statistics to stream m_statisticsResults->save(stream, project); // save image lists to stream if ( m_images && !m_images->isEmpty() ) { stream.writeStartElement("imageLists"); for (int i = 0; i < m_images->count(); i++) { m_images->at(i)->save(stream, project, ""); } stream.writeEndElement(); } stream.writeEndElement(); //end bundleSolutionInfo } #endif /** * Create an XML Handler (reader) that can populate the BundleSolutionInfo class data. See Loading isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.h +0 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,6 @@ namespace Isis { bool outputResiduals(); void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const; // void save(QXmlStreamWriter &stream, const Project *project) const; public slots: void updateFileName(Project *); Loading isis/src/qisis/objs/Directory/BundleObservationViewWorkOrder.cpp 0 → 100755 +121 −0 Original line number Diff line number Diff line /** * @file * * Unless noted otherwise, the portions of Isis written by the USGS are * public domain. See individual third-party library and package descriptions * for intellectual property information, user agreements, and related * information. * * Although Isis has been used by the USGS, no warranty, expressed or * implied, is made by the USGS as to the accuracy and functioning of such * software and related material nor shall the fact of distribution * constitute any such warranty, and no responsibility is assumed by the * USGS in connection therewith. * * For additional information, launch * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html * in a browser or see the Privacy & Disclaimers page on the Isis website, * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on * http://www.usgs.gov/privacy.html. */ #include "BundleObservationViewWorkOrder.h" #include <QtDebug> #include "Directory.h" #include "BundleObservationView.h" #include "Project.h" namespace Isis { /** * Creates a work order to view BundleObservation. This WorkOrder is not undoable and runs * synchronously. * * @param Project *project Pointer to the project this work order belongs to. */ BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(Project *project) : WorkOrder(project) { m_isUndoable = false; QAction::setText(tr("View &Bundle Observation...")); QUndoCommand::setText(tr("View &Bundle Observation...")); } /** * @brief Copy constructor, creates a copy of the other BundleObservationViewWorkOrder. * * @param BundleObservationViewWorkOrder &other The other work order to copy state from. */ BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(const BundleObservationViewWorkOrder &other) : WorkOrder(other) { m_isUndoable = other.m_isUndoable; } /** * @brief Destructor to clean up any memory that this work order allocates. */ BundleObservationViewWorkOrder::~BundleObservationViewWorkOrder() { } /** * @brief This method clones the current BundleObservationViewWorkOrder and returns it. * * @return @b BundleObservationViewWorkOrder that was cloned */ BundleObservationViewWorkOrder *BundleObservationViewWorkOrder::clone() const { return new BundleObservationViewWorkOrder(*this); } /** * @brief * False if none of the images has a footprint. This is used by * Directory::supportedActions(DataType data) to determine what actions are appended * to context menus. * * @param images ImageList of images * * @return @b bool True if one of the images in ImagesList images isFootprintable */ bool BundleObservationViewWorkOrder::isExecutable(BundleObservation *bundleObservation) { bool result = false; if (bundleObservation) { result = true; } return result; } /** * @brief Setup this WorkOrder for execution. * * @return @b bool True if WorkOrder::execute() returns true and BundleObservationView can be * displayed, otherwise return False. */ bool BundleObservationViewWorkOrder::setupExecution() { bool success = WorkOrder::setupExecution(); return success; } /** * @brief This adds a new BundleObservationView to the project. * * @todo When BundleObservation is serialized, get the BundleObservation and pass * into Directory::addBundleObservationView. * */ void BundleObservationViewWorkOrder::execute() { //ProjectItem * selectedItem = project()->directory()->model()->selectedItems(); project()->directory()->addBundleObservationView(NULL); } } isis/src/qisis/objs/Directory/BundleObservationViewWorkOrder.h 0 → 100755 +59 −0 Original line number Diff line number Diff line #ifndef BundleObservationViewWorkOrder_H #define BundleObservationViewWorkOrder_H /** * @file * * Unless noted otherwise, the portions of Isis written by the USGS are * public domain. See individual third-party library and package descriptions * for intellectual property information, user agreements, and related * information. * * Although Isis has been used by the USGS, no warranty, expressed or * implied, is made by the USGS as to the accuracy and functioning of such * software and related material nor shall the fact of distribution * constitute any such warranty, and no responsibility is assumed by the * USGS in connection therewith. * * For additional information, launch * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html * in a browser or see the Privacy & Disclaimers page on the Isis website, * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on * http://www.usgs.gov/privacy.html. */ #include "WorkOrder.h" namespace Isis { class Project; class BundleObservation; /** * * This is a child of the WorkOrder class which is used for anything that performs an action in a * Project. This WorkOrder adds a BundleObservationView to the project. This runs synchronously * and is not undoable. * * @todo Some thought should probably be given to whether we actually want view WorkOrders to be * saved in the history. * * @author 2017-05-04 Tracie Sucharski * * @internal */ class BundleObservationViewWorkOrder : public WorkOrder { Q_OBJECT public: BundleObservationViewWorkOrder(Project *project); BundleObservationViewWorkOrder(const BundleObservationViewWorkOrder &other); ~BundleObservationViewWorkOrder(); virtual BundleObservationViewWorkOrder *clone() const; virtual bool isExecutable(BundleObservation * bundleObservation); virtual bool setupExecution(); virtual void execute(); private: BundleObservationViewWorkOrder &operator=(const BundleObservationViewWorkOrder &rhs); }; } #endif isis/src/qisis/objs/Directory/Directory.cpp +34 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ #include <QtDebug> #include <QMessageBox> #include "BundleObservation.h" #include "BundleObservationView.h" #include "BundleObservationViewWorkOrder.h" #include "ChipViewportsWidget.h" #include "CloseProjectWorkOrder.h" #include "CnetEditorViewWorkOrder.h" Loading Loading @@ -139,6 +141,7 @@ namespace Isis { createWorkOrder<RemoveImagesWorkOrder>(); createWorkOrder<TargetGetInfoWorkOrder>(); createWorkOrder<ImageFileListViewWorkOrder>(); createWorkOrder<BundleObservationViewWorkOrder>(); // Main menu actions m_exportControlNetWorkOrder = createWorkOrder<ExportControlNetWorkOrder>(); Loading Loading @@ -426,6 +429,28 @@ namespace Isis { } /** * @brief Add the BundleObservationView to the window. * @return @b (BundleObservationView *) The BundleObservationView displayed. */ BundleObservationView *Directory::addBundleObservationView(BundleObservation *bundleObservation) { BundleObservationView *result = new BundleObservationView(NULL); connect( result, SIGNAL( destroyed(QObject *) ), this, SLOT( cleanupBundleObservationViews() ) ); m_bundleObservationViews.append(result); result->setWindowTitle( tr("Bundle Observation View %1"). arg( m_bundleObservationViews.count() ) ); result->setObjectName( result->windowTitle() ); emit newWidgetAvailable(result); return result; } /** * @brief Add the widget for the cnet editor view to the window. * @param network Control net to edit. Loading Loading @@ -828,6 +853,14 @@ namespace Isis { } /** * @brief Removes pointers to deleted BundleObservationView objects. */ void Directory::cleanupBundleObservationViews() { m_bundleObservationViews.removeAll(NULL); } /** * @brief Removes pointers to deleted CnetEditorWidget objects. */ Loading Loading
isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.cpp +0 −39 Original line number Diff line number Diff line Loading @@ -1451,45 +1451,6 @@ namespace Isis { stream.writeEndElement(); //end bundleSolutionInfo } #if 0 /** * Saves the BundleSolutionInfo to the project * * @param stream The stream to which the BundleSolutionInfo will be saved * @param project The project to which this BundleSolutionInfo will be saved */ void BundleSolutionInfo::save(QXmlStreamWriter &stream, const Project *project) const { stream.writeStartElement("bundleSolutionInfo"); // save ID, cnet file name, and run time to stream stream.writeStartElement("generalAttributes"); stream.writeTextElement("id", m_id->toString()); stream.writeTextElement("runTime", runTime()); stream.writeTextElement("fileName", m_controlNetworkFileName->expanded()); stream.writeTextElement("imagesCSV", m_csvSavedImagesFilename); stream.writeTextElement("pointsCSV", m_csvSavedPointsFilename); stream.writeTextElement("residualsCSV", m_csvSavedResidualsFilename); stream.writeEndElement(); // end general attributes // save settings to stream m_settings->save(stream, project); // save statistics to stream m_statisticsResults->save(stream, project); // save image lists to stream if ( m_images && !m_images->isEmpty() ) { stream.writeStartElement("imageLists"); for (int i = 0; i < m_images->count(); i++) { m_images->at(i)->save(stream, project, ""); } stream.writeEndElement(); } stream.writeEndElement(); //end bundleSolutionInfo } #endif /** * Create an XML Handler (reader) that can populate the BundleSolutionInfo class data. See Loading
isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.h +0 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,6 @@ namespace Isis { bool outputResiduals(); void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const; // void save(QXmlStreamWriter &stream, const Project *project) const; public slots: void updateFileName(Project *); Loading
isis/src/qisis/objs/Directory/BundleObservationViewWorkOrder.cpp 0 → 100755 +121 −0 Original line number Diff line number Diff line /** * @file * * Unless noted otherwise, the portions of Isis written by the USGS are * public domain. See individual third-party library and package descriptions * for intellectual property information, user agreements, and related * information. * * Although Isis has been used by the USGS, no warranty, expressed or * implied, is made by the USGS as to the accuracy and functioning of such * software and related material nor shall the fact of distribution * constitute any such warranty, and no responsibility is assumed by the * USGS in connection therewith. * * For additional information, launch * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html * in a browser or see the Privacy & Disclaimers page on the Isis website, * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on * http://www.usgs.gov/privacy.html. */ #include "BundleObservationViewWorkOrder.h" #include <QtDebug> #include "Directory.h" #include "BundleObservationView.h" #include "Project.h" namespace Isis { /** * Creates a work order to view BundleObservation. This WorkOrder is not undoable and runs * synchronously. * * @param Project *project Pointer to the project this work order belongs to. */ BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(Project *project) : WorkOrder(project) { m_isUndoable = false; QAction::setText(tr("View &Bundle Observation...")); QUndoCommand::setText(tr("View &Bundle Observation...")); } /** * @brief Copy constructor, creates a copy of the other BundleObservationViewWorkOrder. * * @param BundleObservationViewWorkOrder &other The other work order to copy state from. */ BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(const BundleObservationViewWorkOrder &other) : WorkOrder(other) { m_isUndoable = other.m_isUndoable; } /** * @brief Destructor to clean up any memory that this work order allocates. */ BundleObservationViewWorkOrder::~BundleObservationViewWorkOrder() { } /** * @brief This method clones the current BundleObservationViewWorkOrder and returns it. * * @return @b BundleObservationViewWorkOrder that was cloned */ BundleObservationViewWorkOrder *BundleObservationViewWorkOrder::clone() const { return new BundleObservationViewWorkOrder(*this); } /** * @brief * False if none of the images has a footprint. This is used by * Directory::supportedActions(DataType data) to determine what actions are appended * to context menus. * * @param images ImageList of images * * @return @b bool True if one of the images in ImagesList images isFootprintable */ bool BundleObservationViewWorkOrder::isExecutable(BundleObservation *bundleObservation) { bool result = false; if (bundleObservation) { result = true; } return result; } /** * @brief Setup this WorkOrder for execution. * * @return @b bool True if WorkOrder::execute() returns true and BundleObservationView can be * displayed, otherwise return False. */ bool BundleObservationViewWorkOrder::setupExecution() { bool success = WorkOrder::setupExecution(); return success; } /** * @brief This adds a new BundleObservationView to the project. * * @todo When BundleObservation is serialized, get the BundleObservation and pass * into Directory::addBundleObservationView. * */ void BundleObservationViewWorkOrder::execute() { //ProjectItem * selectedItem = project()->directory()->model()->selectedItems(); project()->directory()->addBundleObservationView(NULL); } }
isis/src/qisis/objs/Directory/BundleObservationViewWorkOrder.h 0 → 100755 +59 −0 Original line number Diff line number Diff line #ifndef BundleObservationViewWorkOrder_H #define BundleObservationViewWorkOrder_H /** * @file * * Unless noted otherwise, the portions of Isis written by the USGS are * public domain. See individual third-party library and package descriptions * for intellectual property information, user agreements, and related * information. * * Although Isis has been used by the USGS, no warranty, expressed or * implied, is made by the USGS as to the accuracy and functioning of such * software and related material nor shall the fact of distribution * constitute any such warranty, and no responsibility is assumed by the * USGS in connection therewith. * * For additional information, launch * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html * in a browser or see the Privacy & Disclaimers page on the Isis website, * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on * http://www.usgs.gov/privacy.html. */ #include "WorkOrder.h" namespace Isis { class Project; class BundleObservation; /** * * This is a child of the WorkOrder class which is used for anything that performs an action in a * Project. This WorkOrder adds a BundleObservationView to the project. This runs synchronously * and is not undoable. * * @todo Some thought should probably be given to whether we actually want view WorkOrders to be * saved in the history. * * @author 2017-05-04 Tracie Sucharski * * @internal */ class BundleObservationViewWorkOrder : public WorkOrder { Q_OBJECT public: BundleObservationViewWorkOrder(Project *project); BundleObservationViewWorkOrder(const BundleObservationViewWorkOrder &other); ~BundleObservationViewWorkOrder(); virtual BundleObservationViewWorkOrder *clone() const; virtual bool isExecutable(BundleObservation * bundleObservation); virtual bool setupExecution(); virtual void execute(); private: BundleObservationViewWorkOrder &operator=(const BundleObservationViewWorkOrder &rhs); }; } #endif
isis/src/qisis/objs/Directory/Directory.cpp +34 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ #include <QtDebug> #include <QMessageBox> #include "BundleObservation.h" #include "BundleObservationView.h" #include "BundleObservationViewWorkOrder.h" #include "ChipViewportsWidget.h" #include "CloseProjectWorkOrder.h" #include "CnetEditorViewWorkOrder.h" Loading Loading @@ -139,6 +141,7 @@ namespace Isis { createWorkOrder<RemoveImagesWorkOrder>(); createWorkOrder<TargetGetInfoWorkOrder>(); createWorkOrder<ImageFileListViewWorkOrder>(); createWorkOrder<BundleObservationViewWorkOrder>(); // Main menu actions m_exportControlNetWorkOrder = createWorkOrder<ExportControlNetWorkOrder>(); Loading Loading @@ -426,6 +429,28 @@ namespace Isis { } /** * @brief Add the BundleObservationView to the window. * @return @b (BundleObservationView *) The BundleObservationView displayed. */ BundleObservationView *Directory::addBundleObservationView(BundleObservation *bundleObservation) { BundleObservationView *result = new BundleObservationView(NULL); connect( result, SIGNAL( destroyed(QObject *) ), this, SLOT( cleanupBundleObservationViews() ) ); m_bundleObservationViews.append(result); result->setWindowTitle( tr("Bundle Observation View %1"). arg( m_bundleObservationViews.count() ) ); result->setObjectName( result->windowTitle() ); emit newWidgetAvailable(result); return result; } /** * @brief Add the widget for the cnet editor view to the window. * @param network Control net to edit. Loading Loading @@ -828,6 +853,14 @@ namespace Isis { } /** * @brief Removes pointers to deleted BundleObservationView objects. */ void Directory::cleanupBundleObservationViews() { m_bundleObservationViews.removeAll(NULL); } /** * @brief Removes pointers to deleted CnetEditorWidget objects. */ Loading