Isis 3 Programmer Reference
|
Interactive image edit tool. More...
#include <EditTool.h>
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) |
RubberBandTool * | rubberBandTool () |
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 | |
QAction * | toolPadAction (ToolPad *pad) |
Adds the EditTool to the tool pad. More... | |
QWidget * | createToolBarWidget (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... | |
MdiCubeViewport * | cubeViewport () const |
Return the current cubeviewport. More... | |
CubeViewportList * | cubeViewportList () 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... | |
Workspace * | workspace () |
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 | |
QComboBox * | p_shapeComboBox |
Shape combobox. More... | |
QComboBox * | p_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... | |
QWidget * | m_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... | |
Interactive image edit tool.
This tool is part of the Qisis namespace and allows interactive editing of displayed images.
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.
|
protectedinherited |
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.
Enum for DN values.
Definition at line 103 of file EditTool.h.
Isis::EditTool::EditTool | ( | QWidget * | parent | ) |
Constructs and EditTool object.
parent | Parent widget |
Definition at line 55 of file EditTool.cpp.
References Isis::Null, and p_dn.
|
slotinherited |
Activates the tool.
on |
Definition at line 131 of file Tool.cpp.
References Isis::Tool::addViewportConnections(), Isis::Tool::disableToolBar(), Isis::Tool::enableToolBar(), Isis::Tool::m_active, Isis::Tool::m_toolPadAction, and Isis::Tool::removeViewportConnections().
Referenced by Isis::Tool::addTo(), Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::RubberBandTool::disable(), Isis::RubberBandTool::enable(), Isis::AdvancedTrackTool::eventFilter(), Isis::FileTool::FileTool(), Isis::RubberBandTool::RubberBandTool(), Isis::TrackTool::TrackTool(), Isis::WindowTool::WindowTool(), and Isis::Workspace::Workspace().
|
inlineprotectedvirtualinherited |
Anytime a tool is created, you must add the connections for it.
cvp |
Reimplemented in Isis::TrackTool, and Isis::WindowTool.
Definition at line 253 of file Tool.h.
Referenced by Isis::Tool::addViewportConnections().
|
inherited |
Adds the tool to the application.
pViewPortMnWin |
Definition at line 78 of file Tool.cpp.
References Isis::ViewportMainWindow::activeToolBar(), Isis::Tool::addToActive(), Isis::Tool::addToPermanent(), Isis::ViewportMainWindow::getMenu(), Isis::Tool::menuName(), Isis::ViewportMainWindow::permanentToolBar(), Isis::ViewportMainWindow::toolPad(), and Isis::ViewportMainWindow::workspace().
Referenced by Isis::WindowTool::addTo(), Isis::SpecialPixelTool::addTo(), Isis::FileTool::addTo(), addTo(), Isis::ViewportMainWindow::ViewportMainWindow(), and Isis::Workspace::Workspace().
|
inherited |
Adds the tool to the toolpad.
toolpad |
Definition at line 98 of file Tool.cpp.
References Isis::Tool::activate(), Isis::ToolPad::addAction(), Isis::Tool::m_toolPadAction, and Isis::Tool::toolPadAction().
|
inlinevirtualinherited |
menu |
Reimplemented in Isis::FindTool, Isis::FeatureNomenclatureTool, Isis::AdvancedTrackTool, Isis::StretchTool, Isis::QnetFileTool, Isis::ZoomTool, Isis::FileTool, Isis::SpectralPlotTool, Isis::MeasureTool, Isis::SunShadowTool, Isis::HelpTool, Isis::SpecialPixelTool, Isis::BlinkTool, Isis::WindowTool, and Isis::PanTool.
|
virtual |
Adds the given workspace to the cubeviewport list.
ws |
Reimplemented from Isis::Tool.
Definition at line 59 of file EditTool.cpp.
References Isis::Tool::addTo().
|
inherited |
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(), and Isis::Workspace::Workspace().
|
inlinevirtualinherited |
toolbar |
Reimplemented in Isis::AdvancedTrackTool, Isis::FileTool, Isis::HelpTool, Isis::SpecialPixelTool, Isis::BlinkTool, and Isis::WindowTool.
Definition at line 111 of file Tool.h.
Referenced by Isis::Tool::addTo(), and Isis::Workspace::Workspace().
|
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().
|
protectedvirtual |
Creates the toolbar containing the edit tool widgets.
active | input The widget that will contain the edit tool specific widgets |
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.
|
signal |
Emitted when cube changed.
Referenced by redoEdit(), undoEdit(), and writeToCube().
|
inlineprotectedinherited |
Return the current 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().
|
protectedinherited |
Return the list of cubeviewports.
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().
|
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().
|
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
line | input Line to be converted to points |
Definition at line 856 of file EditTool.cpp.
References Isis::CubeViewport::cubeLines(), and Isis::Tool::cubeViewport().
Referenced by rubberBandComplete().
|
inlinevirtualinherited |
Anytime a tool is created, you must give it a name for the menu.
Reimplemented in Isis::FindTool, Isis::StretchTool, Isis::FeatureNomenclatureTool, Isis::AdvancedTrackTool, Isis::FileTool, Isis::ZoomTool, Isis::MeasureTool, Isis::BandTool, Isis::HelpTool, Isis::SpecialPixelTool, Isis::BlinkTool, Isis::WindowTool, and Isis::PanTool.
Definition at line 97 of file Tool.h.
Referenced by Isis::Tool::addTo(), and Isis::Workspace::Workspace().
|
protectedvirtualinherited |
p | |
s |
Definition at line 367 of file Tool.cpp.
Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().
|
protectedslot |
This is a slot called when any mouse button is released inside of a viewport.
p | input The point under the cursor |
m | input Mouse button released (left,middle,right) |
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().
|
protectedvirtualinherited |
p |
Definition at line 358 of file Tool.cpp.
Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().
|
protectedvirtualslotinherited |
p |
Definition at line 352 of file Tool.cpp.
Referenced by Isis::Tool::addViewportConnections(), and Isis::Tool::removeViewportConnections().
|
inlinevirtualinherited |
vp | |
painter |
Reimplemented in Isis::QnetTool, Isis::MatchTool, Isis::FindTool, Isis::FeatureNomenclatureTool, Isis::RubberBandTool, Isis::ControlNetTool, Isis::StereoTool, Isis::SunShadowTool, Isis::AbstractPlotTool, and Isis::ScatterPlotTool.
|
privateslot |
This method is called to redo any edit operations that have been undone.
Definition at line 717 of file EditTool.cpp.
References Isis::CubeViewport::cube(), cubeChanged(), Isis::CubeViewport::cubeChanged(), Isis::CubeViewport::cubeContentsChanged(), Isis::Tool::cubeViewport(), Isis::CubeViewport::grayBand(), Isis::Cube::isReadOnly(), Isis::Buffer::Line(), Isis::Buffer::LineDimension(), p_redoButton, p_redoEdit, p_saveButton, p_undoButton, p_undoEdit, Isis::Cube::pixelType(), Isis::Cube::read(), Isis::Buffer::Sample(), Isis::Buffer::SampleDimension(), Isis::Brick::SetBasePosition(), Isis::CubeViewport::setCaption(), and Isis::Cube::write().
Referenced by createToolBarWidget().
|
protectedinherited |
Registers the tool to the viewport.
viewport |
Definition at line 327 of file Tool.cpp.
References Isis::Tool::m_cvp, and Isis::MdiCubeViewport::registerTool().
Referenced by Isis::Tool::addTo().
|
inlineprotectedvirtualinherited |
Anytime a tool is created, you must be able to remove it's connections.
cvp |
Reimplemented in Isis::MeasureTool, Isis::TrackTool, and Isis::WindowTool.
Definition at line 261 of file Tool.h.
Referenced by Isis::Tool::removeViewportConnections().
|
privateslot |
This is a private slot called to clean up when a viewport is destroyed.
This viewport is removed from the undoEdit hash.
vp | input Viewport to be removed from the undo edit hash |
Definition at line 820 of file EditTool.cpp.
References p_redoEdit, and p_undoEdit.
|
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 277 of file EditTool.cpp.
References Isis::CubeViewport::cube(), Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), Isis::Tool::cubeViewport(), Isis::Cube::fileName(), Isis::CubeViewport::isColor(), Isis::Cube::isReadOnly(), Isis::RubberBandTool::isValid(), LineToPoints(), Isis::Cube::open(), p_shapeComboBox, Isis::RubberBandTool::rectangle(), Rectangle, Isis::Cube::reopen(), StartEndLine, Isis::CubeViewport::viewportToCube(), and writeToCube().
|
signal |
Emitted when cube should be saved.
Referenced by createToolBarWidget().
|
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.
vp |
Definition at line 793 of file EditTool.cpp.
References Isis::CubeViewport::cubeChanged(), p_saveButton, p_saveMarker, p_undoEdit, and Isis::CubeViewport::setCaption().
|
signal |
Emitted when cube should be saved as another file.
Referenced by createToolBarWidget().
|
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().
|
privateslot |
This is a private slot which is called when the user selects a new dn type.
index | input 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().
|
slotinherited |
Sets the current viewport to the given cvp.
cvp |
Definition at line 160 of file Tool.cpp.
References Isis::Tool::addViewportConnections(), Isis::Tool::enableToolBar(), Isis::Tool::m_active, Isis::Tool::m_cvp, Isis::Tool::removeViewportConnections(), and Isis::Tool::updateTool().
Referenced by Isis::Tool::addTo(), and Isis::FileTool::closeAll().
|
inlineinherited |
returns the path to the icon directory.
Definition at line 127 of file Tool.h.
References Isis::Tool::m_toolIconDir.
Referenced by Isis::AdvancedTrackTool::AdvancedTrackTool(), Isis::BlinkTool::BlinkTool(), Isis::MatchTool::createActions(), Isis::QnetTool::createActions(), Isis::StereoTool::createMenus(), Isis::PanTool::createToolBarWidget(), Isis::BandTool::createToolBarWidget(), Isis::StereoTool::createToolBarWidget(), Isis::ZoomTool::createToolBarWidget(), createToolBarWidget(), Isis::FindTool::createToolBarWidget(), Isis::StretchTool::createToolBarWidget(), Isis::FileTool::FileTool(), Isis::FindTool::FindTool(), Isis::HistogramTool::HistogramTool(), Isis::SpecialPixelTool::SpecialPixelTool(), Isis::RubberBandComboBox::toolIconDir(), Isis::PanTool::toolPadAction(), Isis::ScatterPlotTool::toolPadAction(), Isis::HistogramTool::toolPadAction(), Isis::BandTool::toolPadAction(), Isis::SunShadowTool::toolPadAction(), Isis::SpectralPlotTool::toolPadAction(), Isis::SpatialPlotTool::toolPadAction(), Isis::MeasureTool::toolPadAction(), Isis::StereoTool::toolPadAction(), Isis::ControlNetTool::toolPadAction(), Isis::ZoomTool::toolPadAction(), toolPadAction(), Isis::FeatureNomenclatureTool::toolPadAction(), Isis::StatisticsTool::toolPadAction(), Isis::FindTool::toolPadAction(), Isis::StretchTool::toolPadAction(), Isis::MatchTool::toolPadAction(), Isis::QnetTool::toolPadAction(), Isis::WindowTool::WindowTool(), and Isis::ZoomTool::ZoomTool().
Adds the EditTool to the tool pad.
pad | input The tool pad that EditTool is to be added to |
Reimplemented from Isis::Tool.
Definition at line 73 of file EditTool.cpp.
References Isis::Tool::toolIconDir().
|
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.
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().
|
privateslot |
This is a private slot called when the user selects the undo button.
With each call, another edit is reversed.
Definition at line 582 of file EditTool.cpp.
References Isis::CubeViewport::cube(), cubeChanged(), Isis::CubeViewport::cubeChanged(), Isis::CubeViewport::cubeContentsChanged(), Isis::Tool::cubeViewport(), Isis::CubeViewport::grayBand(), Isis::Cube::isReadOnly(), Isis::Buffer::Line(), Isis::Buffer::LineDimension(), p_redoButton, p_redoEdit, p_saveButton, p_undoButton, p_undoEdit, Isis::Cube::pixelType(), Isis::Cube::read(), Isis::Buffer::Sample(), Isis::Buffer::SampleDimension(), Isis::Brick::SetBasePosition(), Isis::CubeViewport::setCaption(), and Isis::Cube::write().
Referenced by createToolBarWidget().
|
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.
|
private |
iesamp | input |
issamp | input |
ieline | input |
isline | input |
linePts | input If the input data is a line, this will be the list of points in the line. |
Definition at line 499 of file EditTool.cpp.
References Isis::CubeViewport::cube(), cubeChanged(), Isis::CubeViewport::cubeChanged(), Isis::CubeViewport::cubeContentsChanged(), Isis::Tool::cubeViewport(), Isis::CubeViewport::grayBand(), Isis::Buffer::Line(), Isis::Buffer::LineDimension(), p_dn, p_redoButton, p_redoEdit, p_saveButton, p_shapeComboBox, p_undoButton, p_undoEdit, Isis::Cube::pixelType(), Isis::Cube::read(), Isis::Buffer::Sample(), Isis::Buffer::SampleDimension(), Isis::Brick::SetBasePosition(), Isis::CubeViewport::setCaption(), Isis::Buffer::size(), StartEndLine, and Isis::Cube::write().
Referenced by mouseButtonRelease(), and rubberBandComplete().
|
private |
DN value.
Definition at line 152 of file EditTool.h.
Referenced by changeDn(), EditTool(), mouseButtonRelease(), selectValType(), and writeToCube().
|
private |
DN edit line.
Definition at line 146 of file EditTool.h.
Referenced by changeDn(), createToolBarWidget(), mouseButtonRelease(), and selectValType().
|
private |
Redo button.
Definition at line 148 of file EditTool.h.
Referenced by createToolBarWidget(), redoEdit(), undoEdit(), updateTool(), and writeToCube().
|
private |
Viewport to brick map for redo.
Definition at line 155 of file EditTool.h.
Referenced by redoEdit(), removeViewport(), undoAll(), undoEdit(), updateTool(), and writeToCube().
|
private |
|
private |
Save button.
Definition at line 149 of file EditTool.h.
Referenced by createToolBarWidget(), redoEdit(), save(), undoEdit(), updateTool(), and writeToCube().
|
private |
Marker for last save.
Definition at line 156 of file EditTool.h.
|
private |
Shape combobox.
Definition at line 144 of file EditTool.h.
Referenced by createToolBarWidget(), enableRubberBandTool(), mouseButtonRelease(), rubberBandComplete(), and writeToCube().
|
private |
Undo button.
Definition at line 147 of file EditTool.h.
Referenced by createToolBarWidget(), redoEdit(), undoEdit(), updateTool(), and writeToCube().
|
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().
|
private |
Value type combobox.
Definition at line 145 of file EditTool.h.
Referenced by createToolBarWidget(), mouseButtonRelease(), and selectValType().