Isis 3 Programmer Reference
Isis::EditTool Class Reference

Interactive image edit tool. More...

#include <EditTool.h>

Inheritance diagram for Isis::EditTool:
Inheritance graph
Collaboration diagram for Isis::EditTool:
Collaboration graph

Public Types

enum  EditShape {
  Point , HorizLine , VertLine , StartEndLine ,
  Rectangle
}
 Enum for possible shapes. More...
 
enum  ReplacementValue {
  UserDnComboValue , NullComboValue , HrsComboValue , LrsComboValue ,
  HisComboValue , LisComboValue
}
 Enum for DN values. More...
 

Public Slots

void activate (bool)
 Activates the tool.
 
void setCubeViewport (MdiCubeViewport *cvp)
 Sets the current viewport to the given cvp.
 

Signals

void cubeChanged (bool)
 Emitted when cube changed.
 
void save ()
 Emitted when cube should be saved.
 
void saveAs ()
 Emitted when cube should be saved as another file.
 
void clearWarningSignal ()
 
void toolActivated ()
 
void viewportChanged ()
 

Public Member Functions

 EditTool (QWidget *parent)
 Constructs and EditTool object.
 
void addTo (Workspace *)
 Adds the given workspace to the cubeviewport list.
 
void addTo (ViewportMainWindow *mw)
 Adds the tool to the application.
 
void addTo (ToolPad *toolpad)
 Adds the tool to the toolpad.
 
virtual void addTo (QMenu *menu)
 
virtual QString menuName () const
 Anytime a tool is created, you must give it a name for the menu.
 
virtual void addToPermanent (QToolBar *toolbar)
 
void addToActive (QToolBar *toolbar)
 
QString toolIconDir () const
 returns the path to the icon directory.
 
virtual void paintViewport (MdiCubeViewport *vp, QPainter *painter)
 
RubberBandToolrubberBandTool ()
 
void setList (ToolList *currentList)
 

Protected Types

typedef QVector< MdiCubeViewport * > CubeViewportList
 A list of cubeviewports.
 

Protected Slots

void mouseButtonRelease (QPoint p, Qt::MouseButton m)
 This is a slot called when any mouse button is released inside of a viewport.
 
virtual void enableRubberBandTool ()
 This method sets up the RubberBandTool depending on which mode is enabled.
 
void rubberBandComplete ()
 This method is called any time the RubberBandTool is complete.
 
virtual void screenPixelsChanged ()
 This is called when actions change which pixels from the cube are displayed.
 
virtual void mouseEnter ()
 
virtual void mouseMove (QPoint p)
 
virtual void mouseMove (QPoint p, Qt::MouseButton)
 
virtual void mouseLeave ()
 

Protected Member Functions

QActiontoolPadAction (ToolPad *pad)
 Adds the EditTool to the tool pad.
 
QWidgetcreateToolBarWidget (QStackedWidget *active)
 Creates the toolbar containing the edit tool widgets.
 
void updateTool ()
 This is a virtual function belonging to the Tool class which is called when the user selects a different viewport.
 
virtual void mouseDoubleClick (QPoint p)
 
virtual void mouseButtonPress (QPoint p, Qt::MouseButton s)
 
virtual void updateMeasure ()
 
virtual void scaleChanged ()
 
virtual void stretchRequested (MdiCubeViewport *, int)
 
void registerTool (MdiCubeViewport *viewport)
 Registers the tool to the viewport.
 
MdiCubeViewportcubeViewport () const
 Return the current cubeviewport.
 
CubeViewportListcubeViewportList () const
 Return the list of cubeviewports.
 
virtual void addConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must add the connections for it.
 
virtual void removeConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must be able to remove it's connections.
 
Workspaceworkspace ()
 

Private Slots

void listenToViewport (MdiCubeViewport *)
 
void selectValType (int index)
 This is a private slot which is called when the user selects a new dn type.
 
void changeDn ()
 This is a private slot called when the user hits the enter key after typing a value in the dnLineEdit field.
 
void undoEdit ()
 This is a private slot called when the user selects the undo button.
 
void undoAll (CubeViewport *vp)
 This method is used to discard any changes made to this viewport.
 
void redoEdit ()
 This method is called to redo any edit operations that have been undone.
 
void save (CubeViewport *vp)
 This method saves by removing any undo history for the viewport vp and reopening the cube.
 
void removeViewport (QObject *vp)
 This is a private slot called to clean up when a viewport is destroyed.
 

Private Member Functions

QList< QPoint * > * LineToPoints (const QLine &line)
 Convert rubber band line to points.
 
void writeToCube (int iesamp, int issamp, int ieline, int isline, QList< QPoint * > *linePts)
 
void addViewportConnections ()
 Makes all the connections for the tool.
 
void removeViewportConnections ()
 Removes all the connections from the tool.
 
void enableToolBar ()
 Enables entire tool bar.
 
void disableToolBar ()
 Disables entire tool bar.
 

Private Attributes

QComboBoxp_shapeComboBox
 Shape combobox.
 
QComboBoxp_valTypeComboBox
 Value type combobox.
 
QLineEdit * p_dnLineEdit
 DN edit line.
 
QToolButton * p_undoButton
 Undo button.
 
QToolButton * p_redoButton
 Redo button.
 
QToolButton * p_saveButton
 Save button.
 
QToolButton * p_saveAsButton
 Save as button.
 
QWidgetm_container
 
double p_dn
 DN value.
 
QMap< CubeViewport *, QStack< Brick * > * > p_undoEdit
 Viewport to brick map for undo.
 
QMap< CubeViewport *, QStack< Brick * > * > p_redoEdit
 Viewport to brick map for redo.
 
QMap< CubeViewport *, int > p_saveMarker
 Marker for last save.
 
MdiCubeViewportm_cvp
 current cubeviewport
 
Workspacem_workspace
 
bool m_active
 Is the tool acitve?
 
QWidgetm_toolBarWidget
 The tool bar on which this tool resides.
 
QActionm_toolPadAction
 The tool pad on which this tool resides.
 
QString m_toolIconDir
 The pathway to the icon directory.
 
ToolListm_toolList
 

Detailed Description

Interactive image edit tool.

This tool is part of the Qisis namespace and allows interactive editing of displayed images.

Author
2006-06-09 Tracie Sucharski
History

2006-10-20 Tracie Sucharski - If rubberband for rectangle option goes off the right side or bottom of image, set esamp/eline to image nsamps/nlines.

2008-05-23 Noah Hilt - Added RubberBandToolfunctionality and changed the mouseButtonReleased method. Also added a writeToCube method that is used by both the rubberBandComplete and mouseButtonRelease methods.

2008-06-19 Noah Hilt - Added methods and signals for saving and discarding changes to the current cube.

2010-06-26 Eric Hyer - uses MdiCubeViewport instead of CubeViewport. Fixed many include issues but some still remain!

2010-11-15 Eric Hyer - valid rectangle dimensions for banding must now be >= 1 instead of >= 5

2011-09-15 Steven Lambright - Enumerated values no longer conflict with global variable names and increased safety with usage of the valType combo box to make it less likely to break in the future. Fixes #345.

2012-05-24 Steven Lambright - Minor changes to support prompting to save on exit once again (this has been broken for a very long time). The prompt now appears if you have edited your file but not saved it - not when clicking "Save." This was a minimal fix (I left a lot of problems to be solved at a later date). Fixes #854.

2017-08-11 Adam Goins - Added a line of code to recreate a cube with "r" permissions attempting to open it with "rw" permission failed. This fixes an issue where the cube would segfault if it was being edited without "w" permission. Fixes # 2097

Definition at line 70 of file EditTool.h.

Member Typedef Documentation

◆ CubeViewportList

typedef QVector< MdiCubeViewport * > Isis::Tool::CubeViewportList
protectedinherited

A list of cubeviewports.

Definition at line 205 of file Tool.h.

Member Enumeration Documentation

◆ EditShape

Enum for possible shapes.

Enumerator
Point 

point

HorizLine 

horizontal line

VertLine 

vertical line

StartEndLine 

start-end line

Rectangle 

rectangle

Definition at line 77 of file EditTool.h.

◆ ReplacementValue

Enum for DN values.

Enumerator
UserDnComboValue 

User Selected DN value.

NullComboValue 

Null DN value.

HrsComboValue 

High representation saturation DN value.

LrsComboValue 

Low representation saturation DN value.

HisComboValue 

High instrument saturation DN value.

LisComboValue 

Low instrument satruation DN value.

Definition at line 89 of file EditTool.h.

Constructor & Destructor Documentation

◆ EditTool()

Isis::EditTool::EditTool ( QWidget * parent)

Constructs and EditTool object.

Parameters
parentParent widget

Definition at line 41 of file EditTool.cpp.

References Isis::Null, and p_dn.

Member Function Documentation

◆ activate

◆ addConnections()

virtual void Isis::Tool::addConnections ( MdiCubeViewport * cvp)
inlineprotectedvirtualinherited

Anytime a tool is created, you must add the connections for it.

Parameters
cvp

Reimplemented in Isis::TrackTool, and Isis::WindowTool.

Definition at line 239 of file Tool.h.

Referenced by Isis::Tool::addViewportConnections().

◆ addTo() [1/4]

◆ addTo() [2/4]

void Isis::Tool::addTo ( ToolPad * toolpad)
inherited

Adds the tool to the toolpad.

Parameters
toolpad

Definition at line 98 of file Tool.cpp.

References Isis::Tool::activate(), Isis::Tool::m_toolPadAction, and Isis::Tool::toolPadAction().

◆ addTo() [3/4]

◆ addTo() [4/4]

void Isis::EditTool::addTo ( Workspace * ws)
virtual

Adds the given workspace to the cubeviewport list.

Parameters
ws

Reimplemented from Isis::Tool.

Definition at line 45 of file EditTool.cpp.

References Isis::Tool::addTo().

◆ addToActive()

void Isis::Tool::addToActive ( QToolBar * toolbar)
inherited
Parameters
toolbar

Definition at line 112 of file Tool.cpp.

References Isis::Tool::createToolBarWidget(), Isis::Tool::disableToolBar(), and Isis::Tool::m_toolBarWidget.

Referenced by Isis::Tool::addTo().

◆ addToPermanent()

virtual void Isis::Tool::addToPermanent ( QToolBar * toolbar)
inlinevirtualinherited
Parameters
toolbar

Reimplemented in Isis::AdvancedTrackTool, Isis::BlinkTool, Isis::FileTool, Isis::HelpTool, Isis::SpecialPixelTool, and Isis::WindowTool.

Definition at line 97 of file Tool.h.

Referenced by Isis::Tool::addTo().

◆ addViewportConnections()

◆ changeDn

void Isis::EditTool::changeDn ( )
privateslot

This is a private slot called when the user hits the enter key after typing a value in the dnLineEdit field.

Definition at line 217 of file EditTool.cpp.

References p_dn, and p_dnLineEdit.

Referenced by createToolBarWidget().

◆ createToolBarWidget()

QWidget * Isis::EditTool::createToolBarWidget ( QStackedWidget * active)
protectedvirtual

Creates the toolbar containing the edit tool widgets.

Parameters
activeinput The widget that will contain the edit tool specific widgets
History
2007-08-31 Tracie Sucharski - Changed signal on dn line edit from returnPressed to editingFinished.
Returns
QWidget*

Reimplemented from Isis::Tool.

Definition at line 84 of file EditTool.cpp.

References changeDn(), enableRubberBandTool(), HisComboValue, HrsComboValue, LisComboValue, LrsComboValue, NullComboValue, p_dnLineEdit, p_redoButton, p_saveAsButton, p_saveButton, p_shapeComboBox, p_undoButton, p_valTypeComboBox, redoEdit(), save(), saveAs(), selectValType(), Isis::Tool::toolIconDir(), undoEdit(), and UserDnComboValue.

◆ cubeChanged

void Isis::EditTool::cubeChanged ( bool )
signal

Emitted when cube changed.

Referenced by redoEdit(), undoEdit(), and writeToCube().

◆ cubeViewport()

MdiCubeViewport * Isis::Tool::cubeViewport ( ) const
inlineprotectedinherited

Return the current cubeviewport.

Returns
CubeViewport*

Definition at line 197 of file Tool.h.

References Isis::Tool::m_cvp.

Referenced by Isis::TrackTool::addConnections(), Isis::WindowTool::addConnections(), Isis::StretchTool::advancedStretchChanged(), Isis::FindTool::centerLinkedViewports(), Isis::StretchTool::changeStretch(), Isis::BandTool::changeView(), Isis::BandTool::copyLinkedViewports(), Isis::StretchTool::deleteFromCube(), Isis::FileTool::discard(), Isis::Tool::enableToolBar(), Isis::FileTool::exportToList(), Isis::FileTool::exportView(), Isis::StatisticsTool::getStatistics(), Isis::FindTool::handleRecordClicked(), LineToPoints(), Isis::StretchTool::loadStretchFromCube(), Isis::TrackTool::locateCursor(), Isis::SunShadowTool::mouseButtonPress(), mouseButtonRelease(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FeatureNomenclatureTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::RubberBandTool::mouseButtonRelease(), Isis::StretchTool::mouseButtonRelease(), Isis::AdvancedTrackTool::mouseLeave(), Isis::SunShadowTool::mouseMove(), Isis::TrackTool::mouseMove(), Isis::RubberBandTool::mouseMove(), Isis::ScatterPlotTool::mouseMove(), Isis::LatLonGridTool::paintViewport(), Isis::FindTool::paintViewport(), Isis::RubberBandTool::paintViewport(), Isis::SunShadowTool::paintViewport(), Isis::FileTool::print(), Isis::SunShadowTool::recalculateShadowHeight(), redoEdit(), Isis::FindTool::refresh(), Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::TrackTool::removeConnections(), Isis::WindowTool::removeConnections(), Isis::RubberBandTool::repaint(), Isis::WindowTool::resizeWindows(), rubberBandComplete(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::ZoomTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::FileTool::saveInfo(), Isis::StretchTool::saveStretchToCube(), Isis::BandTool::setBandBin(), Isis::BandTool::setList(), Isis::StretchTool::setStretchAcrossBands(), Isis::StretchTool::setStretchAllViewports(), Isis::StretchTool::showAdvancedDialog(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), Isis::StretchTool::stretchChanged(), Isis::StretchTool::stretchGlobal(), Isis::StretchTool::stretchGlobalAllBands(), Isis::StretchTool::stretchRegional(), undoEdit(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::TrackTool::updateLabels(), Isis::MeasureTool::updateMeasure(), Isis::AdvancedTrackTool::updateRow(), Isis::AdvancedTrackTool::updateRow(), Isis::AbstractPlotTool::updateTool(), Isis::BandTool::updateTool(), Isis::BlinkTool::updateTool(), updateTool(), Isis::FileTool::updateTool(), Isis::FindTool::updateTool(), Isis::LatLonGridTool::updateTool(), Isis::SpecialPixelTool::updateTool(), Isis::StretchTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::WindowTool::updateTool(), Isis::ZoomTool::updateTool(), Isis::AbstractPlotTool::viewportsToPlot(), writeToCube(), Isis::ZoomTool::zoomBy(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), Isis::ZoomTool::zoomFitWidth(), and Isis::ZoomTool::zoomManual().

◆ cubeViewportList()

Tool::CubeViewportList * Isis::Tool::cubeViewportList ( ) const
protectedinherited

Return the list of cubeviewports.

Returns
CubeViewportList*

Definition at line 390 of file Tool.cpp.

References Isis::Workspace::cubeViewportList().

Referenced by Isis::BlinkTool::advance(), Isis::SpecialPixelTool::apply(), Isis::FindTool::centerLinkedViewports(), Isis::WindowTool::changeCursor(), Isis::FileTool::closeAll(), Isis::BandTool::copyAllViewports(), Isis::BandTool::copyLinkedViewports(), Isis::MatchTool::createPoint(), Isis::BlinkTool::eventFilter(), Isis::FeatureNomenclatureTool::featuresIdentified(), Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::FeatureNomenclatureTool::findNomenclatureStateChanged(), Isis::FindTool::handleLinkClicked(), Isis::WindowTool::linkWindows(), Isis::RubberBandTool::mouseButtonRelease(), Isis::RubberBandTool::mouseMove(), Isis::QnetTool::openGround(), Isis::ControlNetTool::paintAllViewports(), Isis::MatchTool::paintAllViewports(), Isis::StereoTool::paintAllViewports(), Isis::QnetTool::paintAllViewports(), Isis::FindTool::refresh(), Isis::AbstractPlotTool::repaintViewports(), Isis::ScatterPlotTool::repaintViewports(), Isis::AbstractPlotTool::repaintViewports(), Isis::WindowTool::resizeWindows(), Isis::BlinkTool::reverse(), Isis::ZoomTool::rubberBandComplete(), Isis::MatchTool::serialNumberList(), Isis::ControlNetTool::setControlNet(), Isis::FeatureNomenclatureTool::setFontColor(), Isis::FeatureNomenclatureTool::setFontSize(), Isis::FeatureNomenclatureTool::setShowApprovedOnly(), Isis::StretchTool::setStretchAllViewports(), Isis::FeatureNomenclatureTool::setVectorType(), Isis::StretchTool::stretchGlobalAllViewports(), Isis::BlinkTool::toggleLink(), Isis::WindowTool::unlinkWindows(), Isis::MeasureTool::updateMeasure(), Isis::AdvancedTrackTool::updateRow(), Isis::BlinkTool::updateTool(), Isis::FindTool::updateTool(), Isis::WindowTool::updateTool(), Isis::AbstractPlotTool::viewportsToPlot(), Isis::ZoomTool::zoomBy(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), Isis::ZoomTool::zoomFitWidth(), and Isis::ZoomTool::zoomManual().

◆ disableToolBar()

void Isis::Tool::disableToolBar ( )
privateinherited

Disables entire tool bar.

Definition at line 285 of file Tool.cpp.

References Isis::Tool::m_toolBarWidget.

Referenced by Isis::Tool::activate(), and Isis::Tool::addToActive().

◆ enableRubberBandTool

void Isis::EditTool::enableRubberBandTool ( )
protectedvirtualslot

This method sets up the RubberBandTool depending on which mode is enabled.

If a valid RubberBandTool mode is not enabled the RubberBandTool is disabled.

Definition at line 926 of file EditTool.cpp.

References Isis::RubberBandTool::disable(), Isis::RubberBandTool::enable(), p_shapeComboBox, and Isis::RubberBandTool::setDrawActiveViewportOnly().

Referenced by createToolBarWidget().

◆ enableToolBar()

void Isis::Tool::enableToolBar ( )
privateinherited

Enables entire tool bar.

Definition at line 297 of file Tool.cpp.

References Isis::Tool::cubeViewport(), Isis::Tool::m_toolBarWidget, and Isis::Tool::updateTool().

Referenced by Isis::Tool::activate(), and Isis::Tool::setCubeViewport().

◆ LineToPoints()

QList< QPoint * > * Isis::EditTool::LineToPoints ( const QLine & line)
private

Convert rubber band line to points.

This routine takes two points (sx,sy) and (ex,ey) and determines all the points which make up that line segment. This is useful for drawing graphic on a display or image

Author
Jan 1 1996 Jeff Anderson, Original version
Parameters
lineinput Line to be converted to points
Returns
QList<QPoint*>* A pointer to a QList of points representing line

Definition at line 842 of file EditTool.cpp.

References Isis::Tool::cubeViewport().

Referenced by rubberBandComplete().

◆ listenToViewport

void Isis::EditTool::listenToViewport ( MdiCubeViewport * newViewport)
privateslot

Definition at line 361 of file EditTool.cpp.

◆ menuName()

virtual QString Isis::Tool::menuName ( ) const
inlinevirtualinherited

Anytime a tool is created, you must give it a name for the menu.

Returns
QString

Reimplemented in Isis::AdvancedTrackTool, Isis::BandTool, Isis::BlinkTool, Isis::FeatureNomenclatureTool, Isis::FileTool, Isis::FindTool, Isis::HelpTool, Isis::MeasureTool, Isis::PanTool, Isis::SpecialPixelTool, Isis::StretchTool, Isis::WindowTool, and Isis::ZoomTool.

Definition at line 83 of file Tool.h.

Referenced by Isis::Tool::addTo().

◆ mouseButtonPress()

void Isis::Tool::mouseButtonPress ( QPoint p,
Qt::MouseButton s )
protectedvirtualinherited
Parameters
p
s

Definition at line 367 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().

◆ mouseButtonRelease

void Isis::EditTool::mouseButtonRelease ( QPoint p,
Qt::MouseButton m )
protectedslot

This is a slot called when any mouse button is released inside of a viewport.

Parameters
pinput The point under the cursor
minput Mouse button released (left,middle,right)
History

2007-03-02 Tracie Sucharski - Reopen cube read/write Workspace::addCubeViewport was opening cube read/write, changed to open read only so that the cube date was not changed unless EditTool is invoked.

2007-02-26 Tracie Sucharski - Remove test for off image editing. It is no longer needed since the bug in the Cube class is fixed.

2008-05-23 Noah Hilt - Removed the rectangle and start/end line functionality from the mouseButtonRelease and moved it to the rubberBandComplete method.

2017-08-11 Adam Goins - Added a "vp->cube()->open("r")" call to reopen the cube with "r" permissions if the attempted "rw" permission didn't succeed. Fixes segfault issue if editing is attempted on cube without "w" access. (ref # 2097)

Definition at line 397 of file EditTool.cpp.

References Isis::Tool::cubeViewport(), HorizLine, p_dn, p_dnLineEdit, p_shapeComboBox, p_valTypeComboBox, Point, UserDnComboValue, VertLine, and writeToCube().

◆ mouseDoubleClick()

void Isis::Tool::mouseDoubleClick ( QPoint p)
protectedvirtualinherited
Parameters
p

Definition at line 358 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().

◆ mouseEnter

virtual void Isis::Tool::mouseEnter ( )
inlineprotectedvirtualslotinherited

Definition at line 152 of file Tool.h.

◆ mouseLeave

virtual void Isis::Tool::mouseLeave ( )
inlineprotectedvirtualslotinherited

Definition at line 159 of file Tool.h.

◆ mouseMove [1/2]

void Isis::Tool::mouseMove ( QPoint p)
protectedvirtualslotinherited
Parameters
p

Definition at line 352 of file Tool.cpp.

Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().

◆ mouseMove [2/2]

virtual void Isis::Tool::mouseMove ( QPoint p,
Qt::MouseButton  )
inlineprotectedvirtualslotinherited

Definition at line 155 of file Tool.h.

◆ paintViewport()

virtual void Isis::Tool::paintViewport ( MdiCubeViewport * vp,
QPainter * painter )
inlinevirtualinherited

◆ redoEdit

void Isis::EditTool::redoEdit ( )
privateslot

This method is called to redo any edit operations that have been undone.

Definition at line 703 of file EditTool.cpp.

References cubeChanged(), Isis::Tool::cubeViewport(), p_redoButton, p_redoEdit, p_saveButton, p_undoButton, and p_undoEdit.

Referenced by createToolBarWidget().

◆ registerTool()

void Isis::Tool::registerTool ( MdiCubeViewport * viewport)
protectedinherited

Registers the tool to the viewport.

Parameters
viewport

Definition at line 327 of file Tool.cpp.

References Isis::Tool::m_cvp, and Isis::MdiCubeViewport::registerTool().

Referenced by Isis::Tool::addTo().

◆ removeConnections()

virtual void Isis::Tool::removeConnections ( MdiCubeViewport * cvp)
inlineprotectedvirtualinherited

Anytime a tool is created, you must be able to remove it's connections.

Parameters
cvp

Reimplemented in Isis::MeasureTool, Isis::TrackTool, and Isis::WindowTool.

Definition at line 247 of file Tool.h.

Referenced by Isis::Tool::removeViewportConnections().

◆ removeViewport

void Isis::EditTool::removeViewport ( QObject * vp)
privateslot

This is a private slot called to clean up when a viewport is destroyed.

This viewport is removed from the undoEdit hash.

Parameters
vpinput Viewport to be removed from the undo edit hash

Definition at line 806 of file EditTool.cpp.

References p_redoEdit, and p_undoEdit.

◆ removeViewportConnections()

void Isis::Tool::removeViewportConnections ( )
privateinherited

◆ rubberBandComplete

void Isis::EditTool::rubberBandComplete ( )
protectedslot

This method is called any time the RubberBandTool is complete.

It checks if the viewport is writable, checks which mode it is in, either line or rectangle, and if RubberBandTool is valid. It then writes the data from the RubberBandTool to the cube.

Definition at line 263 of file EditTool.cpp.

References Isis::Tool::cubeViewport(), LineToPoints(), p_shapeComboBox, Rectangle, Isis::RubberBandTool::rectangle(), StartEndLine, and writeToCube().

◆ rubberBandTool()

RubberBandTool * Isis::Tool::rubberBandTool ( )
inherited

Definition at line 57 of file Tool.cpp.

◆ save [1/2]

void Isis::EditTool::save ( )
signal

Emitted when cube should be saved.

Referenced by createToolBarWidget().

◆ save [2/2]

void Isis::EditTool::save ( CubeViewport * vp)
privateslot

This method saves by removing any undo history for the viewport vp and reopening the cube.

These changes are finalized! There is no undoing after a save has been made.

Parameters
vp

Definition at line 779 of file EditTool.cpp.

References p_saveButton, p_saveMarker, and p_undoEdit.

◆ saveAs

void Isis::EditTool::saveAs ( )
signal

Emitted when cube should be saved as another file.

Referenced by createToolBarWidget().

◆ scaleChanged()

virtual void Isis::Tool::scaleChanged ( )
inlineprotectedvirtualinherited

Definition at line 172 of file Tool.h.

◆ screenPixelsChanged

virtual void Isis::Tool::screenPixelsChanged ( )
inlineprotectedvirtualslotinherited

This is called when actions change which pixels from the cube are displayed.

Definition at line 148 of file Tool.h.

Referenced by Isis::Tool::addViewportConnections(), Isis::Tool::removeViewportConnections(), and Isis::FeatureNomenclatureTool::viewportDone().

◆ selectValType

void Isis::EditTool::selectValType ( int index)
privateslot

This is a private slot which is called when the user selects a new dn type.

Parameters
indexinput This is the index selected in the valType combo box

Definition at line 197 of file EditTool.cpp.

References Isis::His, HisComboValue, Isis::Hrs, HrsComboValue, Isis::Lis, LisComboValue, Isis::Lrs, LrsComboValue, Isis::Null, NullComboValue, p_dn, p_dnLineEdit, p_valTypeComboBox, and UserDnComboValue.

Referenced by createToolBarWidget().

◆ setCubeViewport

void Isis::Tool::setCubeViewport ( MdiCubeViewport * cvp)
slotinherited

◆ setList()

void Isis::Tool::setList ( ToolList * currentList)
inherited

Definition at line 68 of file Tool.cpp.

◆ stretchRequested()

virtual void Isis::Tool::stretchRequested ( MdiCubeViewport * ,
int  )
inlineprotectedvirtualinherited

Reimplemented in Isis::StretchTool.

Definition at line 177 of file Tool.h.

◆ toolIconDir()

◆ toolPadAction()

QAction * Isis::EditTool::toolPadAction ( ToolPad * pad)
protectedvirtual

Adds the EditTool to the tool pad.

Parameters
padinput The tool pad that EditTool is to be added to
Returns
QAction*

Reimplemented from Isis::Tool.

Definition at line 59 of file EditTool.cpp.

References Isis::Tool::toolIconDir().

◆ undoAll

void Isis::EditTool::undoAll ( CubeViewport * vp)
privateslot

This method is used to discard any changes made to this viewport.

If the viewport has been saved, then it will only discard changes to that save point.

Parameters
vp

Definition at line 644 of file EditTool.cpp.

References p_redoEdit, p_saveMarker, and p_undoEdit.

◆ undoEdit

void Isis::EditTool::undoEdit ( )
privateslot

This is a private slot called when the user selects the undo button.

With each call, another edit is reversed.

Definition at line 568 of file EditTool.cpp.

References cubeChanged(), Isis::Tool::cubeViewport(), p_redoButton, p_redoEdit, p_saveButton, p_undoButton, and p_undoEdit.

Referenced by createToolBarWidget().

◆ updateMeasure()

virtual void Isis::Tool::updateMeasure ( )
inlineprotectedvirtualinherited

Definition at line 167 of file Tool.h.

◆ updateTool()

void Isis::EditTool::updateTool ( )
protectedvirtual

This is a virtual function belonging to the Tool class which is called when the user selects a different viewport.

This sets up the signal/slot for destruction of a viewport so the viewport is removed from the undoEdit hash.

Reimplemented from Isis::Tool.

Definition at line 229 of file EditTool.cpp.

References Isis::Tool::cubeViewport(), p_redoButton, p_redoEdit, p_saveButton, p_undoButton, and p_undoEdit.

◆ workspace()

Workspace * Isis::Tool::workspace ( )
protectedinherited

Definition at line 344 of file Tool.cpp.

◆ writeToCube()

void Isis::EditTool::writeToCube ( int iesamp,
int issamp,
int ieline,
int isline,
QList< QPoint * > * linePts )
private
Parameters
iesampinput
issampinput
ielineinput
islineinput
linePtsinput If the input data is a line, this will be the list of points in the line.

Definition at line 485 of file EditTool.cpp.

References cubeChanged(), Isis::Tool::cubeViewport(), p_dn, p_redoButton, p_redoEdit, p_saveButton, p_shapeComboBox, p_undoButton, p_undoEdit, and StartEndLine.

Referenced by mouseButtonRelease(), and rubberBandComplete().

Member Data Documentation

◆ m_active

bool Isis::Tool::m_active
privateinherited

Is the tool acitve?

Definition at line 264 of file Tool.h.

Referenced by Isis::Tool::activate(), Isis::Tool::setCubeViewport(), and Isis::Tool::Tool().

◆ m_container

QWidget* Isis::EditTool::m_container
private

Definition at line 137 of file EditTool.h.

◆ m_cvp

◆ m_toolBarWidget

QWidget* Isis::Tool::m_toolBarWidget
privateinherited

The tool bar on which this tool resides.

Definition at line 265 of file Tool.h.

Referenced by Isis::Tool::addToActive(), Isis::Tool::disableToolBar(), Isis::Tool::enableToolBar(), and Isis::Tool::Tool().

◆ m_toolIconDir

QString Isis::Tool::m_toolIconDir
privateinherited

The pathway to the icon directory.

Definition at line 267 of file Tool.h.

Referenced by Isis::Tool::Tool(), and Isis::Tool::toolIconDir().

◆ m_toolList

ToolList* Isis::Tool::m_toolList
privateinherited

Definition at line 268 of file Tool.h.

◆ m_toolPadAction

QAction* Isis::Tool::m_toolPadAction
privateinherited

The tool pad on which this tool resides.

Definition at line 266 of file Tool.h.

Referenced by Isis::Tool::activate(), Isis::Tool::addTo(), Isis::Tool::addViewportConnections(), and Isis::Tool::Tool().

◆ m_workspace

Workspace* Isis::Tool::m_workspace
privateinherited

Definition at line 262 of file Tool.h.

◆ p_dn

double Isis::EditTool::p_dn
private

DN value.

Definition at line 138 of file EditTool.h.

Referenced by changeDn(), EditTool(), mouseButtonRelease(), selectValType(), and writeToCube().

◆ p_dnLineEdit

QLineEdit* Isis::EditTool::p_dnLineEdit
private

DN edit line.

Definition at line 132 of file EditTool.h.

Referenced by changeDn(), createToolBarWidget(), mouseButtonRelease(), and selectValType().

◆ p_redoButton

QToolButton* Isis::EditTool::p_redoButton
private

Redo button.

Definition at line 134 of file EditTool.h.

Referenced by createToolBarWidget(), redoEdit(), undoEdit(), updateTool(), and writeToCube().

◆ p_redoEdit

QMap<CubeViewport *, QStack <Brick *> *> Isis::EditTool::p_redoEdit
private

Viewport to brick map for redo.

Definition at line 141 of file EditTool.h.

Referenced by redoEdit(), removeViewport(), undoAll(), undoEdit(), updateTool(), and writeToCube().

◆ p_saveAsButton

QToolButton* Isis::EditTool::p_saveAsButton
private

Save as button.

Definition at line 136 of file EditTool.h.

Referenced by createToolBarWidget().

◆ p_saveButton

QToolButton* Isis::EditTool::p_saveButton
private

Save button.

Definition at line 135 of file EditTool.h.

Referenced by createToolBarWidget(), redoEdit(), save(), undoEdit(), updateTool(), and writeToCube().

◆ p_saveMarker

QMap<CubeViewport *, int> Isis::EditTool::p_saveMarker
private

Marker for last save.

Definition at line 142 of file EditTool.h.

Referenced by save(), and undoAll().

◆ p_shapeComboBox

QComboBox* Isis::EditTool::p_shapeComboBox
private

◆ p_undoButton

QToolButton* Isis::EditTool::p_undoButton
private

Undo button.

Definition at line 133 of file EditTool.h.

Referenced by createToolBarWidget(), redoEdit(), undoEdit(), updateTool(), and writeToCube().

◆ p_undoEdit

QMap<CubeViewport *, QStack <Brick *> *> Isis::EditTool::p_undoEdit
private

Viewport to brick map for undo.

Definition at line 140 of file EditTool.h.

Referenced by redoEdit(), removeViewport(), save(), undoAll(), undoEdit(), updateTool(), and writeToCube().

◆ p_valTypeComboBox

QComboBox* Isis::EditTool::p_valTypeComboBox
private

Value type combobox.

Definition at line 131 of file EditTool.h.

Referenced by createToolBarWidget(), mouseButtonRelease(), and selectValType().


The documentation for this class was generated from the following files: