Commit 6bd6f024 authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Changes to ProjectItem, ProjectItemModel, BundleObservationView,...

Changes to ProjectItem, ProjectItemModel, BundleObservationView, BundleObservationViewWorkOrder to integrate viewing the BundleCSV files.  Fixes #4838, #4839, #4840.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce_FY17-Sprint1@7644 41f8697f-d340-4b68-9986-7bafba869bb8
parent 257e6fa0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ namespace Isis {
   *                           in the bundle adjustment. These images will be displayed on the
   *                           project tree under results/bundle/<runtime> and will keep the same
   *                           structure as the input on the project tree. Fixes #4818.
   *   @history 2017-05-02 J Bonn - Fixed XML serialzation and code cleanup.  #4835
   *   @history 2017-05-02 J Bonn - Fixed XML serialzation and code cleanup.  Fixes #4835.
   *   @history 2017-05-02 Tracie Sucharski - Moved XMLHandler code to bottom of file for
   *                           consistency;  all other classes have the XmlHandler at end of file.
   *                           Fixes #4822.
+34 −35
Original line number Diff line number Diff line
#include "AbstractProjectItemView.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 &amp; 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 "BundleObservationView.h"
#include "BundleObservation.h"
#include <QAction>
#include <QDragEnterEvent>
#include <QDragMoveEvent>
#include <QDropEvent>
#include <QEvent>

#include <QDebug>
#include <QFile>
#include <QHBoxLayout>
#include <QMap>
#include <QMdiArea>
#include <QMdiSubWindow>
#include <QMenu>
#include <QModelIndex>
#include <QSize>
#include <QHeaderView>
#include <QSizePolicy>
#include <QStandardItemModel>
#include <QStandardItem>
#include <QStatusBar>

#include <QHeaderView>
#include <QStandardItemModel>
#include <QString>
#include <QStringList>
#include <QTableView>
#include <QTextStream>
#include <QToolBar>
#include <QVBoxLayout>
#include <QWidgetAction>
#include <QXmlStreamWriter>


#include "ControlPoint.h"
#include "Directory.h"
#include "Cube.h"
#include "Image.h"
#include "MosaicGraphicsView.h"
#include "MosaicSceneWidget.h"
#include "ProjectItem.h"
#include "ProjectItemModel.h"
#include "Shape.h"
#include "ToolPad.h"


namespace Isis {



  BundleObservationView::BundleObservationView(BundleObservation * bundleObservation,QWidget *parent):
  /** 
   * Creates a view showing the CSV file from BundleObservation. 
   * 
   * @param FileItemQsp fileItem  QSharedPointer to the fileItem from the ProjectItemModel
   */
  BundleObservationView::BundleObservationView(FileItemQsp fileItem, QWidget *parent):
                         AbstractProjectItemView(parent) {

    QStandardItemModel *model = new QStandardItemModel;
    QFile file(fileItem->fileName());

    QFile file("AS15_16_test_bundleout_images.csv");
    if (file.open(QIODevice::ReadOnly)) {

      int lineindex = 0;                     // file line counter
+15 −46
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@
#define BundleObservationView_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
@@ -23,61 +21,32 @@
 *   http://www.usgs.gov/privacy.html.
 */

#include <QWidgetAction>
#include <QList>
#include <QMap>
#include <QSize>

#include "AbstractProjectItemView.h"


class QAction;
class QEvent;
class QToolBar;
class QWidgetAction;


#include "FileItem.h"

namespace Isis{

class BundleObservation;
class Directory;
class Project;



  /**
 * View for displaying BundleOutput results
   * View for displaying BundleObservation CSV files
   *
   * @author 2017-05-01 Tyler Wilson
   *
   * @internal
   *   @history 2017-05-01 Tyler Wilson - Original version.
   *   @history 2017-05-05 Tracie Sucharski - Changed for the serialization of BundleObservation
   *                           files.  This was implemented create a new ProjectItem type called
   *                           FileItemQsp. Fixes #4839, #4840.
   */

  class BundleObservationView : public AbstractProjectItemView
  {
    Q_OBJECT
    public:
    BundleObservationView(BundleObservation * BundleObservation, QWidget *parent=0);
      BundleObservationView(FileItemQsp fileItem, QWidget *parent=0);
      //BundleObservationView(const BundleObservationView &other);
      ~BundleObservationView();



  private:


  protected:

  private slots:






  };

}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@

#include "Control.h"
#include "ControlDisplayProperties.h"
#include "WorkOrder.h"
#include "XmlStackedHandler.h"

class QStringList;
@@ -30,6 +29,7 @@ namespace Isis {
   *   @history 2015-10-14 Jeffrey Covington - Declared ControlList * as a Qt
   *                           metatype for use with QVariant.
   *   @history 2016-06-06 Ian Humphrey - Updated documentation and coding standards. Fixes #3959.
   *   @history 2017-05-05 Tracie Sucharski - Removed Workorder.h, never used.
   */
  class ControlList : public QObject, public QList<Control *> {
    Q_OBJECT
+5 −6
Original line number Diff line number Diff line
@@ -81,10 +81,10 @@ namespace Isis {
   * 
   * @return @b bool True if one of the images in ImagesList images isFootprintable
   */
  bool BundleObservationViewWorkOrder::isExecutable(BundleObservation *bundleObservation) {
  bool BundleObservationViewWorkOrder::isExecutable(FileItemQsp fileItem) {
    bool result = false;
   
    if (bundleObservation) {
    if (fileItem) {
      result = true;
    }
    return result;
@@ -98,8 +98,8 @@ namespace Isis {
   *                 displayed, otherwise return False. 
   */
  bool BundleObservationViewWorkOrder::setupExecution() {
    bool success = WorkOrder::setupExecution();

    bool success = WorkOrder::setupExecution();
    return success; 
  }

@@ -114,8 +114,7 @@ namespace Isis {
  void BundleObservationViewWorkOrder::execute() {

    //ProjectItem * selectedItem = project()->directory()->model()->selectedItems();

    project()->directory()->addBundleObservationView(NULL);
    project()->directory()->addBundleObservationView(fileItem());
  }

}
Loading