Isis 3 Programmer Reference
MosaicGridTool.h
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,
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 
110  Longitude domainMinLon();
111  Longitude domainMaxLon();
112 
113  signals:
114  void boundingRectChanged();
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 
126  protected:
130 
131  private:
132  QPointer<QLabel> m_autoGridLabel;
133  QPointer<QCheckBox> m_autoGridCheckBox;
134  QPointer<QCheckBox> m_drawGridCheckBox;
136 
139 
142 
146 
150 
151  int m_density;
152 
153  QAction *m_action;
154  QGraphicsItem *m_gridItem;
156  };
157 };
158 
159 #endif
160 
Longitude m_maxLon
Maximum longitude of the grid.
Latitude maxLat()
The maximum latitude used to determine the grid&#39;s extents and increments.
void autoGrid(bool draw)
Calculates the lat/lon increments from the bounding rectangle of the open cubes.
Latitude baseLat()
The base latitude.
QString lonDomain()
The longitude domain of the projection of the scene.
void setLonExtents(GridExtentSource source, Longitude minLon, Longitude maxLon)
Set the maximum and minimum longitude of the grid.
void setLatExtents(GridExtentSource source, Latitude minLat, Latitude maxLat)
Set the maximum and minimum latitude of the grid.
Longitude minLon()
The minimum longitude used to determine the grid&#39;s extents and increments.
void setBaseLon(Longitude baseLon)
Modify the base longitude.
This widget encompasses the entire mosaic scene.
Angle m_lonInc
Longitude increment for drawing the grid.
void setLonInc(Angle lonInc)
Modify the longitude increment.
The grid will be drawn using the extents that the user specifies.
Base class for the MosaicTools.
Definition: MosaicTool.h:37
Longitude m_baseLon
Base longitude for drawing the grid.
GridExtentSource m_lonExtents
Used for the state of the options dialog.
MosaicSceneWidget * sceneWidget()
Longitude baseLon()
The base longitude.
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:63
GridExtentSource lonExtents()
The extent type (Map, Cubes, Manual) for the longitude.
Angle lonInc()
The angle of the longitude increment.
void clearGrid()
Clears the grid from the scene.
void onToolOpen(bool check)
Checks both checkboxes when the tool is first opened.
GridExtentSource m_latExtents
Used for the state of the options dialog.
Angle m_latInc
Latitude increment for drawing the grid.
QRectF m_previousBoundingRect
The bounding rectangle of the previous set of open cubes.
void configure()
Give a configuration dialog for the options available in this tool.
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
void fromPvl(const PvlObject &obj)
Read the tool information form a pvl object.
The grid will be drawn using the extents from the map projection.
Longitude m_minLon
Minimum longitude of the grid.
QString latType()
The latitude type (planetocentric/planetographic) of the projection of the scene. ...
QWidget * createToolBarWidget()
Creates the widget to add to the tool bar.
bool autoGridCheckBox()
True if checked.
Longitude maxLon()
The maximum longitude used to determine the grid&#39;s extents and increments.
void setAutoGridCheckBox(bool checked)
Modify the check state of the checkbox.
Latitude m_maxLat
Maximum latitude of the grid.
Latitude minLat()
The minimum latitude used to determine the grid&#39;s extents and increments.
Latitude m_minLat
Minimum latitude of the grid.
bool m_shouldCheckBoxes
True when the tool is first opened to check the checkboxes.
Latitude m_baseLat
Base latitude for drawing the grid.
void setBaseLat(Latitude baseLat)
Modify the base latitude.
void addToMenu(QMenu *menu)
Adds the pan action to the given menu.
QAction * getPrimaryAction()
Adds the action to the toolpad.
void setShowGrid(bool show)
Modify the check state of the checkbox.
QPointer< QLabel > m_autoGridLabel
Enabled and diabled with the autoGrid checkbox.
MosaicGridTool(MosaicSceneWidget *)
MosaicGridTool constructor.
int density()
The density or resolution of the grid.
Defines an angle and provides unit conversions.
Definition: Angle.h:62
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
QString projectPvlObjectName() const
An accessor for the name of the Pvl object that the tool&#39;s information is stored in.
QPointer< QCheckBox > m_drawGridCheckBox
True if grid properties come from the open cubes.
The grid will be drawn using the extents from the bounding rectangle of the open cubes.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void drawGrid()
Creates the GridGraphicsItem that will draw the grid.
QWidget * getToolBarWidget()
Creates the Grid Toolbar Widget.
GridExtentSource latExtents()
The extent type (Map, Cubes, Manual) for the latitude.
int m_density
Grid density for drawing the grid.
This controls the &#39;Grid&#39; abilities in the MosaicSceneWidget.
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
bool showGrid()
True if grid is displayed.
void setLatInc(Angle latInc)
Modify the latitude increment.
void setDensity(int density)
Modify the density.
void onCubesChanged()
Determines whether or not the bounding rectangle was changed by the addition or removal of cubes...
PvlObject toPvl() const
Store the tool information in a pvl object.
QPointer< QCheckBox > m_autoGridCheckBox
True if grid properties come from the open cubes.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Angle latInc()
The angle of the latitude increment.