Loading isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ #include <QDataStream> #include <QDebug> #include <QList> #include <QString> #include <QStringList> #include <QUuid> #include <QXmlStreamWriter> Loading Loading @@ -142,6 +143,17 @@ namespace Isis { return *this; } QString BundleSolutionInfo::getSavedImagesFilename() { return m_csvSavedImagesFilename; } QString BundleSolutionInfo::getSavedPointsFilename() { return m_csvSavedPointsFilename; } QString BundleSolutionInfo::getSavedResidualsFilename() { return m_csvSavedResidualsFilename; } /** * Sets the stat results. Loading isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.h +4 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,10 @@ namespace Isis { ~BundleSolutionInfo(); BundleSolutionInfo &operator=(const BundleSolutionInfo &src); QString getSavedImagesFilename(); QString getSavedPointsFilename(); QString getSavedResidualsFilename(); void setOutputStatistics(BundleResults statisticsResults); void setRunTime(QString runTime); Loading isis/src/control/objs/BundleSolutionInfo/FileItem.h 0 → 100644 +49 −0 Original line number Diff line number Diff line #ifndef FileItem_h #define FileItem_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 <QSharedPointer> #include <QObject> namespace Isis { /** * @brief A container for a filename to be represented as a ProjectItem * on the project tree. * * @author 2017-05-04 J Bonn * * @internal */ class FileItem : public QObject { public: FileItem(const QString filename) : m_filename(filename) {}; QString getFileName() { return m_filename; }; private: QString m_filename; }; typedef QSharedPointer<FileItem> FileItemQsp; //!< A FileItem smart pointer } #endif // FileItem_h isis/src/qisis/objs/ProjectItem/ProjectItem.cpp +26 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,21 @@ namespace Isis { } /** * Constructs an item representing a file in the filesystem. * * @param[in] filename The full path to the file in the filesystem * @param[in] treetext The name displayed in the project tree * @param[in] filename A icon to display next to the treetext */ ProjectItem::ProjectItem(FileItemQsp filename, QString treeText, QIcon icon) { setEditable(false); setData(QVariant::fromValue<FileItemQsp>(filename)); setText(treeText); setIcon(icon); } /** * Constructs an item from a BundleResults. * Loading @@ -75,7 +90,6 @@ namespace Isis { ProjectItem::ProjectItem(BundleResults bundleResults) { setEditable(false); setBundleResults(bundleResults); // appendRow( new ProjectItem( bundleResults.correlationMatrix() ) ); } Loading Loading @@ -617,6 +631,17 @@ namespace Isis { } /** * Returns true if a FileItemQsp is stored in the data of the item. * Returns false otherwise. * * @return @b bool If a FileItemQsp is stored in the item or not. */ bool ProjectItem::isFileItem() const { return data().canConvert<FileItemQsp>(); } /** * Sets the text, icon, and data to those of another item. * Loading isis/src/qisis/objs/ProjectItem/ProjectItem.h +7 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ #define ProjectItem_h /** * @file * $Date$ * $Revision$ * * Unless noted otherwise, the portions of Isis written by the USGS are * public domain. See individual third-party library and package descriptions Loading @@ -29,6 +27,7 @@ #include "BundleSettings.h" #include "GuiCamera.h" #include "TargetBody.h" #include "FileItem.h" class QVariant; Loading @@ -48,6 +47,7 @@ namespace Isis { class Shape; class ShapeList; class TargetBodyList; class FileItemData; /** * Represents an item of a ProjectItemModel in Qt's model-view Loading Loading @@ -117,6 +117,8 @@ namespace Isis { * @history 2017-05-02 Tracie Sucharski - Get rid of Correlation Matrix in BundleResults, * change order of objects under BundleSolutionInfo. Change text on * some of BundleSolutionInfo items. Fixes #4822. * @history 2017-05-04 J Bonn -Added FileItem to project tree. m4838 * */ class ProjectItem : public QStandardItem { public: Loading @@ -141,6 +143,8 @@ namespace Isis { ProjectItem(QList<BundleSolutionInfo *> results); ProjectItem(TargetBodyQsp targetBody); ProjectItem(TargetBodyList *targetBodyList); ProjectItem(FileItemQsp filename, QString treeText, QIcon icon); ~ProjectItem(); Loading Loading @@ -171,6 +175,7 @@ namespace Isis { bool isProject() const; bool isGuiCamera() const; bool isTargetBody() const; bool isFileItem() const; void setProjectItem(ProjectItem *item); void setBundleResults(BundleResults bundleResults); Loading Loading
isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ #include <QDataStream> #include <QDebug> #include <QList> #include <QString> #include <QStringList> #include <QUuid> #include <QXmlStreamWriter> Loading Loading @@ -142,6 +143,17 @@ namespace Isis { return *this; } QString BundleSolutionInfo::getSavedImagesFilename() { return m_csvSavedImagesFilename; } QString BundleSolutionInfo::getSavedPointsFilename() { return m_csvSavedPointsFilename; } QString BundleSolutionInfo::getSavedResidualsFilename() { return m_csvSavedResidualsFilename; } /** * Sets the stat results. Loading
isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.h +4 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,10 @@ namespace Isis { ~BundleSolutionInfo(); BundleSolutionInfo &operator=(const BundleSolutionInfo &src); QString getSavedImagesFilename(); QString getSavedPointsFilename(); QString getSavedResidualsFilename(); void setOutputStatistics(BundleResults statisticsResults); void setRunTime(QString runTime); Loading
isis/src/control/objs/BundleSolutionInfo/FileItem.h 0 → 100644 +49 −0 Original line number Diff line number Diff line #ifndef FileItem_h #define FileItem_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 <QSharedPointer> #include <QObject> namespace Isis { /** * @brief A container for a filename to be represented as a ProjectItem * on the project tree. * * @author 2017-05-04 J Bonn * * @internal */ class FileItem : public QObject { public: FileItem(const QString filename) : m_filename(filename) {}; QString getFileName() { return m_filename; }; private: QString m_filename; }; typedef QSharedPointer<FileItem> FileItemQsp; //!< A FileItem smart pointer } #endif // FileItem_h
isis/src/qisis/objs/ProjectItem/ProjectItem.cpp +26 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,21 @@ namespace Isis { } /** * Constructs an item representing a file in the filesystem. * * @param[in] filename The full path to the file in the filesystem * @param[in] treetext The name displayed in the project tree * @param[in] filename A icon to display next to the treetext */ ProjectItem::ProjectItem(FileItemQsp filename, QString treeText, QIcon icon) { setEditable(false); setData(QVariant::fromValue<FileItemQsp>(filename)); setText(treeText); setIcon(icon); } /** * Constructs an item from a BundleResults. * Loading @@ -75,7 +90,6 @@ namespace Isis { ProjectItem::ProjectItem(BundleResults bundleResults) { setEditable(false); setBundleResults(bundleResults); // appendRow( new ProjectItem( bundleResults.correlationMatrix() ) ); } Loading Loading @@ -617,6 +631,17 @@ namespace Isis { } /** * Returns true if a FileItemQsp is stored in the data of the item. * Returns false otherwise. * * @return @b bool If a FileItemQsp is stored in the item or not. */ bool ProjectItem::isFileItem() const { return data().canConvert<FileItemQsp>(); } /** * Sets the text, icon, and data to those of another item. * Loading
isis/src/qisis/objs/ProjectItem/ProjectItem.h +7 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ #define ProjectItem_h /** * @file * $Date$ * $Revision$ * * Unless noted otherwise, the portions of Isis written by the USGS are * public domain. See individual third-party library and package descriptions Loading @@ -29,6 +27,7 @@ #include "BundleSettings.h" #include "GuiCamera.h" #include "TargetBody.h" #include "FileItem.h" class QVariant; Loading @@ -48,6 +47,7 @@ namespace Isis { class Shape; class ShapeList; class TargetBodyList; class FileItemData; /** * Represents an item of a ProjectItemModel in Qt's model-view Loading Loading @@ -117,6 +117,8 @@ namespace Isis { * @history 2017-05-02 Tracie Sucharski - Get rid of Correlation Matrix in BundleResults, * change order of objects under BundleSolutionInfo. Change text on * some of BundleSolutionInfo items. Fixes #4822. * @history 2017-05-04 J Bonn -Added FileItem to project tree. m4838 * */ class ProjectItem : public QStandardItem { public: Loading @@ -141,6 +143,8 @@ namespace Isis { ProjectItem(QList<BundleSolutionInfo *> results); ProjectItem(TargetBodyQsp targetBody); ProjectItem(TargetBodyList *targetBodyList); ProjectItem(FileItemQsp filename, QString treeText, QIcon icon); ~ProjectItem(); Loading Loading @@ -171,6 +175,7 @@ namespace Isis { bool isProject() const; bool isGuiCamera() const; bool isTargetBody() const; bool isFileItem() const; void setProjectItem(ProjectItem *item); void setBundleResults(BundleResults bundleResults); Loading