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. More...
 
void setCubeViewport (MdiCubeViewport *cvp)
 Sets the current viewport to the given cvp. More...
 

Signals

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

Public Member Functions

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

Protected Types

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

Protected Slots

void mouseButtonRelease (QPoint p, Qt::MouseButton m)
 This is a slot called when any mouse button is released inside of a viewport. More...
 
virtual void enableRubberBandTool ()
 This method sets up the RubberBandTool depending on which mode is enabled. More...
 
void rubberBandComplete ()
 This method is called any time the RubberBandTool is complete. More...
 
virtual void screenPixelsChanged ()
 This is called when actions change which pixels from the cube are displayed. More...
 
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. More...
 
QWidgetcreateToolBarWidget (QStackedWidget *active)
 Creates the toolbar containing the edit tool widgets. More...
 
void updateTool ()
 This is a virtual function belonging to the Tool class which is called when the user selects a different viewport. More...
 
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. More...
 
MdiCubeViewportcubeViewport () const
 Return the current cubeviewport. More...
 
CubeViewportListcubeViewportList () const
 Return the list of cubeviewports. More...
 
virtual void addConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must add the connections for it. More...
 
virtual void removeConnections (MdiCubeViewport *cvp)
 Anytime a tool is created, you must be able to remove it's connections. More...
 
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. More...
 
void changeDn ()
 This is a private slot called when the user hits the enter key after typing a value in the dnLineEdit field. More...
 
void undoEdit ()
 This is a private slot called when the user selects the undo button. More...
 
void undoAll (CubeViewport *vp)
 This method is used to discard any changes made to this viewport. More...
 
void redoEdit ()
 This method is called to redo any edit operations that have been undone. More...
 
void save (CubeViewport *vp)
 This method saves by removing any undo history for the viewport vp and reopening the cube. More...
 
void removeViewport (QObject *vp)
 This is a private slot called to clean up when a viewport is destroyed. More...
 

Private Member Functions

QList< QPoint * > * LineToPoints (const QLine &line)
 Convert rubber band line to points. More...
 
void writeToCube (int iesamp, int issamp, int ieline, int isline, QList< QPoint *> *linePts)
 

Private Attributes

QComboBoxp_shapeComboBox
 Shape combobox. More...
 
QComboBoxp_valTypeComboBox
 Value type combobox. More...
 
QLineEdit * p_dnLineEdit
 DN edit line. More...
 
QToolButton * p_undoButton
 Undo button. More...
 
QToolButton * p_redoButton
 Redo button. More...
 
QToolButton * p_saveButton
 Save button. More...
 
QToolButton * p_saveAsButton
 Save as button. More...
 
QWidgetm_container
 
double p_dn
 DN value. More...
 
QMap< CubeViewport *, QStack< Brick * > * > p_undoEdit
 Viewport to brick map for undo. More...
 
QMap< CubeViewport *, QStack< Brick * > * > p_redoEdit
 Viewport to brick map for redo. More...
 
QMap< CubeViewport *, int > p_saveMarker
 Marker for last save. More...
 

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 84 of file EditTool.h.

Member Typedef Documentation

◆ CubeViewportList

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

A list of cubeviewports.

Definition at line 219 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 91 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 103 of file EditTool.h.

Constructor & Destructor Documentation

◆ EditTool()

Isis::EditTool::EditTool ( QWidget parent)

Constructs and EditTool object.

Parameters
parentParent widget

Definition at line 55 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 253 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::ToolPad::addAction(), 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 59 of file EditTool.cpp.

References Isis::Tool::addTo().

◆ addToActive()

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

◆ addToPermanent()

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

◆ 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 231 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 98 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 211 of file Tool.h.

References Isis::Tool::m_cvp.

Referenced by Isis::WindowTool::addConnections(), Isis::TrackTool::addConnections(), Isis::StretchTool::advancedStretchChanged(), Isis::FindTool::centerLinkedViewports(), Isis::StretchTool::changeStretch(), Isis::BandTool::changeView(), Isis::BandTool::copyLinkedViewports(), Isis::FileTool::discard(), Isis::Tool::enableToolBar(), Isis::FileTool::exportToList(), Isis::FileTool::exportView(), Isis::StatisticsTool::getStatistics(), Isis::FindTool::handleRecordClicked(), LineToPoints(), Isis::TrackTool::locateCursor(), Isis::SunShadowTool::mouseButtonPress(), Isis::ControlNetTool::mouseButtonRelease(), Isis::RubberBandTool::mouseButtonRelease(), mouseButtonRelease(), Isis::FeatureNomenclatureTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::StretchTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::AdvancedTrackTool::mouseLeave(), Isis::ScatterPlotTool::mouseMove(), Isis::SunShadowTool::mouseMove(), Isis::TrackTool::mouseMove(), Isis::RubberBandTool::mouseMove(), Isis::SunShadowTool::paintViewport(), Isis::RubberBandTool::paintViewport(), Isis::FindTool::paintViewport(), Isis::FileTool::print(), Isis::SunShadowTool::recalculateShadowHeight(), redoEdit(), Isis::FindTool::refresh(), Isis::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::WindowTool::removeConnections(), Isis::TrackTool::removeConnections(), Isis::RubberBandTool::repaint(), Isis::WindowTool::resizeWindows(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), Isis::ZoomTool::rubberBandComplete(), rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveAsReducedCube(), Isis::FileTool::saveInfo(), 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::WindowTool::updateTool(), Isis::BlinkTool::updateTool(), Isis::SpecialPixelTool::updateTool(), Isis::BandTool::updateTool(), Isis::SunShadowTool::updateTool(), Isis::AbstractPlotTool::updateTool(), Isis::ZoomTool::updateTool(), Isis::FileTool::updateTool(), updateTool(), Isis::FindTool::updateTool(), Isis::StretchTool::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::StereoTool::paintAllViewports(), Isis::ControlNetTool::paintAllViewports(), Isis::MatchTool::paintAllViewports(), Isis::QnetTool::paintAllViewports(), Isis::FindTool::refresh(), 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::WindowTool::updateTool(), Isis::BlinkTool::updateTool(), Isis::FindTool::updateTool(), Isis::AbstractPlotTool::viewportsToPlot(), Isis::ZoomTool::zoomBy(), Isis::ZoomTool::zoomFit(), Isis::ZoomTool::zoomFitHeight(), Isis::ZoomTool::zoomFitWidth(), and Isis::ZoomTool::zoomManual().

◆ 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 940 of file EditTool.cpp.

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

Referenced by createToolBarWidget().

◆ 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 856 of file EditTool.cpp.

References Isis::CubeViewport::cubeLines(), and Isis::Tool::cubeViewport().

Referenced by rubberBandComplete().

◆ menuName()

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

◆ 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 411 of file EditTool.cpp.

References Isis::CubeViewport::cube(), Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), Isis::Tool::cubeViewport(), Isis::Cube::fileName(), Isis::CubeViewport::grayBand(), HorizLine, Isis::CubeViewport::isColor(), Isis::Cube::isReadOnly(), Isis::Cube::lineCount(), Isis::Cube::open(), p_dn, p_dnLineEdit, p_shapeComboBox, p_valTypeComboBox, Isis::Cube::pixelType(), Point, Isis::Cube::read(), Isis::Cube::reopen(), Isis::Cube::sampleCount(), Isis::Brick::SetBasePosition(), UserDnComboValue, VertLine, Isis::CubeViewport::viewportToCube(), 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().

◆ mouseMove

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().

◆ paintViewport()

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

◆ redoEdit

◆ 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 261 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 820 of file EditTool.cpp.

References p_redoEdit, and p_undoEdit.

◆ rubberBandComplete

void Isis::EditTool::rubberBandComplete ( )
protectedslot

◆ 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 793 of file EditTool.cpp.

References Isis::CubeViewport::cubeChanged(), p_saveButton, p_saveMarker, p_undoEdit, and Isis::CubeViewport::setCaption().

◆ saveAs

void Isis::EditTool::saveAs ( )
signal

Emitted when cube should be saved as another file.

Referenced by createToolBarWidget().

◆ screenPixelsChanged

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

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

Definition at line 162 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 211 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

◆ toolIconDir()

QString Isis::Tool::toolIconDir ( ) const
inlineinherited

◆ 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 73 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 658 of file EditTool.cpp.

References Isis::CubeViewport::cube(), Isis::Cube::isReadOnly(), p_redoEdit, p_saveMarker, p_undoEdit, and Isis::Cube::write().

◆ undoEdit

◆ 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 243 of file EditTool.cpp.

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

◆ writeToCube()

void Isis::EditTool::writeToCube ( int  iesamp,
int  issamp,
int  ieline,
int  isline,
QList< QPoint *> *  linePts 
)
private

Member Data Documentation

◆ p_dn

double Isis::EditTool::p_dn
private

DN value.

Definition at line 152 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 146 of file EditTool.h.

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

◆ p_redoButton

QToolButton* Isis::EditTool::p_redoButton
private

Redo button.

Definition at line 148 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 155 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 150 of file EditTool.h.

Referenced by createToolBarWidget().

◆ p_saveButton

QToolButton* Isis::EditTool::p_saveButton
private

Save button.

Definition at line 149 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 156 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 147 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 154 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 145 of file EditTool.h.

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


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