Isis Developer Reference
|
This controls the 'Grid' abilities in the MosaicSceneWidget. More...
#include <MosaicGridTool.h>
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. | |
void | clearGrid () |
Clears the grid from the scene. | |
void | configure () |
Give a configuration dialog for the options available in this tool. | |
void | drawGrid () |
Creates the GridGraphicsItem that will draw the grid. | |
void | drawGrid (bool draw) |
Determines whether the grid should be drawn or not. | |
void | onCubesChanged () |
Determines whether or not the bounding rectangle was changed by the addition or removal of cubes. | |
void | onToolOpen (bool check) |
Checks both checkboxes when the tool is first opened. | |
void | onProjectionChanged () |
void | activate (bool) |
Activates the tool. | |
Signals | |
void | boundingRectChanged () |
void | activated (bool) |
Public Member Functions | |
MosaicGridTool (MosaicSceneWidget *) | |
MosaicGridTool constructor. | |
void | addToMenu (QMenu *menu) |
Adds the pan action to the given menu. | |
bool | autoGridCheckBox () |
True if checked. | |
Latitude | baseLat () |
The base latitude. | |
Longitude | baseLon () |
The base longitude. | |
int | density () |
The density or resolution of the grid. | |
Angle | latInc () |
The angle of the latitude increment. | |
GridExtentSource | latExtents () |
The extent type (Map, Cubes, Manual) for the latitude. | |
QString | latType () |
The latitude type (planetocentric/planetographic) of the projection of the scene. | |
QString | lonDomain () |
The longitude domain of the projection of the scene. | |
GridExtentSource | lonExtents () |
The extent type (Map, Cubes, Manual) for the longitude. | |
Angle | lonInc () |
The angle of the longitude increment. | |
Latitude | maxLat () |
The maximum latitude used to determine the grid's extents and increments. | |
Longitude | maxLon () |
The maximum longitude used to determine the grid's extents and increments. | |
Latitude | minLat () |
The minimum latitude used to determine the grid's extents and increments. | |
Longitude | minLon () |
The minimum longitude used to determine the grid's extents and increments. | |
MosaicSceneWidget * | sceneWidget () |
bool | showGrid () |
True if grid is displayed. | |
void | setAutoGridCheckBox (bool checked) |
Modify the check state of the checkbox. | |
void | setBaseLat (Latitude baseLat) |
Modify the base latitude. | |
void | setBaseLon (Longitude baseLon) |
Modify the base longitude. | |
void | setDensity (int density) |
Modify the density. | |
void | setLatExtents (GridExtentSource source, Latitude minLat, Latitude maxLat) |
Set the maximum and minimum latitude of the grid. | |
void | setLatInc (Angle latInc) |
Modify the latitude increment. | |
void | setLonExtents (GridExtentSource source, Longitude minLon, Longitude maxLon) |
Set the maximum and minimum longitude of the grid. | |
void | setLonInc (Angle lonInc) |
Modify the longitude increment. | |
void | setShowGrid (bool show) |
Modify the check state of the checkbox. | |
void | fromPvl (const PvlObject &obj) |
Read the tool information form a pvl object. | |
QString | projectPvlObjectName () const |
An accessor for the name of the Pvl object that the tool's information is stored in. | |
PvlObject | toPvl () const |
Store the tool information in a pvl object. | |
Longitude | domainMinLon () |
Longitude | domainMaxLon () |
bool | isActive () const |
Returns the activeness of this toool. | |
QPixmap | getIcon (QString iconName) const |
returns the path to the icon directory. | |
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 | |
QWidget * | createToolBarWidget () |
Creates the widget to add to the tool bar. | |
QAction * | getPrimaryAction () |
Adds the action to the toolpad. | |
QWidget * | getToolBarWidget () |
Creates the Grid Toolbar Widget. | |
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) |
MosaicSceneWidget * | getWidget () |
This controls the 'Grid' abilities in the MosaicSceneWidget.
Isis::MosaicGridTool::MosaicGridTool | ( | MosaicSceneWidget * | scene | ) |
MosaicGridTool constructor.
parent |
References Cubes, Isis::MosaicSceneWidget::cubesBoundingRect(), Isis::Angle::Degrees, domainMaxLon(), domainMinLon(), Isis::MosaicTool::getWidget(), and onProjectionChanged().
|
slotinherited |
Activates the tool.
on |
References Isis::MosaicTool::activated().
Referenced by Isis::MosaicTool::addTo().
|
signalinherited |
Referenced by Isis::MosaicTool::activate(), getToolBarWidget(), and Isis::MosaicTool::MosaicTool().
|
inlinevirtualinherited |
|
virtualinherited |
References Isis::MosaicTool::getToolBarWidget(), and Isis::MosaicTool::toolBarDestroyed().
|
virtualinherited |
void Isis::MosaicGridTool::addToMenu | ( | QMenu * | menu | ) |
Adds the pan action to the given menu.
menu |
|
slot |
Calculates the lat/lon increments from the bounding rectangle of the open cubes.
draw | True if lat/lon increments need to be calculated. |
References Isis::MosaicSceneWidget::cubesBoundingRect(), Isis::Angle::Degrees, Isis::Angle::degrees(), drawGrid(), Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), Isis::Latitude::planetographic(), setLatExtents(), setLonExtents(), and Isis::Projection::Triaxial.
Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), getToolBarWidget(), onCubesChanged(), and onToolOpen().
bool Isis::MosaicGridTool::autoGridCheckBox | ( | ) |
True if checked.
Referenced by Isis::MosaicGridToolConfigDialog::readSettings().
Latitude Isis::MosaicGridTool::baseLat | ( | ) |
The base latitude.
Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setBaseLat().
Longitude Isis::MosaicGridTool::baseLon | ( | ) |
The base longitude.
Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setBaseLon().
|
signal |
Referenced by onCubesChanged().
|
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().
|
slot |
Give a configuration dialog for the options available in this tool.
Referenced by getToolBarWidget().
|
protected |
Creates the widget to add to the tool bar.
parent |
int Isis::MosaicGridTool::density | ( | ) |
The density or resolution of the grid.
The number of straight lines used to draw the grid.
Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setDensity().
Longitude Isis::MosaicGridTool::domainMaxLon | ( | ) |
References Isis::Angle::Degrees, Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), and Isis::Projection::Triaxial.
Referenced by MosaicGridTool(), and setLonExtents().
Longitude Isis::MosaicGridTool::domainMinLon | ( | ) |
References Isis::Angle::Degrees, Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), and Isis::Projection::Triaxial.
Referenced by MosaicGridTool(), and setLonExtents().
|
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(), drawGrid(), fromPvl(), and getToolBarWidget().
|
slot |
Determines whether the grid should be drawn or not.
draw | True if grid should be drawn. Otherwise, it will be cleared. |
References clearGrid(), and drawGrid().
|
virtual |
Read the tool information form a pvl object.
obj | the object from which we are extracting the information |
Reimplemented from Isis::MosaicTool.
References Isis::Angle::Degrees, drawGrid(), Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), Isis::Distance::Meters, Isis::Latitude::Planetocentric, Isis::toBool(), Isis::toDouble(), Isis::toInt(), and Isis::Projection::Triaxial.
|
inherited |
returns the path to the icon directory.
References Isis::FileName::expanded().
Referenced by Isis::MosaicAreaTool::getPrimaryAction(), Isis::MosaicControlNetTool::getPrimaryAction(), Isis::MosaicFindTool::getPrimaryAction(), getPrimaryAction(), Isis::MosaicPanTool::getPrimaryAction(), Isis::MosaicSelectTool::getPrimaryAction(), Isis::MosaicZoomTool::getPrimaryAction(), and Isis::MosaicZoomTool::MosaicZoomTool().
|
protectedvirtual |
Adds the action to the toolpad.
toolpad |
Implements Isis::MosaicTool.
References Isis::MosaicTool::getIcon().
|
protectedvirtual |
Creates the Grid Toolbar Widget.
Reimplemented from Isis::MosaicTool.
References Isis::MosaicTool::activated(), autoGrid(), configure(), Isis::MosaicSceneWidget::cubesBoundingRect(), drawGrid(), Isis::MosaicTool::getWidget(), and onToolOpen().
Reimplemented in Isis::MosaicZoomTool.
|
inlineprotectedinherited |
Referenced by autoGrid(), Isis::MosaicAreaTool::clearBox(), clearGrid(), Isis::MosaicFindTool::clearPoint(), domainMaxLon(), domainMinLon(), drawGrid(), fromPvl(), getToolBarWidget(), Isis::MosaicFindTool::getUserGroundPoint(), latType(), Isis::MosaicControlNetTool::loadNetwork(), lonDomain(), Isis::MosaicControlNetTool::MosaicControlNetTool(), MosaicGridTool(), Isis::MosaicTrackTool::MosaicTrackTool(), Isis::MosaicControlNetTool::mouseButtonRelease(), Isis::MosaicAreaTool::mouseButtonRelease(), Isis::MosaicFindTool::mouseButtonRelease(), Isis::MosaicZoomTool::mouseWheel(), onCubesChanged(), onProjectionChanged(), Isis::MosaicZoomTool::rubberBandComplete(), sceneWidget(), setLatExtents(), setLonExtents(), Isis::MosaicTrackTool::updateLabels(), Isis::MosaicZoomTool::updateResolutionBox(), Isis::MosaicPanTool::updateTool(), Isis::MosaicSelectTool::updateTool(), Isis::MosaicZoomTool::updateTool(), Isis::MosaicAreaTool::userChangedBox(), and Isis::MosaicZoomTool::zoomFit().
|
inlineinherited |
Returns the activeness of this toool.
Referenced by Isis::MosaicControlNetTool::mouseButtonRelease(), Isis::MosaicZoomTool::mouseButtonRelease(), Isis::MosaicAreaTool::mouseButtonRelease(), Isis::MosaicFindTool::mouseButtonRelease(), Isis::MosaicZoomTool::rubberBandComplete(), Isis::MosaicFindTool::updateTool(), Isis::MosaicPanTool::updateTool(), Isis::MosaicSelectTool::updateTool(), and Isis::MosaicZoomTool::updateTool().
MosaicGridTool::GridExtentSource Isis::MosaicGridTool::latExtents | ( | ) |
The extent type (Map, Cubes, Manual) for the latitude.
Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog(), and Isis::MosaicGridToolConfigDialog::readSettings().
Angle Isis::MosaicGridTool::latInc | ( | ) |
The angle of the latitude increment.
Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setLatInc().
QString Isis::MosaicGridTool::latType | ( | ) |
The latitude type (planetocentric/planetographic) of the projection of the scene.
References Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), and Isis::Projection::Triaxial.
Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog().
QString Isis::MosaicGridTool::lonDomain | ( | ) |
The longitude domain of the projection of the scene.
References Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), and Isis::Projection::Triaxial.
Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog().
MosaicGridTool::GridExtentSource Isis::MosaicGridTool::lonExtents | ( | ) |
The extent type (Map, Cubes, Manual) for the longitude.
Referenced by Isis::MosaicGridToolConfigDialog::MosaicGridToolConfigDialog(), and Isis::MosaicGridToolConfigDialog::readSettings().
Angle Isis::MosaicGridTool::lonInc | ( | ) |
The angle of the longitude increment.
Referenced by Isis::MosaicGridToolConfigDialog::readSettings(), and setLonInc().
Latitude Isis::MosaicGridTool::maxLat | ( | ) |
The maximum latitude used to determine the grid's extents and increments.
Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLatExtents().
Longitude Isis::MosaicGridTool::maxLon | ( | ) |
The maximum longitude used to determine the grid's extents and increments.
Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLonExtents().
Latitude Isis::MosaicGridTool::minLat | ( | ) |
The minimum latitude used to determine the grid's extents and increments.
Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLatExtents().
Longitude Isis::MosaicGridTool::minLon | ( | ) |
The minimum longitude used to determine the grid's extents and increments.
Referenced by onProjectionChanged(), Isis::MosaicGridToolConfigDialog::readSettings(), and setLonExtents().
|
protectedvirtualinherited |
Referenced by Isis::MosaicTool::MosaicTool().
|
protectedvirtualinherited |
Reimplemented in Isis::MosaicControlNetTool, Isis::MosaicZoomTool, Isis::MosaicAreaTool, and Isis::MosaicFindTool.
Referenced by Isis::MosaicTool::MosaicTool().
|
protectedvirtualinherited |
Referenced by Isis::MosaicTool::MosaicTool().
|
inlineprotectedvirtualinherited |
Referenced by Isis::MosaicTool::MosaicTool().
|
inlineprotectedvirtualinherited |
Referenced by Isis::MosaicTool::MosaicTool().
|
protectedvirtualinherited |
Referenced by Isis::MosaicTool::MosaicTool().
|
protectedvirtualinherited |
Reimplemented in Isis::MosaicZoomTool.
Referenced by Isis::MosaicTool::MosaicTool().
|
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().
|
slot |
References baseLat(), baseLon(), Isis::Angle::Degrees, Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), Map, maxLat(), maxLon(), minLat(), minLon(), setBaseLat(), setBaseLon(), setLatExtents(), and setLonExtents().
Referenced by MosaicGridTool().
|
slot |
Checks both checkboxes when the tool is first opened.
Allows the grid to remain when the tool is not active.
check | True when the tool is activated |
References autoGrid().
Referenced by getToolBarWidget().
|
virtual |
An accessor for the name of the Pvl object that the tool's information is stored in.
Reimplemented from Isis::MosaicTool.
Referenced by toPvl().
|
inlineprotectedvirtualinherited |
Reimplemented in Isis::MosaicZoomTool.
Referenced by Isis::MosaicTool::MosaicTool().
MosaicSceneWidget * Isis::MosaicGridTool::sceneWidget | ( | ) |
References Isis::MosaicTool::getWidget().
Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), and Isis::MosaicGridToolConfigDialog::readSettings().
void Isis::MosaicGridTool::setAutoGridCheckBox | ( | bool | checked | ) |
Modify the check state of the checkbox.
checked | the new state of the checkbox |
Referenced by Isis::MosaicGridToolConfigDialog::applySettings().
void Isis::MosaicGridTool::setBaseLat | ( | Latitude | baseLat | ) |
Modify the base latitude.
baseLat | the new base latitude. |
References baseLat().
Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), and onProjectionChanged().
void Isis::MosaicGridTool::setBaseLon | ( | Longitude | baseLon | ) |
Modify the base longitude.
baseLon | the new base longitude. |
References baseLon().
Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), and onProjectionChanged().
void Isis::MosaicGridTool::setDensity | ( | int | density | ) |
Modify the density.
density | the new density value. |
References density().
Referenced by Isis::MosaicGridToolConfigDialog::applySettings().
void Isis::MosaicGridTool::setLatExtents | ( | GridExtentSource | source, |
Latitude | minLat = Latitude(), | ||
Latitude | maxLat = Latitude() ) |
Set the maximum and minimum latitude of the grid.
source | Where the grid extents come from (Map, Cubes, Manual). |
minLat | The minimum latitude of the grid. |
maxLat | The maximum latitude of the grid. |
References Cubes, Isis::MosaicSceneWidget::cubesBoundingRect(), Isis::Angle::Degrees, Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), Manual, Map, maxLat(), Isis::Distance::Meters, minLat(), and Isis::Projection::Triaxial.
Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), autoGrid(), and onProjectionChanged().
void Isis::MosaicGridTool::setLatInc | ( | Angle | latInc | ) |
Modify the latitude increment.
latInc | the new increment angle. |
References Isis::Angle::Degrees, and latInc().
Referenced by Isis::MosaicGridToolConfigDialog::applySettings().
void Isis::MosaicGridTool::setLonExtents | ( | GridExtentSource | source, |
Longitude | minLon = Longitude(), | ||
Longitude | maxLon = Longitude() ) |
Set the maximum and minimum longitude of the grid.
source | Where the grid extents come from (Map, Cubes, Manual). |
minLon | The minimum longitude of the grid. |
maxLon | The maximum longitude of the grid. |
References Cubes, Isis::MosaicSceneWidget::cubesBoundingRect(), Isis::Angle::Degrees, domainMaxLon(), domainMinLon(), Isis::MosaicSceneWidget::getProjection(), Isis::MosaicTool::getWidget(), Manual, Map, maxLon(), minLon(), and Isis::Projection::Triaxial.
Referenced by Isis::MosaicGridToolConfigDialog::applySettings(), autoGrid(), and onProjectionChanged().
void Isis::MosaicGridTool::setLonInc | ( | Angle | lonInc | ) |
Modify the longitude increment.
lonInc | the new lonitude increment. |
References Isis::Angle::Degrees, and lonInc().
Referenced by Isis::MosaicGridToolConfigDialog::applySettings().
void Isis::MosaicGridTool::setShowGrid | ( | bool | show | ) |
Modify the check state of the checkbox.
checked | the new state of the checkbox |
Referenced by Isis::MosaicGridToolConfigDialog::applySettings().
bool Isis::MosaicGridTool::showGrid | ( | ) |
True if grid is displayed.
Referenced by Isis::MosaicGridToolConfigDialog::readSettings().
|
protectedinherited |
Referenced by Isis::MosaicTool::addTo().
|
virtual |
Store the tool information in a pvl object.
Reimplemented from Isis::MosaicTool.
References Isis::Angle::degrees(), projectPvlObjectName(), and Isis::toString().
|
inlineprotectedvirtualslotinherited |
Referenced by Isis::MosaicTool::MosaicTool().