Isis 3 Programmer Reference
SunShadowTool.h
1#ifndef SunShadowTool_h
2#define SunShadowTool_h
3
4#include "Tool.h"
5
6#include <QAction>
7
8#include "IString.h"
9#include "TableMainWindow.h"
10
11class QCheckBox;
12class QComboBox;
13class QDialog;
14class QLineEdit;
15class QMenu;
16class QString;
17
18namespace Isis {
19 class Angle;
20 class Distance;
21 class MdiCubeViewport;
22 class SurfacePoint;
23
39 class SunShadowTool : public Tool {
40 Q_OBJECT
41
42 public:
43 SunShadowTool(QWidget *parent);
44 void addTo(QMenu *menu);
45
46 void paintViewport(MdiCubeViewport *vp, QPainter *painter);
47
48 protected slots:
49 virtual void mouseMove(QPoint p);
50 virtual void mouseButtonPress(QPoint p, Qt::MouseButton s);
51 virtual void mouseButtonRelease(QPoint p, Qt::MouseButton s);
52
53 protected:
54 QWidget *createToolBarWidget(QStackedWidget *parent);
56
57 void updateTool();
58
59 private slots:
61 void reinitialize();
62
63 private:
64 void addRow();
66 void updateRow(int row);
67
68 private:
75
113
120
122 double m_endSamp;
124 double m_endLine;
127
130
135
137 QString m_path;
139 QString m_fileName;
140
152 };
153
154};
155
156#endif
Defines an angle and provides unit conversions.
Definition Angle.h:45
Distance measurement, usually in meters.
Definition Distance.h:34
Cube display widget for certain Isis MDI applications.
Tool for measuring shadow heights.
void updateShadowHeightEdit()
Change the value in the distance edit to match the units.
SurfacePoint * m_endSurfacePoint
End ground coordinate of the measurement.
QComboBox * m_unitsComboBox
User can choose the height line edit's units (M or KM)
QAction * toolPadAction(ToolPad *pad)
Create an action for activating this tool.
QString m_path
Current cube file path.
QLineEdit * m_shadowHeightLineEdit
This displays the currently calculated height of the measured shadow.
void recalculateShadowHeight()
Try to calculate the shadow height.
void updateTool()
This enables/disables this tool's functionality based on the active viewport's compatibility.
virtual void mouseButtonPress(QPoint p, Qt::MouseButton s)
When the mouse left button is pressed we start tracking.
TableColumnIndex
Enum for storing all the indexes.
@ StartLonIndex
Start lon table column index.
@ EndLineIndex
End cube line table column index.
@ ShadowHeightMIndex
Shadow height in meters table column index.
@ IncidenceAngleDegreesIndex
Incidence angle in degrees table column index.
@ StartLatIndex
Start lat table column index.
@ StartLineIndex
Start cube line table column index.
@ ShadowLengthKmIndex
Shadow length in kilometers table column index.
@ IncidenceAngleRadiansIndex
Incidence angle in radians table column index.
@ ShadowLengthMIndex
Shadow length in meters table column index.
@ EndSampIndex
End cube sample table column index.
@ EndLonIndex
End lon table column index.
@ ShadowHeightKmIndex
Shadow height in kilometers table column index.
@ EndLatIndex
End lat table column index.
@ FileNameIndex
Cube file name table column index.
@ StartSampIndex
Start cube sample table column index.
@ PathIndex
Cube file path table column index.
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget (button) that goes on the tool bar.
Distance * m_shadowHeight
Calculated shadow height.
Distance * m_shadowLength
Calculated shadow length.
void updateRow(int row)
This method updates the row in the table window with the current measure information.
bool m_tracking
True if currently tracking the user's mouse position and calculating values on every mouse move.
double m_endLine
End line of the measurement.
QString m_fileName
Current cube file name.
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
Paint anything we need to on the viewport.
QCheckBox * m_drawInSunDirection
Check box to enable/disable confining tracking to sun direction.
SurfacePoint * m_startSurfacePoint
Start ground coordinate of the measurement.
SunShadowTool(QWidget *parent)
Construct a sun shadow tool.
Angle * m_incidenceAngle
Incidence angle from the normal at the end point.
void reinitialize()
Clear all calculated values and then re-calculate them.
virtual void mouseButtonRelease(QPoint p, Qt::MouseButton s)
When the mouse left button is released we finish tracking.
bool m_enabled
True if this tool is enabled (capable of working). Requires a camera.
virtual void mouseMove(QPoint p)
When the mouse moves, if we're tracking then we go ahead and update all of our calculated values for ...
double m_startSamp
Start sample of the measurement.
Angle * m_trackingAngle
The angle that we want mouse tracking to be in.
double m_endSamp
End sample of the measurement.
TableMainWindow * m_tableWin
Table window for displaying all of the table information.
void addTo(QMenu *menu)
Adds the measure action to the given menu.
double m_startLine
Start line of the measurement.
void addRow()
Add a results row to the table.
This class defines a body-fixed surface point.
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
Base class for the Qisis tools.
Definition Tool.h:67
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16