Isis Developer Reference
MosaicGridTool.h
Go to the documentation of this file.
1 #ifndef MosaicGridTool_h
2 #define MosaicGridTool_h
3 
4 #include "MosaicTool.h"
5 
6 #include <QPointer>
7 
8 #include "Angle.h"
9 #include "Latitude.h"
10 #include "Longitude.h"
11 
12 class QAction;
13 class QCheckBox;
14 class QDialog;
15 class QGraphicsItem;
16 class GridGraphicsItem;
17 class QLabel;
18 class Projection;
19 class QPushButton;
20 class QToolButton;
21 
22 namespace Isis {
53  class MosaicGridTool : public MosaicTool {
54  Q_OBJECT
55 
56  public:
61  Map,
70  Manual
71  };
72 
74  void addToMenu(QMenu *menu);
75 
76  //Accessors
77  bool autoGridCheckBox();
78  Latitude baseLat();
80  int density();
81  Angle latInc();
83  QString latType();
84  QString lonDomain();
86  Angle lonInc();
87  Latitude maxLat();
88  Longitude maxLon();
89  Latitude minLat();
90  Longitude minLon();
92  bool showGrid();
93 
94  //Mutators
95  void setAutoGridCheckBox(bool checked);
98  void setDensity(int density);
100  void setLatInc(Angle latInc);
102  void setLonInc(Angle lonInc);
103  void setShowGrid(bool show);
104 
105  //Processors
106  void fromPvl(const PvlObject &obj);
107  QString projectPvlObjectName() const;
108  PvlObject toPvl() const;
109 
112 
113  signals:
115 
116 
117  public slots:
118  void autoGrid(bool draw);
119  void clearGrid();
120  void configure();
121  void drawGrid();
122  void drawGrid(bool draw);
123  void onCubesChanged();
124  void onToolOpen(bool check);
125  void onProjectionChanged();
126 
127  protected:
131 
132  private:
133  QPointer<QLabel> m_autoGridLabel;
134  QPointer<QCheckBox> m_autoGridCheckBox;
135  QPointer<QCheckBox> m_drawGridCheckBox;
136  bool m_shouldCheckBoxes;
137 
138  Latitude m_baseLat;
139  Longitude m_baseLon;
140 
141  Angle m_latInc;
142  Angle m_lonInc;
143 
144  GridExtentSource m_latExtents;
145  Latitude m_maxLat;
146  Latitude m_minLat;
147 
148  GridExtentSource m_lonExtents;
149  Longitude m_maxLon;
150  Longitude m_minLon;
151 
152  int m_density;
153 
154  QAction *m_action;
155  QGraphicsItem *m_gridItem;
156  QRectF m_previousBoundingRect;
157  };
158 };
159 
160 #endif
161 
Isis::MosaicGridTool::setBaseLon
void setBaseLon(Longitude baseLon)
Modify the base longitude.
Definition: MosaicGridTool.cpp:281
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::MosaicGridTool::density
int density()
The density or resolution of the grid.
Definition: MosaicGridTool.cpp:113
FileName.h
Isis::MosaicSceneWidget::getView
MosaicGraphicsView * getView() const
Definition: MosaicSceneWidget.h:162
QWidget
Isis::MosaicGridTool::maxLon
Longitude maxLon()
The maximum longitude used to determine the grid's extents and increments.
Definition: MosaicGridTool.cpp:211
Isis::MosaicGridTool::addToMenu
void addToMenu(QMenu *menu)
Adds the pan action to the given menu.
Definition: MosaicGridTool.cpp:73
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::MosaicTool::getIcon
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
Definition: MosaicTool.cpp:115
Isis::MosaicGridTool::latExtents
GridExtentSource latExtents()
The extent type (Map, Cubes, Manual) for the latitude.
Definition: MosaicGridTool.cpp:133
Isis::GridGraphicsItem
The visual display of the find point.
Definition: GridGraphicsItem.h:40
Isis::MosaicGridTool::setBaseLat
void setBaseLat(Latitude baseLat)
Modify the base latitude.
Definition: MosaicGridTool.cpp:271
Isis::MosaicSceneWidget::getProjection
Projection * getProjection() const
Definition: MosaicSceneWidget.h:170
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
MosaicSceneWidget.h
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::MosaicGridTool
This controls the 'Grid' abilities in the MosaicSceneWidget.
Definition: MosaicGridTool.h:53
Isis::MosaicGridTool::clearGrid
void clearGrid()
Clears the grid from the scene.
Definition: MosaicGridTool.cpp:781
Isis::Latitude::planetographic
double planetographic(Angle::Units units=Angle::Radians) const
Get the latitude in the planetographic coordinate system.
Definition: Latitude.cpp:315
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::MosaicGridTool::Manual
@ Manual
The grid will be drawn using the extents that the user specifies.
Definition: MosaicGridTool.h:70
Isis::MosaicGridToolConfigDialog
Configure user's settings for the grid tool.
Definition: MosaicGridToolConfigDialog.h:37
Isis::MosaicGridTool::domainMaxLon
Longitude domainMaxLon()
Definition: MosaicGridTool.cpp:691
Isis::TProjection::SetCoordinate
virtual bool SetCoordinate(const double x, const double y)
This method is used to set the projection x/y.
Definition: TProjection.cpp:789
Isis::TProjection::MinimumLongitude
virtual double MinimumLongitude() const
This returns the minimum longitude of the area of interest.
Definition: TProjection.cpp:732
Isis::MosaicGridTool::drawGrid
void drawGrid()
Creates the GridGraphicsItem that will draw the grid.
Definition: MosaicGridTool.cpp:835
QMenu
Isis::MosaicGridTool::fromPvl
void fromPvl(const PvlObject &obj)
Read the tool information form a pvl object.
Definition: MosaicGridTool.cpp:559
Isis::MosaicGridTool::GridExtentSource
GridExtentSource
Definition: MosaicGridTool.h:57
Isis::MosaicTool::getWidget
MosaicSceneWidget * getWidget()
Definition: MosaicTool.h:96
Isis::TProjection::Longitude
virtual double Longitude() const
This returns a longitude with correct longitude direction and domain as specified in the label object...
Definition: TProjection.cpp:823
Longitude.h
Isis::Projection::projectionType
ProjectionType projectionType() const
Returns an enum value for the projection type.
Definition: Projection.cpp:198
Isis::MosaicSceneWidget
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:153
Isis::MosaicGridTool::autoGrid
void autoGrid(bool draw)
Calculates the lat/lon increments from the bounding rectangle of the open cubes.
Definition: MosaicGridTool.cpp:715
Isis::MosaicGridTool::setDensity
void setDensity(int density)
Modify the density.
Definition: MosaicGridTool.cpp:291
Isis::MosaicGridTool::showGrid
bool showGrid()
True if grid is displayed.
Definition: MosaicGridTool.cpp:251
Isis::TProjection::MaximumLatitude
virtual double MaximumLatitude() const
This returns the maximum latitude of the area of interest.
Definition: TProjection.cpp:721
Isis::MosaicTool
Base class for the MosaicTools.
Definition: MosaicTool.h:37
Isis::TProjection::EquatorialRadius
double EquatorialRadius() const
This returns the equatorial radius of the target.
Definition: TProjection.cpp:277
Isis::TProjection::Has360Domain
bool Has360Domain() const
This indicates if the longitude domain is 0 to 360 (as opposed to -180 to 180).
Definition: TProjection.cpp:643
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::MosaicGridTool::setLatInc
void setLatInc(Angle latInc)
Modify the latitude increment.
Definition: MosaicGridTool.cpp:413
Isis::MosaicGridTool::domainMinLon
Longitude domainMinLon()
Definition: MosaicGridTool.cpp:673
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::MosaicSceneWidget::getScene
QGraphicsScene * getScene() const
Definition: MosaicSceneWidget.h:166
Isis::MosaicGridTool::toPvl
PvlObject toPvl() const
Store the tool information in a pvl object.
Definition: MosaicGridTool.cpp:647
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
MosaicGridTool.h
Isis::TProjection::LongitudeDomainString
QString LongitudeDomainString() const
This method returns the longitude domain as a string.
Definition: TProjection.cpp:698
Isis::MosaicGridTool::onCubesChanged
void onCubesChanged()
Determines whether or not the bounding rectangle was changed by the addition or removal of cubes.
Definition: MosaicGridTool.cpp:897
Isis::TProjection::LatitudeTypeString
QString LatitudeTypeString() const
This method returns the latitude type as a string.
Definition: TProjection.cpp:508
Isis::TProjection::SetUniversalGround
virtual bool SetUniversalGround(const double lat, const double lon)
This method is used to set the latitude/longitude which must be Planetocentric (latitude) and Positiv...
Definition: TProjection.cpp:839
Isis::MosaicGridTool::getToolBarWidget
QWidget * getToolBarWidget()
Creates the Grid Toolbar Widget.
Definition: MosaicGridTool.cpp:981
Isis::MosaicGridTool::setLatExtents
void setLatExtents(GridExtentSource source, Latitude minLat, Latitude maxLat)
Set the maximum and minimum latitude of the grid.
Definition: MosaicGridTool.cpp:303
Isis::MosaicGridTool::setShowGrid
void setShowGrid(bool show)
Modify the check state of the checkbox.
Definition: MosaicGridTool.cpp:549
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Isis::MosaicGridTool::setLonExtents
void setLonExtents(GridExtentSource source, Longitude minLon, Longitude maxLon)
Set the maximum and minimum longitude of the grid.
Definition: MosaicGridTool.cpp:427
Isis::MosaicGridTool::Map
@ Map
The grid will be drawn using the extents from the map projection.
Definition: MosaicGridTool.h:61
Latitude.h
Isis::MosaicGridTool::latInc
Angle latInc()
The angle of the latitude increment.
Definition: MosaicGridTool.cpp:123
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::TProjection::PolarRadius
double PolarRadius() const
This returns the polar radius of the target.
Definition: TProjection.cpp:287
Isis::TProjection::Latitude
virtual double Latitude() const
This returns a latitude with correct latitude type as specified in the label object.
Definition: TProjection.cpp:811
Isis::toInt
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
Isis::MosaicGridTool::boundingRectChanged
void boundingRectChanged()
Isis::MosaicGridTool::lonDomain
QString lonDomain()
The longitude domain of the projection of the scene.
Definition: MosaicGridTool.cpp:162
Isis::MosaicTool::activated
void activated(bool)
Isis::Latitude::Planetocentric
@ Planetocentric
This is the universal (and default) latitude coordinate system.
Definition: Latitude.h:91
Isis::TProjection
Base class for Map TProjections.
Definition: TProjection.h:166
Isis::PvlObject::hasKeyword
bool hasKeyword(const QString &kname, FindOptions opts) const
See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within ...
Definition: PvlObject.cpp:236
Isis::MosaicGridTool::projectPvlObjectName
QString projectPvlObjectName() const
An accessor for the name of the Pvl object that the tool's information is stored in.
Definition: MosaicGridTool.cpp:637
Isis::MosaicGridTool::baseLat
Latitude baseLat()
The base latitude.
Definition: MosaicGridTool.cpp:92
Isis::MosaicGridTool::createToolBarWidget
QWidget * createToolBarWidget()
Creates the widget to add to the tool bar.
Definition: MosaicGridTool.cpp:947
Isis::MosaicGridTool::maxLat
Latitude maxLat()
The maximum latitude used to determine the grid's extents and increments.
Definition: MosaicGridTool.cpp:201
MosaicGraphicsView.h
Isis::Angle
Defines an angle and provides unit conversions.
Definition: Angle.h:45
GridGraphicsItem.h
TProjection.h
Isis::TProjection::MaximumLongitude
virtual double MaximumLongitude() const
This returns the maximum longitude of the area of interest.
Definition: TProjection.cpp:743
Isis::MosaicGridTool::autoGridCheckBox
bool autoGridCheckBox()
True if checked.
Definition: MosaicGridTool.cpp:82
Isis::MosaicGridTool::minLat
Latitude minLat()
The minimum latitude used to determine the grid's extents and increments.
Definition: MosaicGridTool.cpp:221
IException.h
Isis::MosaicGridTool::getPrimaryAction
QAction * getPrimaryAction()
Adds the action to the toolpad.
Definition: MosaicGridTool.cpp:960
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Isis::MosaicGridTool::setAutoGridCheckBox
void setAutoGridCheckBox(bool checked)
Modify the check state of the checkbox.
Definition: MosaicGridTool.cpp:261
MosaicGridToolConfigDialog.h
Isis::MosaicGridTool::configure
void configure()
Give a configuration dialog for the options available in this tool.
Definition: MosaicGridTool.cpp:797
Isis::MosaicGridTool::setLonInc
void setLonInc(Angle lonInc)
Modify the longitude increment.
Definition: MosaicGridTool.cpp:534
Isis::toBool
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
Definition: IString.cpp:38
Isis::MosaicGridTool::onToolOpen
void onToolOpen(bool check)
Checks both checkboxes when the tool is first opened.
Definition: MosaicGridTool.cpp:915
Angle.h
PvlObject.h
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Projection.h
Isis::TProjection::MinimumLatitude
virtual double MinimumLatitude() const
This returns the minimum latitude of the area of interest.
Definition: TProjection.cpp:710
Isis::Projection::Triaxial
@ Triaxial
These projections are used to map triaxial and irregular-shaped bodies.
Definition: Projection.h:166
Isis::TProjection::Mapping
virtual PvlGroup Mapping()
This function returns the keywords that this projection uses.
Definition: TProjection.cpp:1698
QDialog
Isis::MosaicGridTool::Cubes
@ Cubes
The grid will be drawn using the extents from the bounding rectangle of the open cubes.
Definition: MosaicGridTool.h:66
Isis::MosaicGridTool::latType
QString latType()
The latitude type (planetocentric/planetographic) of the projection of the scene.
Definition: MosaicGridTool.cpp:143
Distance.h
Isis::Projection::YCoord
double YCoord() const
This returns the projection Y provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:400
Isis::MosaicGridTool::onProjectionChanged
void onProjectionChanged()
Definition: MosaicGridTool.cpp:810
Isis::MosaicGridTool::minLon
Longitude minLon()
The minimum longitude used to determine the grid's extents and increments.
Definition: MosaicGridTool.cpp:231
MosaicTool.h
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::MosaicGridTool::lonExtents
GridExtentSource lonExtents()
The extent type (Map, Cubes, Manual) for the longitude.
Definition: MosaicGridTool.cpp:181
QAction
Isis::MosaicGridTool::MosaicGridTool
MosaicGridTool(MosaicSceneWidget *)
MosaicGridTool constructor.
Definition: MosaicGridTool.cpp:38
QGraphicsItem
Isis::MosaicSceneWidget::cubesBoundingRect
QRectF cubesBoundingRect() const
Definition: MosaicSceneWidget.cpp:678
Isis::MosaicGridTool::lonInc
Angle lonInc()
The angle of the longitude increment.
Definition: MosaicGridTool.cpp:191
Isis::Projection::XCoord
double XCoord() const
This returns the projection X provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:387
Isis::MosaicGridTool::sceneWidget
MosaicSceneWidget * sceneWidget()
Definition: MosaicGridTool.cpp:241
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::MosaicGridTool::baseLon
Longitude baseLon()
The base longitude.
Definition: MosaicGridTool.cpp:102