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
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
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 void onProjectionChanged();
126
127 protected:
131
132 private:
133 QPointer<QLabel> m_autoGridLabel;
134 QPointer<QCheckBox> m_autoGridCheckBox;
135 QPointer<QCheckBox> m_drawGridCheckBox;
137
140
143
147
151
153
154 QAction *m_action;
155 QGraphicsItem *m_gridItem;
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.
void setShowGrid(bool show)
Modify the check state of the checkbox.
Angle latInc()
The angle of the latitude increment.
QWidget * createToolBarWidget()
Creates the widget to add to the tool bar.
Longitude m_baseLon
Base longitude for drawing the grid.
void setLonExtents(GridExtentSource source, Longitude minLon, Longitude maxLon)
Set the maximum and minimum longitude of the grid.
void onCubesChanged()
Determines whether or not the bounding rectangle was changed by the addition or removal of cubes.
MosaicSceneWidget * sceneWidget()
PvlObject toPvl() const
Store the tool information in a pvl object.
Latitude maxLat()
The maximum latitude used to determine the grid's extents and increments.
void onToolOpen(bool check)
Checks both checkboxes when the tool is first opened.
Longitude m_maxLon
Maximum longitude of the grid.
MosaicGridTool(MosaicSceneWidget *)
MosaicGridTool constructor.
GridExtentSource lonExtents()
The extent type (Map, Cubes, Manual) for the longitude.
bool autoGridCheckBox()
True if checked.
Latitude m_maxLat
Maximum latitude of the grid.
void setDensity(int density)
Modify the density.
QPointer< QLabel > m_autoGridLabel
Enabled and diabled with the autoGrid checkbox.
Longitude minLon()
The minimum longitude used to determine the grid's extents and increments.
Latitude m_baseLat
Base latitude for drawing the grid.
Longitude m_minLon
Minimum longitude of the grid.
void configure()
Give a configuration dialog for the options available in this tool.
Angle m_latInc
Latitude increment for drawing the grid.
Latitude minLat()
The minimum latitude used to determine the grid's extents and increments.
@ Cubes
The grid will be drawn using the extents from the bounding rectangle of the open cubes.
@ Manual
The grid will be drawn using the extents that the user specifies.
@ Map
The grid will be drawn using the extents from the map projection.
bool m_shouldCheckBoxes
True when the tool is first opened to check the checkboxes.
void fromPvl(const PvlObject &obj)
Read the tool information form a pvl object.
QPointer< QCheckBox > m_autoGridCheckBox
True if grid properties come from the open cubes.
bool showGrid()
True if grid is displayed.
Latitude baseLat()
The base latitude.
void clearGrid()
Clears the grid from the scene.
QRectF m_previousBoundingRect
The bounding rectangle of the previous set of open cubes.
Longitude baseLon()
The base longitude.
int density()
The density or resolution of the grid.
QAction * getPrimaryAction()
Adds the action to the toolpad.
Angle lonInc()
The angle of the longitude increment.
void drawGrid()
Creates the GridGraphicsItem that will draw the grid.
void setLatExtents(GridExtentSource source, Latitude minLat, Latitude maxLat)
Set the maximum and minimum latitude of the grid.
int m_density
Grid density for drawing the grid.
void setAutoGridCheckBox(bool checked)
Modify the check state of the checkbox.
GridExtentSource m_lonExtents
Used for the state of the options dialog.
QString projectPvlObjectName() const
An accessor for the name of the Pvl object that the tool's information is stored in.
void setBaseLon(Longitude baseLon)
Modify the base longitude.
void autoGrid(bool draw)
Calculates the lat/lon increments from the bounding rectangle of the open cubes.
QString latType()
The latitude type (planetocentric/planetographic) of the projection of the scene.
QPointer< QCheckBox > m_drawGridCheckBox
True if grid properties come from the open cubes.
Latitude m_minLat
Minimum latitude of the grid.
void setLonInc(Angle lonInc)
Modify the longitude increment.
void setLatInc(Angle latInc)
Modify the latitude increment.
Longitude maxLon()
The maximum longitude used to determine the grid's extents and increments.
void addToMenu(QMenu *menu)
Adds the pan action to the given menu.
void setBaseLat(Latitude baseLat)
Modify the base latitude.
Angle m_lonInc
Longitude increment for drawing the grid.
QString lonDomain()
The longitude domain of the projection of the scene.
QWidget * getToolBarWidget()
Creates the Grid Toolbar Widget.
GridExtentSource m_latExtents
Used for the state of the options dialog.
GridExtentSource latExtents()
The extent type (Map, Cubes, Manual) for the latitude.
This widget encompasses the entire mosaic scene.
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