Isis Developer Reference
Isis::QnetTool Class Reference

Qnet tool operations. More...

#include <QnetTool.h>

Inheritance diagram for Isis::QnetTool:
Inheritance graph
Collaboration diagram for Isis::QnetTool:
Collaboration graph

Public Types

enum  MeasureColumns {
  FILENAME , CUBESN , SAMPLE , LINE ,
  APRIORISAMPLE , APRIORILINE , SAMPLERESIDUAL , LINERESIDUAL ,
  RESIDUALMAGNITUDE , SAMPLESHIFT , LINESHIFT , PIXELSHIFT ,
  GOODNESSOFFIT , IGNORED , EDITLOCK , TYPE
}
 

Public Slots

void updateList ()
 
void updateNet (QString cNetFileName)
 Updates the Control Network displayed in the Qnet Tool title bar.
 
void createPoint (double lat, double lon)
 Create new control point.
 
void createFixedPoint (double lat, double lon)
 Create new Fixed control point.
 
void modifyPoint (ControlPoint *point)
 Modify control point.
 
void deletePoint (ControlPoint *point)
 Delete control point.
 
void updatePointInfo (QString pointId)
 Update the current editPoint information in the Point Editor labels.
 
void refresh ()
 Refresh all necessary widgets in QnetTool including the PointEditor and CubeViewports.
 
void activate (bool)
 Activates the tool.
 
virtual void updateTool ()
 Updates the tool.
 
void setCubeViewport (MdiCubeViewport *cvp)
 Sets the current viewport to the given cvp.
 

Signals

void qnetToolSave ()
 
void qnetToolSaveAs ()
 
void refreshNavList ()
 
void editPointChanged (QString pointId)
 
void netChanged ()
 
void ignorePointChanged ()
 
void ignoreLeftChanged ()
 
void ignoreRightChanged ()
 
void showNavTool ()
 
void newControlNetwork (ControlNet *)
 
void stretchChipViewport (Stretch *, CubeViewport *)
 
void measureChanged ()
 
void clearWarningSignal ()
 
void toolActivated ()
 
void viewportChanged ()
 

Public Member Functions

 QnetTool (QWidget *parent)
 Consructs the Qnet Tool window.
 
virtual ~QnetTool ()
 
void paintViewport (MdiCubeViewport *cvp, QPainter *painter)
 Take care of drawing things on a viewPort.
 
QString measureColumnToString (MeasureColumns column)
 
ControlNetcontrolNet ()
 
const ControlNetcontrolNet () const
 
SerialNumberListserialNumberList ()
 
const SerialNumberListserialNumberList () const
 
Workspaceworkspace () const
 
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 void addTo (Workspace *ws)
 Adds the given workspace to the cubeviewport list.
 
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.
 
RubberBandToolrubberBandTool ()
 
void setList (ToolList *currentList)
 

Static Public Attributes

static const int NUMCOLUMNS = 16
 

Protected Types

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

Protected Slots

void mouseButtonRelease (QPoint p, Qt::MouseButton s)
 Handle mouse events on CubeViewport.
 
QWidgetcreateToolBarWidget (QStackedWidget *parent)
 This method creates the widgets for the tool bar.
 
virtual void rubberBandComplete ()
 
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 Tie tool action to the tool pad.
 
bool eventFilter (QObject *o, QEvent *e)
 Event filter for QnetTool.
 
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.
 
virtual void enableRubberBandTool ()
 Anytime a tool is created, you may use the rubber band tool.
 
Workspaceworkspace ()
 

Detailed Description

Qnet tool operations.

Author
????-??-?? Unknown

Member Typedef Documentation

◆ CubeViewportList

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

A list of cubeviewports.

Member Enumeration Documentation

◆ MeasureColumns

Enumerator
FILENAME 
CUBESN 
SAMPLE 
LINE 
APRIORISAMPLE 
APRIORILINE 
SAMPLERESIDUAL 
LINERESIDUAL 
RESIDUALMAGNITUDE 
SAMPLESHIFT 
LINESHIFT 
PIXELSHIFT 
GOODNESSOFFIT 
IGNORED 
EDITLOCK 
TYPE 

Constructor & Destructor Documentation

◆ QnetTool()

Isis::QnetTool::QnetTool ( QWidget * parent)

Consructs the Qnet Tool window.

Parameters
parentPointer to the parent widget for the Qnet tool

References _FILEINFO_, and Isis::IException::Programmer.

◆ ~QnetTool()

Isis::QnetTool::~QnetTool ( )
virtual

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.

◆ addTo() [1/4]

◆ addTo() [2/4]

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

Adds the tool to the toolpad.

Parameters
toolpad

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

◆ addTo() [3/4]

◆ addTo() [4/4]

void Isis::Tool::addTo ( Workspace * ws)
virtualinherited

Adds the given workspace to the cubeviewport list.

Parameters
ws

Reimplemented in Isis::EditTool, Isis::FileTool, Isis::SpecialPixelTool, and Isis::WindowTool.

References Isis::Tool::registerTool(), and Isis::Tool::setCubeViewport().

◆ addToActive()

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

References Isis::Tool::createToolBarWidget(), and Isis::ToolList::toolBarStack().

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

◆ addToPermanent()

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

◆ clearWarningSignal

void Isis::Tool::clearWarningSignal ( )
signalinherited

◆ controlNet() [1/2]

◆ controlNet() [2/2]

const ControlNet * Isis::QnetTool::controlNet ( ) const

◆ createFixedPoint

void Isis::QnetTool::createFixedPoint ( double lat,
double lon )
slot

◆ createPoint

◆ createToolBarWidget

QWidget * Isis::QnetTool::createToolBarWidget ( QStackedWidget * parent)
protectedslot

This method creates the widgets for the tool bar.

A "Show Nav Tool" button is created so that the navigation tool may be reopened if it has been closed.

Parameters
parentThe parent QStackedWidget
Returns
QWidget*

◆ cubeViewport()

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

Return the current cubeviewport.

Returns
CubeViewport*

Referenced by Isis::TrackTool::addConnections(), Isis::WindowTool::addConnections(), Isis::StretchTool::deleteFromCube(), Isis::FileTool::discard(), Isis::FileTool::exportToList(), Isis::FileTool::exportView(), Isis::StretchTool::loadStretchFromCube(), Isis::SunShadowTool::mouseButtonPress(), Isis::EditTool::mouseButtonRelease(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FeatureNomenclatureTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::MatchTool::mouseButtonRelease(), Isis::PanTool::mouseButtonRelease(), 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::HistogramTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::TrackTool::removeConnections(), Isis::WindowTool::removeConnections(), Isis::EditTool::rubberBandComplete(), Isis::HistogramTool::rubberBandComplete(), Isis::MeasureTool::rubberBandComplete(), Isis::StereoTool::rubberBandComplete(), Isis::StretchTool::rubberBandComplete(), Isis::ZoomTool::rubberBandComplete(), Isis::FileTool::save(), Isis::FileTool::saveAs(), Isis::FileTool::saveAsCubeByOption(), Isis::FileTool::saveInfo(), Isis::StretchTool::saveStretchToCube(), Isis::ScatterPlotTool::showNewScatterPlotConfig(), Isis::StretchTool::stretchGlobal(), Isis::StretchTool::stretchGlobalAllBands(), Isis::StretchTool::stretchRegional(), Isis::StretchTool::updateAdvStretchDialogforAll(), Isis::StretchTool::updateHistograms(), Isis::MeasureTool::updateMeasure(), Isis::AbstractPlotTool::updateTool(), Isis::BandTool::updateTool(), Isis::BlinkTool::updateTool(), Isis::EditTool::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(), and Isis::AbstractPlotTool::viewportsToPlot().

◆ cubeViewportList()

◆ deletePoint

void Isis::QnetTool::deletePoint ( ControlPoint * point)
slot

Delete control point.

Parameters
pointPointer to control point (net memory) to be deleted.

References editPointChanged(), Isis::SerialNumberList::fileName(), Isis::ControlMeasure::MeasureLocked, netChanged(), Isis::ControlPoint::PointLocked, and refreshNavList().

Referenced by mouseButtonRelease().

◆ editPointChanged

void Isis::QnetTool::editPointChanged ( QString pointId)
signal

◆ enableRubberBandTool()

void Isis::Tool::enableRubberBandTool ( )
protectedvirtualinherited

Anytime a tool is created, you may use the rubber band tool.

Enable the use of the rubberband tool.

Reimplemented in Isis::HistogramTool, Isis::MeasureTool, Isis::RubberBandTool, Isis::SpatialPlotTool, Isis::SpectralPlotTool, Isis::StereoTool, and Isis::ZoomTool.

References Isis::RubberBandTool::disable(), and Isis::Tool::rubberBandTool().

◆ eventFilter()

bool Isis::QnetTool::eventFilter ( QObject * o,
QEvent * e )
protected

Event filter for QnetTool.

Determines whether to update left or right measure info.

Parameters
oPointer to QObject
ePointer to QEvent
Returns
bool Indicates whether the event type is "Leave".

◆ ignoreLeftChanged

void Isis::QnetTool::ignoreLeftChanged ( )
signal

◆ ignorePointChanged

void Isis::QnetTool::ignorePointChanged ( )
signal

◆ ignoreRightChanged

void Isis::QnetTool::ignoreRightChanged ( )
signal

◆ measureChanged

void Isis::QnetTool::measureChanged ( )
signal

◆ measureColumnToString()

◆ menuName()

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

◆ modifyPoint

void Isis::QnetTool::modifyPoint ( ControlPoint * point)
slot

Modify control point.

Parameters
pointPointer to control point to be modified.
History
2009-09-15 Tracie Sucharski - Add error check for points with no measures.

References editPointChanged(), and Isis::ControlPoint::GetNumMeasures().

Referenced by mouseButtonRelease().

◆ mouseButtonPress()

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

References Isis::Tool::clearWarningSignal().

◆ mouseButtonRelease

void Isis::QnetTool::mouseButtonRelease ( QPoint p,
Qt::MouseButton s )
protectedslot

Handle mouse events on CubeViewport.

Parameters
p[in](QPoint) Point under cursor in cubeviewport
s[in](Qt::MouseButton) Which mouse button was pressed

References createFixedPoint(), createPoint(), Isis::Tool::cubeViewport(), deletePoint(), modifyPoint(), and Isis::SerialNumberList::serialNumber().

◆ mouseDoubleClick()

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

References Isis::Tool::clearWarningSignal().

◆ mouseEnter

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

◆ mouseLeave

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

◆ mouseMove [1/2]

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

◆ mouseMove [2/2]

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

◆ netChanged

void Isis::QnetTool::netChanged ( )
signal

Referenced by deletePoint().

◆ newControlNetwork

void Isis::QnetTool::newControlNetwork ( ControlNet * )
signal

◆ paintViewport()

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

Take care of drawing things on a viewPort.

This is overiding the parents paintViewport member.

Parameters
vpPointer to Viewport to be painted
painter

Reimplemented from Isis::Tool.

◆ qnetToolSave

void Isis::QnetTool::qnetToolSave ( )
signal

◆ qnetToolSaveAs

void Isis::QnetTool::qnetToolSaveAs ( )
signal

◆ refresh

void Isis::QnetTool::refresh ( )
slot

Refresh all necessary widgets in QnetTool including the PointEditor and CubeViewports.

Author
2008-12-09 Tracie Sucharski

References editPointChanged().

◆ refreshNavList

void Isis::QnetTool::refreshNavList ( )
signal

◆ registerTool()

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

Registers the tool to the viewport.

Parameters
viewport

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

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.

◆ rubberBandComplete

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

◆ rubberBandTool()

◆ scaleChanged()

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

Reimplemented in Isis::RubberBandTool.

◆ screenPixelsChanged

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

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

◆ serialNumberList() [1/2]

◆ serialNumberList() [2/2]

const SerialNumberList * Isis::QnetTool::serialNumberList ( ) const

◆ setCubeViewport

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

◆ setList()

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

◆ showNavTool

void Isis::QnetTool::showNavTool ( )
signal

◆ stretchChipViewport

void Isis::QnetTool::stretchChipViewport ( Stretch * ,
CubeViewport *  )
signal

◆ stretchRequested()

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

Reimplemented in Isis::StretchTool.

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

◆ toolActivated

◆ toolIconDir()

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

◆ toolPadAction()

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

Adds the Tie tool action to the tool pad.

When the Tie tool is selected, the Navigation Tool will automatically open.

Parameters
padTool pad
Returns
QAction* Pointer to Tie tool action

Reimplemented from Isis::Tool.

References Isis::Tool::toolIconDir().

◆ updateList

void Isis::QnetTool::updateList ( )
slot

◆ updateMeasure()

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

◆ updateNet

void Isis::QnetTool::updateNet ( QString cNetFileName)
slot

Updates the Control Network displayed in the Qnet Tool title bar.

This slot is connected to QnetFileTool's controlNetworkUpdated(QString cNetFileName) signal.

Parameters
cNetFileNameFileName of the most recently selected control network.
See also
QnetFileTool

◆ updatePointInfo

void Isis::QnetTool::updatePointInfo ( QString pointId)
slot

Update the current editPoint information in the Point Editor labels.

Author
2011-05-05 Tracie Sucharski

@TODO Instead of a single method, should slots be separate for each updated point parameter, ie. ignore, editLock, apriori, etc. This is not robust, if other point attributes are changed outside of QnetTool, this method will need to be updated. *** THIS METHOD SHOULD GO AWAY WHEN CONTROLpOINTEDITOR IS INCLUDED IN QNET ***

◆ updateTool

◆ viewportChanged

◆ workspace() [1/2]

◆ workspace() [2/2]

Workspace * Isis::QnetTool::workspace ( ) const

Member Data Documentation

◆ NUMCOLUMNS

const int Isis::QnetTool::NUMCOLUMNS = 16
static

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