Commit cf346b78 authored by Ian Humphrey's avatar Ian Humphrey
Browse files

PROG fixed previous merge of OpenProjectWorkOrder changes from IPCE to trunk. References #4012.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6795 41f8697f-d340-4b68-9986-7bafba869bb8
parent d5e678da
Loading
Loading
Loading
Loading
+29 −3
Original line number Diff line number Diff line
@@ -35,8 +35,14 @@

namespace Isis {

  /**
   * Constructs an OpenProjectWorkOrder
   *
   * @param project The project 
   */
  OpenProjectWorkOrder::OpenProjectWorkOrder(Project *project) :
      WorkOrder(project) {
    //qDebug()<<"OpenProjectWorkOrder::OpenProjectWorkOrder";
    QAction::setText(tr("&Open Project"));

    setCreatesCleanState(true);
@@ -44,29 +50,49 @@ namespace Isis {
    QStringList args = QCoreApplication::arguments();

    if (args.count() == 2) {
      connect(this, SIGNAL(openProjectFromCommandLine(QString)),
              project, SLOT(open(QString)), Qt::QueuedConnection);
      emit openProjectFromCommandLine(args.last());
//    connect(this, SIGNAL(openProjectFromCommandLine(QString)),
//            project, SLOT(open(QString)), Qt::QueuedConnection);
//    emit openProjectFromCommandLine(args.last());
//    project->open(args.last());
    }
  }


  /**
   * Copy constructor
   *
   * @param other The other OpenProjectWorkOrder to initialize from
   */
  OpenProjectWorkOrder::OpenProjectWorkOrder(const OpenProjectWorkOrder &other) :
      WorkOrder(other) {
  }


  /**
   * Destructor
   */
  OpenProjectWorkOrder::~OpenProjectWorkOrder() {

  }


  /**
   * Clones the current OpenProjectWorkOrder
   *
   * @return @b OpenProjectWorkOrder * The OpenProjectWorkOrder clone
   */
  OpenProjectWorkOrder *OpenProjectWorkOrder::clone() const {
    return new OpenProjectWorkOrder(*this);
  }


  /**
   * Executes the OpenProjectWorkOrder
   *
   * @return @b bool true if the successfully executed
   */
  bool OpenProjectWorkOrder::execute() {
    //qDebug()<<"OpenProjectWorkOrder::execute()";
    bool success = WorkOrder::execute();

    // We dislike the progress bar
+4 −3
Original line number Diff line number Diff line
@@ -24,12 +24,9 @@
 */
#include "WorkOrder.h"

#include "FileName.h"

class QString;

namespace Isis {
  class FileName;

  /**
   * This opens a project that's saved on disk.
@@ -37,6 +34,10 @@ namespace Isis {
   * @author 2012-??-?? ???
   *
   * @internal
   *   @history 2014-09-05 Kim Oyama - Removed the connection for opening a project from the
   *                           command line.
   *   @history 2016-06-10 Ian Humphrey - Minor updates to documentation and coding standards.
   *                           Fixes #3952.
   */
  class OpenProjectWorkOrder : public WorkOrder {
      Q_OBJECT