Commit 85832d65 authored by Cole Neubauer's avatar Cole Neubauer
Browse files

Renamed IpceTool to ControlNetTool throughout IPCE Fixes #5090

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7950 41f8697f-d340-4b68-9986-7bafba869bb8
parent e11acfdb
Loading
Loading
Loading
Loading
+32 −32
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@
#include "HistogramTool.h"
#include "Image.h"
#include "ImageList.h"
#include "IpceTool.h"
#include "ControlNetTool.h"
#include "IString.h"
#include "MatchTool.h"
#include "MdiCubeViewport.h"
@@ -110,9 +110,9 @@ namespace Isis {

    Project *activeProject = directory->project();
    // These connect signals listen to the active project, and if a control network
    // or list of control networks is added, then the enableIPCETool() function is called.
    connect(activeProject, SIGNAL(controlListAdded(ControlList *)), this, SLOT(enableIPCETool()));
    connect(activeProject, SIGNAL(controlAdded(Control *)), this, SLOT(enableIPCETool()));
    // or list of control networks is added, then the enableControlNetTool() function is called.
    connect(activeProject, SIGNAL(controlListAdded(ControlList *)), this, SLOT(enableControlNetTool()));
    connect(activeProject, SIGNAL(controlAdded(Control *)), this, SLOT(enableControlNetTool()));


    QVBoxLayout *layout = new QVBoxLayout;
@@ -152,31 +152,31 @@ namespace Isis {
    //tools->append(new QnetFileTool(qnetTool, this));
    tools->append(NULL);

    IpceTool *ipceTool = new IpceTool(directory, this);
    defaultActiveTool = ipceTool;
    ControlNetTool *controlNetTool = new ControlNetTool(directory, this);
    defaultActiveTool = controlNetTool;
    tools->append(defaultActiveTool);

    if (directory->project()->activeControl()) {
      ipceTool->setControlNet(directory->project()->activeControl()->controlNet()); 
      controlNetTool->setControlNet(directory->project()->activeControl()->controlNet());
    }
    //  Pass on Signals emitted from IpceTool
    //  Pass on Signals emitted from ControlNetTool
    //  TODO 2016-09-09 TLS Design:  Use a proxy model instead of signals?
    connect(ipceTool, SIGNAL(modifyControlPoint(ControlPoint *, QString)),
    connect(controlNetTool, SIGNAL(modifyControlPoint(ControlPoint *, QString)),
            this, SIGNAL(modifyControlPoint(ControlPoint *, QString)));

    connect(ipceTool, SIGNAL(deleteControlPoint(ControlPoint *)),
    connect(controlNetTool, SIGNAL(deleteControlPoint(ControlPoint *)),
            this, SIGNAL(deleteControlPoint(ControlPoint *)));

    connect(ipceTool, SIGNAL(createControlPoint(double, double, Cube *, bool)),
    connect(controlNetTool, SIGNAL(createControlPoint(double, double, Cube *, bool)),
            this, SIGNAL(createControlPoint(double, double, Cube *, bool)));

    // Pass on signals emitted from Directory (by way of ControlPointEditWidget)
    // This is done to redraw the control points on the cube viewports
    connect(this, SIGNAL(controlPointAdded(QString)), ipceTool, SLOT(paintAllViewports()));
    connect(this, SIGNAL(controlPointAdded(QString)), controlNetTool, SLOT(paintAllViewports()));

    //  Pass on redrawMeasure signal from Directory, so the control measures are redrawn on all
    //  CubeViewports.
    connect(this, SIGNAL(redrawMeasures()), ipceTool, SLOT(paintAllViewports()));
    connect(this, SIGNAL(redrawMeasures()), controlNetTool, SLOT(paintAllViewports()));

    tools->append(new BandTool(this));
    tools->append(new ZoomTool(this));
@@ -261,16 +261,16 @@ namespace Isis {


  /**
   * @description enableIPCETool:  This is a slot function which
   * @description enableControlNetTool:  This is a slot function which
   * is called when the active project emits a signal to the CubeDnView
   * object after a control network (or a list of control networks)
   * has been added.  It enables the control network editor tool if it
   * has been disabled.
   */
  void CubeDnView::enableIPCETool() {
  void CubeDnView::enableControlNetTool() {

    foreach (QAction * action, m_toolPadActions) {
      if (action->objectName() == "IpceTool") {
      if (action->objectName() == "ControlNetTool") {
        action->setDisabled(false);
      }
    }
+12 −10
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ namespace Isis {
   *   @history 2017-08-02 Tracie Sucharski - Added redrawMeasures signal which calls a slot in
   *                           ipce tool to redraw control measures on cube viewports. Fixes #5007,
   *                           #5008.
   *   @history 2017-08-03 Cole Neubauer - Changed all references from IpceTool to ControlNetTool
   *                           Fixes #5090
   */
  class CubeDnView : public AbstractProjectItemView {

@@ -118,7 +120,7 @@ namespace Isis {

    public slots:
      void addItem(ProjectItem *item);
      void enableIPCETool();
      void enableControlNetTool();

    private slots:
      void onCurrentChanged(const QModelIndex &current);
+24 −24
Original line number Diff line number Diff line
@@ -645,7 +645,7 @@ namespace Isis {
            this, SLOT(createControlPoint(double, double, Cube *, bool)));

    //  This signal is connected to the CubeDnView signal which connects to the slot,
    //  IpceTool::paintAllViewports().
    // IpceTool::paintAllViewports()
    connect(this, SIGNAL(redrawMeasures()), result, SIGNAL(redrawMeasures()));
    connect(this, SIGNAL(cnetModified()), result, SIGNAL(redrawMeasures()));

+3 −1
Original line number Diff line number Diff line
@@ -159,6 +159,8 @@ namespace Isis {
   *   @history 2017-07-26 Cole Neubauer -Set save button to default be disabled Fixes #4960
   *   @history 2017-08-02 Tracie Sucharski - Add member variable and accessor method for the
   *                           current edit control point ID.  Fixes #5007, #5008.
   *   @history 2017-08-07 Cole Neubauer - Changed all references from IpceTool to ControlNetTool
   *                           Fixes #5090
   *   @history 2017-08-08 Makayla Shepherd - Fixed a seg fault that occurs when trying to edit a 
   *                           control net without having an active control net set. Fixes #5048.
   *   @history 2017-08-08 Makayla Shepherd - Fixed a seg fault that occurs when right clicking a
@@ -299,7 +301,7 @@ namespace Isis {
      // TODO temporary slot until autosave is implemented
      void makeBackupActiveControl();

      //  Slots in response to mouse clicks on CubeDnView (IpceTool) and
      //  Slots in response to mouse clicks on CubeDnView (ControlNetTool) and
      //    Footprint2DView (MosaicControlNetTool)
      void modifyControlPoint(ControlPoint *controlPoint, QString serialNumber = "");
      void deleteControlPoint(ControlPoint *controlPoint);