Isis Developer Reference
Isis::MosaicGridTool Class Reference

This controls the 'Grid' abilities in the MosaicSceneWidget. More...

#include <MosaicGridTool.h>

Inheritance diagram for Isis::MosaicGridTool:
Inheritance graph
Collaboration diagram for Isis::MosaicGridTool:
Collaboration graph

Public Types

enum  GridExtentSource { Map , Cubes , Manual }
 

Public Slots

void autoGrid (bool draw)
 Calculates the lat/lon increments from the bounding rectangle of the open cubes. More...
 
void clearGrid ()
 Clears the grid from the scene. More...
 
void configure ()
 Give a configuration dialog for the options available in this tool. More...
 
void drawGrid ()
 Creates the GridGraphicsItem that will draw the grid. More...
 
void drawGrid (bool draw)
 Determines whether the grid should be drawn or not. More...
 
void onCubesChanged ()
 Determines whether or not the bounding rectangle was changed by the addition or removal of cubes. More...
 
void onToolOpen (bool check)
 Checks both checkboxes when the tool is first opened. More...
 
void onProjectionChanged ()
 
void activate (bool)
 Activates the tool. More...
 

Signals

void boundingRectChanged ()
 
void activated (bool)
 

Public Member Functions

 MosaicGridTool (MosaicSceneWidget *)
 MosaicGridTool constructor. More...
 
void addToMenu (QMenu *menu)
 Adds the pan action to the given menu. More...
 
bool autoGridCheckBox ()
 True if checked. More...
 
Latitude baseLat ()
 The base latitude. More...
 
Longitude baseLon ()
 The base longitude. More...
 
int density ()
 The density or resolution of the grid. More...
 
Angle latInc ()
 The angle of the latitude increment. More...
 
GridExtentSource latExtents ()
 The extent type (Map, Cubes, Manual) for the latitude. More...
 
QString latType ()
 The latitude type (planetocentric/planetographic) of the projection of the scene. More...
 
QString lonDomain ()
 The longitude domain of the projection of the scene. More...
 
GridExtentSource lonExtents ()
 The extent type (Map, Cubes, Manual) for the longitude. More...
 
Angle lonInc ()
 The angle of the longitude increment. More...
 
Latitude maxLat ()
 The maximum latitude used to determine the grid's extents and increments. More...
 
Longitude maxLon ()
 The maximum longitude used to determine the grid's extents and increments. More...
 
Latitude minLat ()
 The minimum latitude used to determine the grid's extents and increments. More...
 
Longitude minLon ()
 The minimum longitude used to determine the grid's extents and increments. More...
 
MosaicSceneWidgetsceneWidget ()
 
bool showGrid ()
 True if grid is displayed. More...
 
void setAutoGridCheckBox (bool checked)
 Modify the check state of the checkbox. More...
 
void setBaseLat (Latitude baseLat)
 Modify the base latitude. More...
 
void setBaseLon (Longitude baseLon)
 Modify the base longitude. More...
 
void setDensity (int density)
 Modify the density. More...
 
void setLatExtents (GridExtentSource source, Latitude minLat, Latitude maxLat)
 Set the maximum and minimum latitude of the grid. More...
 
void setLatInc (Angle latInc)
 Modify the latitude increment. More...
 
void setLonExtents (GridExtentSource source, Longitude minLon, Longitude maxLon)
 Set the maximum and minimum longitude of the grid. More...
 
void setLonInc (Angle lonInc)
 Modify the longitude increment. More...
 
void setShowGrid (bool show)
 Modify the check state of the checkbox. More...
 
void fromPvl (const PvlObject &obj)
 Read the tool information form a pvl object. More...
 
QString projectPvlObjectName () const
 An accessor for the name of the Pvl object that the tool's information is stored in. More...
 
PvlObject toPvl () const
 Store the tool information in a pvl object. More...
 
Longitude domainMinLon ()
 
Longitude domainMaxLon ()
 
bool isActive () const
 Returns the activeness of this toool. More...
 
QPixmap getIcon (QString iconName) const
 returns the path to the icon directory. More...
 
virtual void addTo (QMenu *menu)
 
virtual void addTo (ToolPad *toolPad)
 
virtual void addTo (QToolBar *toolBar)
 
virtual QList< QAction * > getViewActions ()
 

Protected Slots

virtual void updateTool ()
 

Protected Member Functions

QWidgetcreateToolBarWidget ()
 Creates the widget to add to the tool bar. More...
 
QActiongetPrimaryAction ()
 Adds the action to the toolpad. More...
 
QWidgetgetToolBarWidget ()
 Creates the Grid Toolbar Widget. More...
 
virtual void mouseEnter ()
 
virtual void mouseMove (QPointF)
 
virtual void mouseLeave ()
 
virtual void mouseDoubleClick (QPointF)
 
virtual void mouseButtonPress (QPointF, Qt::MouseButton s)
 
virtual void mouseButtonRelease (QPointF, Qt::MouseButton s)
 
virtual void mouseWheel (QPointF, int delta)
 
virtual void rubberBandComplete (QRectF r, Qt::MouseButton s)
 
void toolBarDestroyed (QObject *obj)
 
MosaicSceneWidgetgetWidget ()
 

Detailed Description

This controls the 'Grid' abilities in the MosaicSceneWidget.

Author
????-??-?? Stacy Alley

Member Enumeration Documentation

◆ GridExtentSource

Enumerator
Map 

The grid will be drawn using the extents from the map projection.

Cubes 

The grid will be drawn using the extents from the bounding rectangle of the open cubes.

Manual 

The grid will be drawn using the extents that the user specifies.

Constructor & Destructor Documentation

◆ MosaicGridTool()

Member Function Documentation

◆ activate

void Isis::MosaicTool::activate ( bool  on)
slotinherited

Activates the tool.

Parameters
on

References Isis::MosaicTool::activated().

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

◆ activated

void Isis::MosaicTool::activated ( bool  )
signalinherited

◆ addTo() [1/3]

virtual void Isis::MosaicTool::addTo ( QMenu menu)
inlinevirtualinherited

◆ addTo() [2/3]

void Isis::MosaicTool::addTo ( QToolBar toolBar)
virtualinherited

◆ addTo() [3/3]

void Isis::MosaicTool::addTo ( ToolPad toolPad)
virtualinherited

◆ addToMenu()

void Isis::MosaicGridTool::addToMenu ( QMenu menu)

Adds the pan action to the given menu.

Parameters
menu

◆ autoGrid

◆ autoGridCheckBox()

bool Isis::MosaicGridTool::autoGridCheckBox ( )

True if checked.

Returns
The state of the checkbox.

Referenced by Isis::MosaicGridToolConfigDialog::readSettings().

◆ baseLat()

Latitude Isis::MosaicGridTool::baseLat ( )

The base latitude.

Returns
The base latitude

Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setBaseLat().

◆ baseLon()

Longitude Isis::MosaicGridTool::baseLon ( )

The base longitude.

Returns
The base longitude

Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setBaseLon().

◆ boundingRectChanged

void Isis::MosaicGridTool::boundingRectChanged ( )
signal

Referenced by onCubesChanged().

◆ clearGrid

void Isis::MosaicGridTool::clearGrid ( )
slot

Clears the grid from the scene.

Does not erase any grid information.

References drawGrid(), Isis::MosaicSceneWidget::getScene(), and Isis::MosaicTool::getWidget().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), and drawGrid().

◆ configure

void Isis::MosaicGridTool::configure ( )
slot

Give a configuration dialog for the options available in this tool.

Referenced by getToolBarWidget().

◆ createToolBarWidget()

QWidget * Isis::MosaicGridTool::createToolBarWidget ( )
protected

Creates the widget to add to the tool bar.

Parameters
parent
Returns
QWidget*

◆ density()

int Isis::MosaicGridTool::density ( )

The density or resolution of the grid.

The number of straight lines used to draw the grid.

Returns
The density

Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setDensity().

◆ domainMaxLon()

◆ domainMinLon()

◆ drawGrid [1/2]

void Isis::MosaicGridTool::drawGrid ( )
slot

Creates the GridGraphicsItem that will draw the grid.

If there is no grid item the grid is cleared and redrawn with a new item.

References Isis::Angle::degrees(), drawGrid(), Isis::MosaicSceneWidget::getScene(), Isis::MosaicTool::getWidget(), and onCubesChanged().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), autoGrid(), clearGrid(), drawGrid(), fromPvl(), and getToolBarWidget().

◆ drawGrid [2/2]

void Isis::MosaicGridTool::drawGrid ( bool  draw)
slot

Determines whether the grid should be drawn or not.

Parameters
drawTrue if grid should be drawn. Otherwise, it will be cleared.

References clearGrid(), and drawGrid().

◆ fromPvl()

◆ getIcon()

◆ getPrimaryAction()

QAction * Isis::MosaicGridTool::getPrimaryAction ( )
protectedvirtual

Adds the action to the toolpad.

Parameters
toolpad
Returns
QAction*

Implements Isis::MosaicTool.

References Isis::MosaicTool::getIcon().

◆ getToolBarWidget()

QWidget * Isis::MosaicGridTool::getToolBarWidget ( )
protectedvirtual

Creates the Grid Toolbar Widget.

Returns
The toolbar widget

Reimplemented from Isis::MosaicTool.

References Isis::MosaicTool::activated(), autoGrid(), configure(), Isis::MosaicSceneWidget::cubesBoundingRect(), drawGrid(), Isis::MosaicTool::getWidget(), and onToolOpen().

◆ getViewActions()

QList< QAction * > Isis::MosaicTool::getViewActions ( )
virtualinherited

◆ getWidget()

◆ isActive()

◆ latExtents()

MosaicGridTool::GridExtentSource Isis::MosaicGridTool::latExtents ( )

The extent type (Map, Cubes, Manual) for the latitude.

Returns
The extent type of the latitude

Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog(), and Isis::MosaicGridToolConfigDialog::readSettings().

◆ latInc()

Angle Isis::MosaicGridTool::latInc ( )

The angle of the latitude increment.

Returns
The latitude increment angle.

Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setLatInc().

◆ latType()

QString Isis::MosaicGridTool::latType ( )

The latitude type (planetocentric/planetographic) of the projection of the scene.

Returns
the latitude type as a string

References Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), Isis::TProjection::LatitudeTypeString(), and Isis::Projection::Triaxial.

Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog().

◆ lonDomain()

QString Isis::MosaicGridTool::lonDomain ( )

◆ lonExtents()

MosaicGridTool::GridExtentSource Isis::MosaicGridTool::lonExtents ( )

The extent type (Map, Cubes, Manual) for the longitude.

Returns
The extent type of the longitude

Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog(), and Isis::MosaicGridToolConfigDialog::readSettings().

◆ lonInc()

Angle Isis::MosaicGridTool::lonInc ( )

The angle of the longitude increment.

Returns
The longitude increment angle.

Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setLonInc().

◆ maxLat()

Latitude Isis::MosaicGridTool::maxLat ( )

The maximum latitude used to determine the grid's extents and increments.

Returns
The maximum latitude of the grid range.

Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLatExtents().

◆ maxLon()

Longitude Isis::MosaicGridTool::maxLon ( )

The maximum longitude used to determine the grid's extents and increments.

Returns
The maximum longitude of the grid range.

Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLonExtents().

◆ minLat()

Latitude Isis::MosaicGridTool::minLat ( )

The minimum latitude used to determine the grid's extents and increments.

Returns
The minimum latitude of the grid range.

Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLatExtents().

◆ minLon()

Longitude Isis::MosaicGridTool::minLon ( )

The minimum longitude used to determine the grid's extents and increments.

Returns
The minimum longitude of the grid range.

Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLonExtents().

◆ mouseButtonPress()

void Isis::MosaicTool::mouseButtonPress ( QPointF  ,
Qt::MouseButton  s 
)
protectedvirtualinherited

◆ mouseButtonRelease()

void Isis::MosaicTool::mouseButtonRelease ( QPointF  ,
Qt::MouseButton  s 
)
protectedvirtualinherited

◆ mouseDoubleClick()

void Isis::MosaicTool::mouseDoubleClick ( QPointF  )
protectedvirtualinherited

◆ mouseEnter()

virtual void Isis::MosaicTool::mouseEnter ( )
inlineprotectedvirtualinherited

◆ mouseLeave()

virtual void Isis::MosaicTool::mouseLeave ( )
inlineprotectedvirtualinherited

◆ mouseMove()

void Isis::MosaicTool::mouseMove ( QPointF  )
protectedvirtualinherited

◆ mouseWheel()

void Isis::MosaicTool::mouseWheel ( QPointF  ,
int  delta 
)
protectedvirtualinherited

Reimplemented in Isis::MosaicZoomTool.

Referenced by Isis::MosaicTool::MosaicTool().

◆ onCubesChanged

void Isis::MosaicGridTool::onCubesChanged ( )
slot

Determines whether or not the bounding rectangle was changed by the addition or removal of cubes.

If it wasn't changed, the grid is not redrawn. If it was (and autogrid is checked), the grid is redrawn with new lat/lon increments.

References autoGrid(), boundingRectChanged(), Isis::MosaicSceneWidget::getView(), and Isis::MosaicTool::getWidget().

Referenced by drawGrid().

◆ onProjectionChanged

◆ onToolOpen

void Isis::MosaicGridTool::onToolOpen ( bool  check)
slot

Checks both checkboxes when the tool is first opened.

Allows the grid to remain when the tool is not active.

Parameters
checkTrue when the tool is activated

References autoGrid().

Referenced by getToolBarWidget().

◆ projectPvlObjectName()

QString Isis::MosaicGridTool::projectPvlObjectName ( ) const
virtual

An accessor for the name of the Pvl object that the tool's information is stored in.

Returns
The name in string form.

Reimplemented from Isis::MosaicTool.

Referenced by toPvl().

◆ rubberBandComplete()

virtual void Isis::MosaicTool::rubberBandComplete ( QRectF  r,
Qt::MouseButton  s 
)
inlineprotectedvirtualinherited

Reimplemented in Isis::MosaicZoomTool.

Referenced by Isis::MosaicTool::MosaicTool().

◆ sceneWidget()

MosaicSceneWidget * Isis::MosaicGridTool::sceneWidget ( )

◆ setAutoGridCheckBox()

void Isis::MosaicGridTool::setAutoGridCheckBox ( bool  checked)

Modify the check state of the checkbox.

Parameters
checkedthe new state of the checkbox

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ setBaseLat()

void Isis::MosaicGridTool::setBaseLat ( Latitude  baseLat)

Modify the base latitude.

Parameters
baseLatthe new base latitude.

References baseLat().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ setBaseLon()

void Isis::MosaicGridTool::setBaseLon ( Longitude  baseLon)

Modify the base longitude.

Parameters
baseLonthe new base longitude.

References baseLon().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ setDensity()

void Isis::MosaicGridTool::setDensity ( int  density)

Modify the density.

Parameters
densitythe new density value.

References density().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ setLatExtents()

◆ setLatInc()

void Isis::MosaicGridTool::setLatInc ( Angle  latInc)

Modify the latitude increment.

Parameters
latIncthe new increment angle.

References Isis::Angle::Degrees, and latInc().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ setLonExtents()

void Isis::MosaicGridTool::setLonExtents ( GridExtentSource  source,
Longitude  minLon = Longitude(),
Longitude  maxLon = Longitude() 
)

◆ setLonInc()

void Isis::MosaicGridTool::setLonInc ( Angle  lonInc)

Modify the longitude increment.

Parameters
lonIncthe new lonitude increment.

References Isis::Angle::Degrees, and lonInc().

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ setShowGrid()

void Isis::MosaicGridTool::setShowGrid ( bool  show)

Modify the check state of the checkbox.

Parameters
checkedthe new state of the checkbox

Referenced by Isis::MosaicGridToolConfigDialog::applySettings().

◆ showGrid()

bool Isis::MosaicGridTool::showGrid ( )

True if grid is displayed.

Returns
Whether or not the grid is displayed.

Referenced by Isis::MosaicGridToolConfigDialog::readSettings().

◆ toolBarDestroyed()

void Isis::MosaicTool::toolBarDestroyed ( QObject obj)
protectedinherited

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

◆ toPvl()

PvlObject Isis::MosaicGridTool::toPvl ( ) const
virtual

Store the tool information in a pvl object.

Returns
the pvl object

Reimplemented from Isis::MosaicTool.

References Isis::Angle::degrees(), projectPvlObjectName(), and Isis::toString().

◆ updateTool

virtual void Isis::MosaicTool::updateTool ( )
inlineprotectedvirtualslotinherited

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