Loading isis/src/qisis/objs/IpceTool/IpceTool.cpp→isis/src/qisis/objs/ControlNetTool/ControlNetTool.cpp +33 −34 Original line number Diff line number Diff line #include "IpceTool.h" #include "ControlNetTool.h" #include <sstream> #include <vector> Loading Loading @@ -44,14 +44,14 @@ namespace Isis { * @internal * */ IpceTool::IpceTool (Directory *directory, QWidget *parent) : Tool(parent) { ControlNetTool::ControlNetTool (Directory *directory, QWidget *parent) : Tool(parent) { m_directory = directory; m_view = qobject_cast<CubeDnView *>(parent); } IpceTool::~IpceTool () { ControlNetTool::~ControlNetTool () { } Loading @@ -69,7 +69,7 @@ namespace Isis { * other classes. References #4994. * */ QAction *IpceTool::toolPadAction(ToolPad *pad) { QAction *ControlNetTool::toolPadAction(ToolPad *pad) { QAction *action = new QAction(pad); Loading @@ -79,7 +79,7 @@ namespace Isis { //The object name is being set and used as a key to search with for this action in //other classes (ie. CubeDnView) action->setObjectName("IpceTool"); action->setObjectName("ControlNetTool"); QList<ControlList *> cnets = m_directory->project()->controls(); Loading @@ -99,7 +99,7 @@ namespace Isis { * @param cnet (ControlNet *) The active control net from Directory that is being used for * editing */ void IpceTool::setControlNet(ControlNet *cnet) { void ControlNetTool::setControlNet(ControlNet *cnet) { m_controlNet = cnet; // TODO: TLS 7-25-17 This method is called by Project::open before there are any viewports, // so the following command seg faults. Need to add check for viewports or ?? Loading @@ -117,7 +117,7 @@ namespace Isis { * * @internal */ void IpceTool::mouseButtonRelease(QPoint p, Qt::MouseButton s) { void ControlNetTool::mouseButtonRelease(QPoint p, Qt::MouseButton s) { MdiCubeViewport *cvp = cubeViewport(); if (cvp == NULL) return; Loading @@ -134,7 +134,7 @@ namespace Isis { // if (sn == m_groundSN) { // QString message = "Cannot select point for editing on ground source. Select "; // message += "point using un-projected images or the Navigator Window."; // QMessageBox::critical(m_ipceTool, "Error", message); // QMessageBox::critical(m_ControlNetTool, "Error", message); // return; // } Loading @@ -147,7 +147,7 @@ namespace Isis { catch (IException &ie) { QString message = "No points exist for editing. Create points using the right mouse"; message += " button."; QMessageBox::warning(m_ipceTool, "Warning", message); QMessageBox::warning(m_ControlNetTool, "Warning", message); return; } } Loading @@ -157,14 +157,14 @@ namespace Isis { if (!m_controlNet || m_controlNet->GetNumPoints() == 0) { QString message = "No points exist for deleting. Create points "; message += "using the right mouse button."; QMessageBox::warning(m_ipceTool, "Warning", message); QMessageBox::warning(m_ControlNetTool, "Warning", message); return; } // if (m_groundOpen && file == m_groundCube->fileName()) { // QString message = "Cannot select point for deleting on ground source. Select "; // message += "point using un-projected images or the Navigator Window."; // QMessageBox::critical(m_ipceTool, "Error", message); // QMessageBox::critical(m_ControlNetTool, "Error", message); // return; // } Loading @@ -176,13 +176,13 @@ namespace Isis { if (point == NULL) { QString message = "No points exist for deleting. Create points "; message += "using the right mouse button."; QMessageBox::warning(m_ipceTool, "Warning", message); QMessageBox::warning(m_ControlNetTool, "Warning", message); return; } } catch (IException &e) { QString message = "Cannot find point on this image for deleting."; QMessageBox::critical(m_ipceTool, "Error", message); QMessageBox::critical(m_ControlNetTool, "Error", message); return; } Loading @@ -209,7 +209,7 @@ namespace Isis { * @param vp (MdiCubeViewport *) Cube viewport control measures are drawn on * @param painter (QPainter) The painter used for the drawing */ void IpceTool::paintViewport(MdiCubeViewport *vp, QPainter *painter) { void ControlNetTool::paintViewport(MdiCubeViewport *vp, QPainter *painter) { if (m_controlNet) { drawAllMeasurements(vp, painter); Loading @@ -224,7 +224,7 @@ namespace Isis { * @history 2010-06-03 Jeannie Walldren - Removed "std::" since "using * namespace std" */ void IpceTool::paintAllViewports() { void ControlNetTool::paintAllViewports() { // Take care of drawing things on all viewPorts. // Calling update will cause the Tool class to call all registered tools Loading @@ -249,10 +249,10 @@ namespace Isis { * @history 2010-06-03 Jeannie Walldren - Removed "std::" since "using * namespace std" * @history 2010-06-08 Jeannie Walldren - Fixed bug that was causing ignored * measures not be drawn as yellow unless IpceTool was * measures not be drawn as yellow unless ControlNetTool was * open * @history 2010-07-01 Jeannie Walldren - Modified to draw points selected in * IpceTool last so they lay on top of all other points * ControlNetTool last so they lay on top of all other points * in the image. * @history 2011-04-15 Tracie Sucharski - Fixed bug which was causing all * measures to be drawn on all cubes. Also removed Loading @@ -265,7 +265,7 @@ namespace Isis { * @history 2017-07-31 Tracie Sucharski - The current edit point will be drawn in red as a * crosshair enclosed by circle. */ void IpceTool::drawAllMeasurements(MdiCubeViewport *vp, QPainter *painter) { void ControlNetTool::drawAllMeasurements(MdiCubeViewport *vp, QPainter *painter) { // Without a controlnetwork there are no points, or if new net, no points if (m_controlNet == 0 || m_controlNet->GetNumPoints() == 0) return; Loading Loading @@ -312,7 +312,7 @@ namespace Isis { painter->drawLine(x - 5, y, x + 5, y); painter->drawLine(x, y - 5, x, y + 5); } // if IpceTool is open, the editPointId will contain the ControlPoint Id of the current edit // if ControlNetTool is open, the editPointId will contain the ControlPoint Id of the current edit // point. ControlPoint *currentEditPoint = NULL; if (m_directory->controlPointEditView()) { Loading Loading @@ -344,4 +344,3 @@ namespace Isis { } } } isis/src/qisis/objs/IpceTool/IpceTool.h→isis/src/qisis/objs/ControlNetTool/ControlNetTool.h +10 −8 Original line number Diff line number Diff line #ifndef IpceTool_h #define IpceTool_h #ifndef ControlNetTool_h #define ControlNetTool_h #include "Tool.h" #include "ControlPoint.h" Loading Loading @@ -48,14 +48,16 @@ namespace Isis { * @history 2017-08-02 Tracie Sucharski - Draw the current edit Control Point as a circle with * center crosshair in red. Removed refresh method; it was not being * used. Fixes #5007, #5008. * @history 2017-08-03 Cole Neubauer - Changed all references from IpceTool to ControlNetTool * Fixes #5090 * */ class IpceTool : public Tool { class ControlNetTool : public Tool { Q_OBJECT public: IpceTool (Directory *directory, QWidget *parent); virtual ~IpceTool (); ControlNetTool (Directory *directory, QWidget *parent); virtual ~ControlNetTool (); void setControlNet(ControlNet *controlNet); void paintViewport (MdiCubeViewport *cvp, QPainter *painter); Loading @@ -80,7 +82,7 @@ namespace Isis { void createMenus(); void drawAllMeasurements(MdiCubeViewport *vp, QPainter *painter); QPointer<MainWindow> m_ipceTool; QPointer<MainWindow> m_ControlNetTool; Directory *m_directory; CubeDnView *m_view; Loading isis/src/qisis/objs/IpceTool/Makefile→isis/src/qisis/objs/ControlNetTool/Makefile +0 −0 File moved. View file Loading
isis/src/qisis/objs/IpceTool/IpceTool.cpp→isis/src/qisis/objs/ControlNetTool/ControlNetTool.cpp +33 −34 Original line number Diff line number Diff line #include "IpceTool.h" #include "ControlNetTool.h" #include <sstream> #include <vector> Loading Loading @@ -44,14 +44,14 @@ namespace Isis { * @internal * */ IpceTool::IpceTool (Directory *directory, QWidget *parent) : Tool(parent) { ControlNetTool::ControlNetTool (Directory *directory, QWidget *parent) : Tool(parent) { m_directory = directory; m_view = qobject_cast<CubeDnView *>(parent); } IpceTool::~IpceTool () { ControlNetTool::~ControlNetTool () { } Loading @@ -69,7 +69,7 @@ namespace Isis { * other classes. References #4994. * */ QAction *IpceTool::toolPadAction(ToolPad *pad) { QAction *ControlNetTool::toolPadAction(ToolPad *pad) { QAction *action = new QAction(pad); Loading @@ -79,7 +79,7 @@ namespace Isis { //The object name is being set and used as a key to search with for this action in //other classes (ie. CubeDnView) action->setObjectName("IpceTool"); action->setObjectName("ControlNetTool"); QList<ControlList *> cnets = m_directory->project()->controls(); Loading @@ -99,7 +99,7 @@ namespace Isis { * @param cnet (ControlNet *) The active control net from Directory that is being used for * editing */ void IpceTool::setControlNet(ControlNet *cnet) { void ControlNetTool::setControlNet(ControlNet *cnet) { m_controlNet = cnet; // TODO: TLS 7-25-17 This method is called by Project::open before there are any viewports, // so the following command seg faults. Need to add check for viewports or ?? Loading @@ -117,7 +117,7 @@ namespace Isis { * * @internal */ void IpceTool::mouseButtonRelease(QPoint p, Qt::MouseButton s) { void ControlNetTool::mouseButtonRelease(QPoint p, Qt::MouseButton s) { MdiCubeViewport *cvp = cubeViewport(); if (cvp == NULL) return; Loading @@ -134,7 +134,7 @@ namespace Isis { // if (sn == m_groundSN) { // QString message = "Cannot select point for editing on ground source. Select "; // message += "point using un-projected images or the Navigator Window."; // QMessageBox::critical(m_ipceTool, "Error", message); // QMessageBox::critical(m_ControlNetTool, "Error", message); // return; // } Loading @@ -147,7 +147,7 @@ namespace Isis { catch (IException &ie) { QString message = "No points exist for editing. Create points using the right mouse"; message += " button."; QMessageBox::warning(m_ipceTool, "Warning", message); QMessageBox::warning(m_ControlNetTool, "Warning", message); return; } } Loading @@ -157,14 +157,14 @@ namespace Isis { if (!m_controlNet || m_controlNet->GetNumPoints() == 0) { QString message = "No points exist for deleting. Create points "; message += "using the right mouse button."; QMessageBox::warning(m_ipceTool, "Warning", message); QMessageBox::warning(m_ControlNetTool, "Warning", message); return; } // if (m_groundOpen && file == m_groundCube->fileName()) { // QString message = "Cannot select point for deleting on ground source. Select "; // message += "point using un-projected images or the Navigator Window."; // QMessageBox::critical(m_ipceTool, "Error", message); // QMessageBox::critical(m_ControlNetTool, "Error", message); // return; // } Loading @@ -176,13 +176,13 @@ namespace Isis { if (point == NULL) { QString message = "No points exist for deleting. Create points "; message += "using the right mouse button."; QMessageBox::warning(m_ipceTool, "Warning", message); QMessageBox::warning(m_ControlNetTool, "Warning", message); return; } } catch (IException &e) { QString message = "Cannot find point on this image for deleting."; QMessageBox::critical(m_ipceTool, "Error", message); QMessageBox::critical(m_ControlNetTool, "Error", message); return; } Loading @@ -209,7 +209,7 @@ namespace Isis { * @param vp (MdiCubeViewport *) Cube viewport control measures are drawn on * @param painter (QPainter) The painter used for the drawing */ void IpceTool::paintViewport(MdiCubeViewport *vp, QPainter *painter) { void ControlNetTool::paintViewport(MdiCubeViewport *vp, QPainter *painter) { if (m_controlNet) { drawAllMeasurements(vp, painter); Loading @@ -224,7 +224,7 @@ namespace Isis { * @history 2010-06-03 Jeannie Walldren - Removed "std::" since "using * namespace std" */ void IpceTool::paintAllViewports() { void ControlNetTool::paintAllViewports() { // Take care of drawing things on all viewPorts. // Calling update will cause the Tool class to call all registered tools Loading @@ -249,10 +249,10 @@ namespace Isis { * @history 2010-06-03 Jeannie Walldren - Removed "std::" since "using * namespace std" * @history 2010-06-08 Jeannie Walldren - Fixed bug that was causing ignored * measures not be drawn as yellow unless IpceTool was * measures not be drawn as yellow unless ControlNetTool was * open * @history 2010-07-01 Jeannie Walldren - Modified to draw points selected in * IpceTool last so they lay on top of all other points * ControlNetTool last so they lay on top of all other points * in the image. * @history 2011-04-15 Tracie Sucharski - Fixed bug which was causing all * measures to be drawn on all cubes. Also removed Loading @@ -265,7 +265,7 @@ namespace Isis { * @history 2017-07-31 Tracie Sucharski - The current edit point will be drawn in red as a * crosshair enclosed by circle. */ void IpceTool::drawAllMeasurements(MdiCubeViewport *vp, QPainter *painter) { void ControlNetTool::drawAllMeasurements(MdiCubeViewport *vp, QPainter *painter) { // Without a controlnetwork there are no points, or if new net, no points if (m_controlNet == 0 || m_controlNet->GetNumPoints() == 0) return; Loading Loading @@ -312,7 +312,7 @@ namespace Isis { painter->drawLine(x - 5, y, x + 5, y); painter->drawLine(x, y - 5, x, y + 5); } // if IpceTool is open, the editPointId will contain the ControlPoint Id of the current edit // if ControlNetTool is open, the editPointId will contain the ControlPoint Id of the current edit // point. ControlPoint *currentEditPoint = NULL; if (m_directory->controlPointEditView()) { Loading Loading @@ -344,4 +344,3 @@ namespace Isis { } } }
isis/src/qisis/objs/IpceTool/IpceTool.h→isis/src/qisis/objs/ControlNetTool/ControlNetTool.h +10 −8 Original line number Diff line number Diff line #ifndef IpceTool_h #define IpceTool_h #ifndef ControlNetTool_h #define ControlNetTool_h #include "Tool.h" #include "ControlPoint.h" Loading Loading @@ -48,14 +48,16 @@ namespace Isis { * @history 2017-08-02 Tracie Sucharski - Draw the current edit Control Point as a circle with * center crosshair in red. Removed refresh method; it was not being * used. Fixes #5007, #5008. * @history 2017-08-03 Cole Neubauer - Changed all references from IpceTool to ControlNetTool * Fixes #5090 * */ class IpceTool : public Tool { class ControlNetTool : public Tool { Q_OBJECT public: IpceTool (Directory *directory, QWidget *parent); virtual ~IpceTool (); ControlNetTool (Directory *directory, QWidget *parent); virtual ~ControlNetTool (); void setControlNet(ControlNet *controlNet); void paintViewport (MdiCubeViewport *cvp, QPainter *painter); Loading @@ -80,7 +82,7 @@ namespace Isis { void createMenus(); void drawAllMeasurements(MdiCubeViewport *vp, QPainter *painter); QPointer<MainWindow> m_ipceTool; QPointer<MainWindow> m_ControlNetTool; Directory *m_directory; CubeDnView *m_view; Loading
isis/src/qisis/objs/IpceTool/Makefile→isis/src/qisis/objs/ControlNetTool/Makefile +0 −0 File moved. View file