Commit 1bd75aa6 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Added documentation for new Directory classes. Fixes #3993.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6817 41f8697f-d340-4b68-9986-7bafba869bb8
parent 6c5941aa
Loading
Loading
Loading
Loading
+27 −5
Original line number Diff line number Diff line
@@ -31,6 +31,12 @@

namespace Isis {

  /**
   * This method sets the text of the work order to Close Project and 
   * sets setCreatesCleanState to true
   * 
   * @param project The Project that we are going to open
   */
  CloseProjectWorkOrder::CloseProjectWorkOrder(Project *project) :
      WorkOrder(project) {
    QAction::setText(tr("&Close Project"));
@@ -38,28 +44,44 @@ namespace Isis {
    setCreatesCleanState(true);
  }


  /**
   * As of 06/06/2016 this method is not implemented.
   */
  CloseProjectWorkOrder::CloseProjectWorkOrder(const CloseProjectWorkOrder &other) :
      WorkOrder(other) {
  }


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

  }


  /**
   * This method clones the CloseProjectWorkOrder
   * 
   * @return @b CloseProjectWorkOrder Returns a clone of the CloseProjectWorkOrder
   */
  CloseProjectWorkOrder *CloseProjectWorkOrder::clone() const {
    return new CloseProjectWorkOrder(*this);
  }


  /**
   * This method will always return true
   * 
   * @return @b bool True always
   */
  bool CloseProjectWorkOrder::isExecutable() {
//  return (project());
    return true;
  }


  /**
   * If WorkOrder::execute() returns true, then this method returns true.
   * 
   * @return @b bool True if WorkOrder::execute() returns true.
   */
  bool CloseProjectWorkOrder::execute() {
    bool success = WorkOrder::execute();

+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ namespace Isis {
   * @author Ken Edmundson 2014-04-15
   *
   * @internal
   *   @history 2016-06-06 Makayla Shepherd - Updated documentation. Fixes #3993.
   */
  class CloseProjectWorkOrder : public WorkOrder {
      Q_OBJECT
+41 −7
Original line number Diff line number Diff line
@@ -36,43 +36,77 @@

namespace Isis {

  /**
   * This method sets the text of the work order.
   * 
   * @param project The Project that we are going to work with.
   * 
   */
  CubeDnViewWorkOrder::CubeDnViewWorkOrder(Project *project) :
      WorkOrder(project) {
    QAction::setText(tr("View Raw &Cubes..."));
  }


  /**
   * As of 06/06/2016 this method is not implemented.
   */
  CubeDnViewWorkOrder::CubeDnViewWorkOrder(const CubeDnViewWorkOrder &other) :
      WorkOrder(other) {
  }


  /**
   * Destructor
   */
  CubeDnViewWorkOrder::~CubeDnViewWorkOrder() {
  }


  /**
   * This method clones the CubeDnViewWorkOrder
   * 
   * @return @b CubeDnViewWorkOrder Returns a clone of the CubeDnViewWorkOrder
   */
  CubeDnViewWorkOrder *CubeDnViewWorkOrder::clone() const {
    return new CubeDnViewWorkOrder(*this);
  }


  /**
   * This check is used by Directory::supportedActions(DataType data).
   *
   * @param images ImageList we are checking
   * 
   * @return @b bool True if the number of images is greater than 0 and less than 50.
   */
  bool CubeDnViewWorkOrder::isExecutable(ImageList *images) {
    return (images->count() > 0 && images->count() < 50);
  }


  /**
   * If WorkOrder::execute() returns true, then this method returns true.
   * 
   * @return @b bool True if WorkOrder::execute() returns true.
   */
  bool CubeDnViewWorkOrder::execute() {
    bool success = WorkOrder::execute();
    return success;
  }


  /**
   * This method returns true if other depends on a CubeDnViewWorkOrder
   * 
   * @param order the WorkOrder we want to check for dependancies
   * 
   * @return @b bool True if WorkOrder depends on a CubeDnViewWorkOrder
   * 
   */
  bool CubeDnViewWorkOrder::dependsOn(WorkOrder *other) const {
    // depend on types of ourselves.
    return dynamic_cast<CubeDnViewWorkOrder *>(other);
  }


  /**
   * This method adds a new CubeDnView to the project's directory and then adds currentItem() to
   * that. 
   */
  void CubeDnViewWorkOrder::syncRedo() {
    ProjectItem *currentItem = project()->directory()->model()->currentItem();
    CubeDnView *view = project()->directory()->addCubeDnView();
+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ namespace Isis {
   * @author 2012-09-19 Steven Lambright
   *
   * @internal
   *   @history 2016-01-13 Jeffrey Covington - Redesigned CNetSuiteMainWindow. Added CubeDNView
   *                          and Footprint2DView.
   *   @history 2016-06-06 Makayla Shepherd - Update documentation. Fixes #3993.
   */
  class CubeDnViewWorkOrder : public WorkOrder {
      Q_OBJECT
+44 −8
Original line number Diff line number Diff line
@@ -36,32 +36,55 @@

namespace Isis {

  /**
   * This method sets the text of the work order.
   * 
   * @param project The Project that we are going to Bundle Adjust
   * 
   */
  JigsawWorkOrder::JigsawWorkOrder(Project *project) :
      WorkOrder(project) {
    QAction::setText(tr("&Bundle Adjustment..."));
    QUndoCommand::setText("&Bundle Adjustment...");
  }


  /**
   * As of 06/06/2016 this method is not implemented.
   */
  JigsawWorkOrder::JigsawWorkOrder(const JigsawWorkOrder &other) :
      WorkOrder(other) {
  }


  /**
   * Destructor
   */
  JigsawWorkOrder::~JigsawWorkOrder() {
  }


  /**
   * This method clones the JigsawViewWorkOrder
   * 
   * @return @b JigsawWorkOrder Returns a clone of the JigsawWorkOrder
   */
  JigsawWorkOrder *JigsawWorkOrder::clone() const {
    return new JigsawWorkOrder(*this);
  }


  /**
   * This check is used by Directory::supportedActions(DataType data).
   *
   * @return @b bool True if the number of project controls and the number of project images
   *         is greater than 0.
   */
  bool JigsawWorkOrder::isExecutable() {
    return (project()->controls().size() > 0 && project()->images().size() > 0);
  }


  /**
   * If WorkOrder::execute() returns true, this method creates a JigsawDialog.
   * 
   * @return @b bool True if WorkOrder::execute() returns true.
   */
  bool JigsawWorkOrder::execute() {
    bool success = WorkOrder::execute();
/*
@@ -88,13 +111,23 @@ namespace Isis {
    return success;
  }


  /**
  * This method returns true if other depends on a JigsawViewWorkOrder
  * 
  * @param order the WorkOrder we want to check for dependancies
  * 
  * @return @b bool True if WorkOrder depends on a JigsawViewWorkOrder
  * 
  */
  bool JigsawWorkOrder::dependsOn(WorkOrder *other) const {
    // depend on types of ourselves.
    return dynamic_cast<JigsawWorkOrder *>(other);
  }


  /**
   * As of 06/06/2016 this method is not implemented as the contents are commented out.
   * 
   */
  void JigsawWorkOrder::syncRedo() {
//    TargetInfoWidget *targetInfoWidget =
//        project()->directory()->addTargetInfoView(targetBody());
@@ -106,7 +139,10 @@ namespace Isis {
//    }
  }


  /**
   * As of 06/06/2016 this method is not implemented as the contents are commented out.
   * 
   */
  void JigsawWorkOrder::syncUndo() {
    //delete project()->directory()->cnetEditorViews().last();
  }
Loading