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
12class QAction;
13class QCheckBox;
14class QDialog;
15class QGraphicsItem;
16class GridGraphicsItem;
17class QLabel;
18class Projection;
19class QPushButton;
20class QToolButton;
21
22namespace Isis {
53 class MosaicGridTool : public MosaicTool {
54 Q_OBJECT
55
56 public:
72
74 void addToMenu(QMenu *menu);
75
76 //Accessors
77 bool autoGridCheckBox();
80 int density();
81 Angle latInc();
82 GridExtentSource latExtents();
83 QString latType();
84 QString lonDomain();
85 GridExtentSource lonExtents();
86 Angle lonInc();
92 bool showGrid();
93
94 //Mutators
95 void setAutoGridCheckBox(bool checked);
98 void setDensity(int density);
99 void setLatExtents(GridExtentSource source, Latitude minLat, Latitude maxLat);
100 void setLatInc(Angle latInc);
101 void setLonExtents(GridExtentSource source, Longitude minLon, Longitude maxLon);
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
Defines an angle and provides unit conversions.
Definition Angle.h:45
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
This controls the 'Grid' abilities in the MosaicSceneWidget.
Definition MosaicGridTool.h:53
void setShowGrid(bool show)
Modify the check state of the checkbox.
Definition MosaicGridTool.cpp:549
Angle latInc()
The angle of the latitude increment.
Definition MosaicGridTool.cpp:123
QWidget * createToolBarWidget()
Creates the widget to add to the tool bar.
Definition MosaicGridTool.cpp:952
void setLonExtents(GridExtentSource source, Longitude minLon, Longitude maxLon)
Set the maximum and minimum longitude of the grid.
Definition MosaicGridTool.cpp:427
void onCubesChanged()
Determines whether or not the bounding rectangle was changed by the addition or removal of cubes.
Definition MosaicGridTool.cpp:902
MosaicSceneWidget * sceneWidget()
Definition MosaicGridTool.cpp:241
PvlObject toPvl() const
Store the tool information in a pvl object.
Definition MosaicGridTool.cpp:647
Latitude maxLat()
The maximum latitude used to determine the grid's extents and increments.
Definition MosaicGridTool.cpp:201
void onToolOpen(bool check)
Checks both checkboxes when the tool is first opened.
Definition MosaicGridTool.cpp:920
MosaicGridTool(MosaicSceneWidget *)
MosaicGridTool constructor.
Definition MosaicGridTool.cpp:38
GridExtentSource lonExtents()
The extent type (Map, Cubes, Manual) for the longitude.
Definition MosaicGridTool.cpp:181
bool autoGridCheckBox()
True if checked.
Definition MosaicGridTool.cpp:82
void setDensity(int density)
Modify the density.
Definition MosaicGridTool.cpp:291
Longitude minLon()
The minimum longitude used to determine the grid's extents and increments.
Definition MosaicGridTool.cpp:231
void configure()
Give a configuration dialog for the options available in this tool.
Definition MosaicGridTool.cpp:797
Latitude minLat()
The minimum latitude used to determine the grid's extents and increments.
Definition MosaicGridTool.cpp:221
GridExtentSource
Definition MosaicGridTool.h:57
@ Cubes
The grid will be drawn using the extents from the bounding rectangle of the open cubes.
Definition MosaicGridTool.h:66
@ Manual
The grid will be drawn using the extents that the user specifies.
Definition MosaicGridTool.h:70
@ Map
The grid will be drawn using the extents from the map projection.
Definition MosaicGridTool.h:61
void fromPvl(const PvlObject &obj)
Read the tool information form a pvl object.
Definition MosaicGridTool.cpp:559
bool showGrid()
True if grid is displayed.
Definition MosaicGridTool.cpp:251
Latitude baseLat()
The base latitude.
Definition MosaicGridTool.cpp:92
void clearGrid()
Clears the grid from the scene.
Definition MosaicGridTool.cpp:781
void onProjectionChanged()
Definition MosaicGridTool.cpp:810
Longitude baseLon()
The base longitude.
Definition MosaicGridTool.cpp:102
int density()
The density or resolution of the grid.
Definition MosaicGridTool.cpp:113
QAction * getPrimaryAction()
Adds the action to the toolpad.
Definition MosaicGridTool.cpp:965
Angle lonInc()
The angle of the longitude increment.
Definition MosaicGridTool.cpp:191
void drawGrid()
Creates the GridGraphicsItem that will draw the grid.
Definition MosaicGridTool.cpp:840
void setLatExtents(GridExtentSource source, Latitude minLat, Latitude maxLat)
Set the maximum and minimum latitude of the grid.
Definition MosaicGridTool.cpp:303
void setAutoGridCheckBox(bool checked)
Modify the check state of the checkbox.
Definition MosaicGridTool.cpp:261
QString projectPvlObjectName() const
An accessor for the name of the Pvl object that the tool's information is stored in.
Definition MosaicGridTool.cpp:637
void setBaseLon(Longitude baseLon)
Modify the base longitude.
Definition MosaicGridTool.cpp:281
void autoGrid(bool draw)
Calculates the lat/lon increments from the bounding rectangle of the open cubes.
Definition MosaicGridTool.cpp:715
QString latType()
The latitude type (planetocentric/planetographic) of the projection of the scene.
Definition MosaicGridTool.cpp:143
void setLonInc(Angle lonInc)
Modify the longitude increment.
Definition MosaicGridTool.cpp:534
void setLatInc(Angle latInc)
Modify the latitude increment.
Definition MosaicGridTool.cpp:413
Longitude maxLon()
The maximum longitude used to determine the grid's extents and increments.
Definition MosaicGridTool.cpp:211
void addToMenu(QMenu *menu)
Adds the pan action to the given menu.
Definition MosaicGridTool.cpp:73
void setBaseLat(Latitude baseLat)
Modify the base latitude.
Definition MosaicGridTool.cpp:271
Longitude domainMinLon()
Definition MosaicGridTool.cpp:673
QString lonDomain()
The longitude domain of the projection of the scene.
Definition MosaicGridTool.cpp:162
Longitude domainMaxLon()
Definition MosaicGridTool.cpp:691
QWidget * getToolBarWidget()
Creates the Grid Toolbar Widget.
Definition MosaicGridTool.cpp:986
GridExtentSource latExtents()
The extent type (Map, Cubes, Manual) for the latitude.
Definition MosaicGridTool.cpp:133
This widget encompasses the entire mosaic scene.
Definition MosaicSceneWidget.h:153
Base class for the MosaicTools.
Definition MosaicTool.h:37
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16