Isis 3.0
Back | Home
Isis::EditTool Class Reference

Interactive image edit tool. More...

#include <EditTool.h>

Inherits Isis::Tool.

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

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

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

Member Typedef Documentation

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

A list of cubeviewports.

Member Enumeration Documentation

Enum for possible shapes.

Enumerator
Point 

point

HorizLine 

horizontal line

VertLine 

vertical line

StartEndLine 

start-end line

Rectangle 

rectangle

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.

Constructor & Destructor Documentation

Isis::EditTool::EditTool ( QWidget parent)

Constructs and EditTool object.

Parameters
parentParent widget

References Isis::Null.

Member Function Documentation

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.

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

Adds the tool to the toolpad.

Parameters
toolpad

References Isis::Tool::activate(), Isis::ToolPad::addAction(), and Isis::Tool::toolPadAction().

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

Adds the given workspace to the cubeviewport list.

Parameters
ws

Reimplemented from Isis::Tool.

References Isis::Tool::addTo().

void Isis::Tool::addToActive ( QToolBar toolbar)
inherited
virtual void Isis::Tool::addToPermanent ( QToolBar toolbar)
inlinevirtualinherited
void Isis::Tool::clearWarningSignal ( )
signalinherited
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.

References enableRubberBandTool(), HisComboValue, HrsComboValue, LisComboValue, LrsComboValue, NullComboValue, save(), saveAs(), Isis::Tool::toolIconDir(), and UserDnComboValue.

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

Emitted when cube changed.

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

Return the current cubeviewport.

Returns
CubeViewport*

Referenced by Isis::WindowTool::addConnections(), Isis::TrackTool::addConnections(), Isis::FileTool::discard(), Isis::FileTool::exportView(), Isis::SunShadowTool::mouseButtonPress(), Isis::PanTool::mouseButtonRelease(), Isis::IpceTool::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::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::WindowTool::removeConnections(), Isis::TrackTool::removeConnections(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), Isis::ZoomTool::rubberBandComplete(), Isis::StereoTool::rubberBandComplete(), rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveInfo(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), Isis::StretchTool::stretchGlobal(), Isis::StretchTool::stretchGlobalAllBands(), Isis::StretchTool::stretchRegional(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::MeasureTool::updateMeasure(), 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(), and Isis::AbstractPlotTool::viewportsToPlot().

void Isis::EditTool::enableRubberBandTool ( )
protectedvirtualslot
virtual QString Isis::Tool::menuName ( ) const
inlinevirtualinherited
void Isis::Tool::mouseButtonPress ( QPoint  p,
Qt::MouseButton  s 
)
protectedvirtualslotinherited
Parameters
p
s

References Isis::Tool::clearWarningSignal().

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.

References Isis::CubeViewport::cube(), Isis::CubeViewport::cubeLines(), Isis::CubeViewport::cubeSamples(), Isis::Tool::cubeViewport(), Isis::CubeViewport::grayBand(), HorizLine, Isis::CubeViewport::isColor(), Isis::Cube::isReadOnly(), Isis::Cube::lineCount(), Isis::Cube::pixelType(), Point, Isis::Cube::read(), Isis::Cube::reopen(), Isis::Cube::sampleCount(), Isis::Brick::SetBasePosition(), UserDnComboValue, VertLine, and Isis::CubeViewport::viewportToCube().

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

References Isis::Tool::clearWarningSignal().

virtual void Isis::Tool::mouseEnter ( )
inlineprotectedvirtualslotinherited
virtual void Isis::Tool::mouseLeave ( )
inlineprotectedvirtualslotinherited
void Isis::Tool::mouseMove ( QPoint  p)
protectedvirtualslotinherited
Parameters
p
virtual void Isis::Tool::mouseMove ( QPoint  p,
Qt::MouseButton   
)
inlineprotectedvirtualslotinherited
virtual void Isis::Tool::paintViewport ( MdiCubeViewport vp,
QPainter *  painter 
)
inlinevirtualinherited
void Isis::Tool::registerTool ( MdiCubeViewport viewport)
protectedslotinherited

Registers the tool to the viewport.

Parameters
viewport

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

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

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.

void Isis::EditTool::rubberBandComplete ( )
protectedslot
void Isis::EditTool::save ( )
signal

Emitted when cube should be saved.

Referenced by createToolBarWidget().

void Isis::EditTool::saveAs ( )
signal

Emitted when cube should be saved as another file.

Referenced by createToolBarWidget().

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

Reimplemented in Isis::RubberBandTool.

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

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

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

Sets the current viewport to the given cvp.

Parameters
cvp

References Isis::Tool::updateTool(), and Isis::Tool::viewportChanged().

Referenced by Isis::Tool::addTo(), and Isis::FileTool::closeAll().

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

Referenced by Isis::ToolList::append().

virtual void Isis::Tool::stretchRequested ( MdiCubeViewport ,
int   
)
inlineprotectedvirtualslotinherited

Reimplemented in Isis::StretchTool.

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

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.

References Isis::Tool::toolIconDir().

virtual void Isis::Tool::updateMeasure ( )
inlineprotectedvirtualslotinherited
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.

References Isis::Tool::cubeViewport().

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

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

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:36:50