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 
11 class QCheckBox;
12 class QComboBox;
13 class QDialog;
14 class QLineEdit;
15 class QMenu;
16 class QString;
17 
18 namespace 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 
112  };
113 
115  double m_startSamp;
117  double m_startLine;
120 
122  double m_endSamp;
124  double m_endLine;
127 
130 
135 
137  QString m_path;
139  QString m_fileName;
140 
144  bool m_enabled;
152  };
153 
154 };
155 
156 #endif
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:148
Cube display widget for certain Isis MDI applications.
void recalculateShadowHeight()
Try to calculate the shadow height.
QString m_path
Current cube file path.
Distance * m_shadowHeight
Calculated shadow height.
bool m_enabled
True if this tool is enabled (capable of working). Requires a camera.
double m_startLine
Start line of the measurement.
Shadow length in meters table column index.
Definition: SunShadowTool.h:99
Incidence angle in degrees table column index.
Shadow height in meters table column index.
void reinitialize()
Clear all calculated values and then re-calculate them.
Angle * m_incidenceAngle
Incidence angle from the normal at the end point.
double m_startSamp
Start sample of the measurement.
double m_endLine
End line of the measurement.
void updateShadowHeightEdit()
Change the value in the distance edit to match the units.
virtual void mouseButtonPress(QPoint p, Qt::MouseButton s)
When the mouse left button is pressed we start tracking.
QComboBox * m_unitsComboBox
User can choose the height line edit&#39;s units (M or KM)
Definition: SunShadowTool.h:72
virtual void mouseButtonRelease(QPoint p, Qt::MouseButton s)
When the mouse left button is released we finish tracking.
QCheckBox * m_drawInSunDirection
Check box to enable/disable confining tracking to sun direction.
Definition: SunShadowTool.h:74
End lon table column index.
Definition: SunShadowTool.h:87
Cube file name table column index.
double m_endSamp
End sample of the measurement.
void addTo(QMenu *menu)
Adds the measure action to the given menu.
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget (button) that goes on the tool bar.
Distance measurement, usually in meters.
Definition: Distance.h:47
End lat table column index.
Definition: SunShadowTool.h:85
void addRow()
Add a results row to the table.
QLineEdit * m_shadowHeightLineEdit
This displays the currently calculated height of the measured shadow.
Definition: SunShadowTool.h:70
Angle * m_trackingAngle
The angle that we want mouse tracking to be in.
Start lon table column index.
Definition: SunShadowTool.h:83
virtual void mouseMove(QPoint p)
When the mouse moves, if we&#39;re tracking then we go ahead and update all of our calculated values for ...
Start cube line table column index.
Definition: SunShadowTool.h:91
End cube sample table column index.
Definition: SunShadowTool.h:93
void updateTool()
This enables/disables this tool&#39;s functionality based on the active viewport&#39;s compatibility.
Start cube sample table column index.
Definition: SunShadowTool.h:89
Incidence angle in radians table column index.
End cube line table column index.
Definition: SunShadowTool.h:95
QAction * toolPadAction(ToolPad *pad)
Create an action for activating this tool.
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
Paint anything we need to on the viewport.
SurfacePoint * m_startSurfacePoint
Start ground coordinate of the measurement.
TableMainWindow * m_tableWin
Table window for displaying all of the table information.
Shadow length in kilometers table column index.
Definition: SunShadowTool.h:97
Start lat table column index.
Definition: SunShadowTool.h:81
void updateRow(int row)
This method updates the row in the table window with the current measure information.
QString m_fileName
Current cube file name.
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
Shadow height in kilometers table column index.
Defines an angle and provides unit conversions.
Definition: Angle.h:62
SurfacePoint * m_endSurfacePoint
End ground coordinate of the measurement.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Base class for the Qisis tools.
Definition: Tool.h:81
Distance * m_shadowLength
Calculated shadow length.
Tool for measuring shadow heights.
Definition: SunShadowTool.h:39
bool m_tracking
True if currently tracking the user&#39;s mouse position and calculating values on every mouse move...
SunShadowTool(QWidget *parent)
Construct a sun shadow tool.
Cube file path table column index.
TableColumnIndex
Enum for storing all the indexes.
Definition: SunShadowTool.h:79