Isis 3.0
Home
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,
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:
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;
135  bool m_shouldCheckBoxes;
136 
137  Latitude m_baseLat;
138  Longitude m_baseLon;
139 
140  Angle m_latInc;
141  Angle m_lonInc;
142 
143  GridExtentSource m_latExtents;
144  Latitude m_maxLat;
145  Latitude m_minLat;
146 
147  GridExtentSource m_lonExtents;
148  Longitude m_maxLon;
149  Longitude m_minLon;
150 
151  int m_density;
152 
153  QAction *m_action;
154  QGraphicsItem *m_gridItem;
155  QRectF m_previousBoundingRect;
156  };
157 };
158 
159 #endif
160 
Latitude maxLat()
The maximum latitude used to determine the grid&#39;s extents and increments.
Definition: MosaicGridTool.cpp:197
void autoGrid(bool draw)
Calculates the lat/lon increments from the bounding rectangle of the open cubes.
Definition: MosaicGridTool.cpp:710
Latitude baseLat()
The base latitude.
Definition: MosaicGridTool.cpp:88
QString lonDomain()
The longitude domain of the projection of the scene.
Definition: MosaicGridTool.cpp:158
void setLonExtents(GridExtentSource source, Longitude minLon, Longitude maxLon)
Set the maximum and minimum longitude of the grid.
Definition: MosaicGridTool.cpp:423
Longitude domainMinLon()
Definition: MosaicGridTool.cpp:668
void setLatExtents(GridExtentSource source, Latitude minLat, Latitude maxLat)
Set the maximum and minimum latitude of the grid.
Definition: MosaicGridTool.cpp:299
Longitude minLon()
The minimum longitude used to determine the grid&#39;s extents and increments.
Definition: MosaicGridTool.cpp:227
void boundingRectChanged()
Definition: moc_MosaicGridTool.cpp:158
void setBaseLon(Longitude baseLon)
Modify the base longitude.
Definition: MosaicGridTool.cpp:277
This widget encompasses the entire mosaic scene.
Definition: MosaicSceneWidget.h:141
void setLonInc(Angle lonInc)
Modify the longitude increment.
Definition: MosaicGridTool.cpp:529
The grid will be drawn using the extents that the user specifies.
Definition: MosaicGridTool.h:70
Base class for the MosaicTools.
Definition: MosaicTool.h:37
MosaicSceneWidget * sceneWidget()
Definition: MosaicGridTool.cpp:237
Longitude baseLon()
The base longitude.
Definition: MosaicGridTool.cpp:98
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
GridExtentSource lonExtents()
The extent type (Map, Cubes, Manual) for the longitude.
Definition: MosaicGridTool.cpp:177
Angle lonInc()
The angle of the longitude increment.
Definition: MosaicGridTool.cpp:187
void clearGrid()
Clears the grid from the scene.
Definition: MosaicGridTool.cpp:776
void onToolOpen(bool check)
Checks both checkboxes when the tool is first opened.
Definition: MosaicGridTool.cpp:884
void configure()
Give a configuration dialog for the options available in this tool.
Definition: MosaicGridTool.cpp:792
Longitude domainMaxLon()
Definition: MosaicGridTool.cpp:686
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.
Definition: MosaicGridTool.cpp:554
The grid will be drawn using the extents from the map projection.
Definition: MosaicGridTool.h:61
QString latType()
The latitude type (planetocentric/planetographic) of the projection of the scene. ...
Definition: MosaicGridTool.cpp:139
QWidget * createToolBarWidget()
Creates the widget to add to the tool bar.
Definition: MosaicGridTool.cpp:916
bool autoGridCheckBox()
True if checked.
Definition: MosaicGridTool.cpp:78
Longitude maxLon()
The maximum longitude used to determine the grid&#39;s extents and increments.
Definition: MosaicGridTool.cpp:207
void setAutoGridCheckBox(bool checked)
Modify the check state of the checkbox.
Definition: MosaicGridTool.cpp:257
Latitude minLat()
The minimum latitude used to determine the grid&#39;s extents and increments.
Definition: MosaicGridTool.cpp:217
void setBaseLat(Latitude baseLat)
Modify the base latitude.
Definition: MosaicGridTool.cpp:267
void addToMenu(QMenu *menu)
Adds the pan action to the given menu.
Definition: MosaicGridTool.cpp:69
GridExtentSource
Definition: MosaicGridTool.h:57
QAction * getPrimaryAction()
Adds the action to the toolpad.
Definition: MosaicGridTool.cpp:929
void setShowGrid(bool show)
Modify the check state of the checkbox.
Definition: MosaicGridTool.cpp:544
MosaicGridTool(MosaicSceneWidget *)
MosaicGridTool constructor.
Definition: MosaicGridTool.cpp:38
int density()
The density or resolution of the grid.
Definition: MosaicGridTool.cpp:109
Defines an angle and provides unit conversions.
Definition: Angle.h:58
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
The grid will be drawn using the extents from the bounding rectangle of the open cubes.
Definition: MosaicGridTool.h:66
void drawGrid()
Creates the GridGraphicsItem that will draw the grid.
Definition: MosaicGridTool.cpp:806
QWidget * getToolBarWidget()
Creates the Grid Toolbar Widget.
Definition: MosaicGridTool.cpp:950
GridExtentSource latExtents()
The extent type (Map, Cubes, Manual) for the latitude.
Definition: MosaicGridTool.cpp:129
This controls the &#39;Grid&#39; abilities in the MosaicSceneWidget.
Definition: MosaicGridTool.h:53
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
bool showGrid()
True if grid is displayed.
Definition: MosaicGridTool.cpp:247
void setLatInc(Angle latInc)
Modify the latitude increment.
Definition: MosaicGridTool.cpp:409
void setDensity(int density)
Modify the density.
Definition: MosaicGridTool.cpp:287
void onCubesChanged()
Determines whether or not the bounding rectangle was changed by the addition or removal of cubes...
Definition: MosaicGridTool.cpp:866
PvlObject toPvl() const
Store the tool information in a pvl object.
Definition: MosaicGridTool.cpp:642
QString projectPvlObjectName() const
An accessor for the name of the Pvl object that the tool&#39;s information is stored in.
Definition: MosaicGridTool.cpp:632
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Angle latInc()
The angle of the latitude increment.
Definition: MosaicGridTool.cpp:119