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
Isis::SunShadowTool
Tool for measuring shadow heights.
Definition: SunShadowTool.h:39
Isis::SunShadowTool::SunShadowTool
SunShadowTool(QWidget *parent)
Construct a sun shadow tool.
Definition: SunShadowTool.cpp:35
Isis::SunShadowTool::m_shadowHeightLineEdit
QLineEdit * m_shadowHeightLineEdit
This displays the currently calculated height of the measured shadow.
Definition: SunShadowTool.h:70
Isis::SunShadowTool::StartLonIndex
@ StartLonIndex
Start lon table column index.
Definition: SunShadowTool.h:83
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::SunShadowTool::updateShadowHeightEdit
void updateShadowHeightEdit()
Change the value in the distance edit to match the units.
Definition: SunShadowTool.cpp:556
Isis::SunShadowTool::EndLatIndex
@ EndLatIndex
End lat table column index.
Definition: SunShadowTool.h:85
Isis::SunShadowTool::TableColumnIndex
TableColumnIndex
Enum for storing all the indexes.
Definition: SunShadowTool.h:79
Isis::SunShadowTool::mouseButtonPress
virtual void mouseButtonPress(QPoint p, Qt::MouseButton s)
When the mouse left button is pressed we start tracking.
Definition: SunShadowTool.cpp:269
Isis::SunShadowTool::m_unitsComboBox
QComboBox * m_unitsComboBox
User can choose the height line edit's units (M or KM)
Definition: SunShadowTool.h:72
Isis::SunShadowTool::m_drawInSunDirection
QCheckBox * m_drawInSunDirection
Check box to enable/disable confining tracking to sun direction.
Definition: SunShadowTool.h:74
Isis::SunShadowTool::recalculateShadowHeight
void recalculateShadowHeight()
Try to calculate the shadow height.
Definition: SunShadowTool.cpp:452
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
Isis::SunShadowTool::m_path
QString m_path
Current cube file path.
Definition: SunShadowTool.h:137
QMenu
Isis::SunShadowTool::m_shadowHeight
Distance * m_shadowHeight
Calculated shadow height.
Definition: SunShadowTool.h:132
Isis::SunShadowTool::addRow
void addRow()
Add a results row to the table.
Definition: SunShadowTool.cpp:436
Isis::SunShadowTool::EndLineIndex
@ EndLineIndex
End cube line table column index.
Definition: SunShadowTool.h:95
Isis::SunShadowTool::m_incidenceAngle
Angle * m_incidenceAngle
Incidence angle from the normal at the end point.
Definition: SunShadowTool.h:129
Isis::SunShadowTool::PathIndex
@ PathIndex
Cube file path table column index.
Definition: SunShadowTool.h:109
Isis::SunShadowTool::addTo
void addTo(QMenu *menu)
Adds the measure action to the given menu.
Definition: SunShadowTool.cpp:174
Isis::SunShadowTool::m_startSamp
double m_startSamp
Start sample of the measurement.
Definition: SunShadowTool.h:115
Isis::SunShadowTool::m_tableWin
TableMainWindow * m_tableWin
Table window for displaying all of the table information.
Definition: SunShadowTool.h:142
Isis::SunShadowTool::reinitialize
void reinitialize()
Clear all calculated values and then re-calculate them.
Definition: SunShadowTool.cpp:417
Isis::SunShadowTool::m_trackingAngle
Angle * m_trackingAngle
The angle that we want mouse tracking to be in.
Definition: SunShadowTool.h:151
Isis::SunShadowTool::m_endLine
double m_endLine
End line of the measurement.
Definition: SunShadowTool.h:124
QComboBox
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::SunShadowTool::mouseMove
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 ...
Definition: SunShadowTool.cpp:212
Isis::SunShadowTool::mouseButtonRelease
virtual void mouseButtonRelease(QPoint p, Qt::MouseButton s)
When the mouse left button is released we finish tracking.
Definition: SunShadowTool.cpp:301
Isis::SunShadowTool::m_endSamp
double m_endSamp
End sample of the measurement.
Definition: SunShadowTool.h:122
Isis::SunShadowTool::ShadowHeightMIndex
@ ShadowHeightMIndex
Shadow height in meters table column index.
Definition: SunShadowTool.h:103
Isis::SunShadowTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget (button) that goes on the tool bar.
Definition: SunShadowTool.cpp:118
Isis::SunShadowTool::toolPadAction
QAction * toolPadAction(ToolPad *pad)
Create an action for activating this tool.
Definition: SunShadowTool.cpp:92
Isis::SunShadowTool::m_shadowLength
Distance * m_shadowLength
Calculated shadow length.
Definition: SunShadowTool.h:134
Isis::TableMainWindow
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
Definition: TableMainWindow.h:57
Isis::SunShadowTool::EndLonIndex
@ EndLonIndex
End lon table column index.
Definition: SunShadowTool.h:87
Isis::Angle
Defines an angle and provides unit conversions.
Definition: Angle.h:45
Isis::SunShadowTool::updateTool
void updateTool()
This enables/disables this tool's functionality based on the active viewport's compatibility.
Definition: SunShadowTool.cpp:588
Isis::ToolPad
Definition: ToolPad.h:14
Isis::SunShadowTool::paintViewport
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
Paint anything we need to on the viewport.
Definition: SunShadowTool.cpp:185
Isis::SunShadowTool::ShadowLengthMIndex
@ ShadowLengthMIndex
Shadow length in meters table column index.
Definition: SunShadowTool.h:99
Isis::SunShadowTool::EndSampIndex
@ EndSampIndex
End cube sample table column index.
Definition: SunShadowTool.h:93
Isis::SunShadowTool::m_fileName
QString m_fileName
Current cube file name.
Definition: SunShadowTool.h:139
QDialog
Isis::SunShadowTool::StartLineIndex
@ StartLineIndex
Start cube line table column index.
Definition: SunShadowTool.h:91
Isis::SunShadowTool::IncidenceAngleDegreesIndex
@ IncidenceAngleDegreesIndex
Incidence angle in degrees table column index.
Definition: SunShadowTool.h:105
Isis::SunShadowTool::ShadowLengthKmIndex
@ ShadowLengthKmIndex
Shadow length in kilometers table column index.
Definition: SunShadowTool.h:97
Isis::SunShadowTool::m_tracking
bool m_tracking
True if currently tracking the user's mouse position and calculating values on every mouse move.
Definition: SunShadowTool.h:149
Isis::SunShadowTool::StartLatIndex
@ StartLatIndex
Start lat table column index.
Definition: SunShadowTool.h:81
QAction
Isis::SunShadowTool::StartSampIndex
@ StartSampIndex
Start cube sample table column index.
Definition: SunShadowTool.h:89
Isis::SunShadowTool::IncidenceAngleRadiansIndex
@ IncidenceAngleRadiansIndex
Incidence angle in radians table column index.
Definition: SunShadowTool.h:107
Isis::SunShadowTool::m_enabled
bool m_enabled
True if this tool is enabled (capable of working). Requires a camera.
Definition: SunShadowTool.h:144
Isis::SunShadowTool::FileNameIndex
@ FileNameIndex
Cube file name table column index.
Definition: SunShadowTool.h:111
Isis::SurfacePoint
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:132
Isis::SunShadowTool::m_startSurfacePoint
SurfacePoint * m_startSurfacePoint
Start ground coordinate of the measurement.
Definition: SunShadowTool.h:119
Isis::SunShadowTool::m_endSurfacePoint
SurfacePoint * m_endSurfacePoint
End ground coordinate of the measurement.
Definition: SunShadowTool.h:126
Isis::SunShadowTool::ShadowHeightKmIndex
@ ShadowHeightKmIndex
Shadow height in kilometers table column index.
Definition: SunShadowTool.h:101
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::SunShadowTool::m_startLine
double m_startLine
Start line of the measurement.
Definition: SunShadowTool.h:117
Isis::SunShadowTool::updateRow
void updateRow(int row)
This method updates the row in the table window with the current measure information.
Definition: SunShadowTool.cpp:318