Isis Developer Reference
SunShadowTool.h
Go to the documentation of this file.
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:
60 void updateShadowHeightEdit();
61 void reinitialize();
62
63 private:
64 void addRow();
65 void recalculateShadowHeight();
66 void updateRow(int row);
67
68 private:
70 QLineEdit *m_shadowHeightLineEdit;
72 QComboBox *m_unitsComboBox;
74 QCheckBox *m_drawInSunDirection;
75
79 enum TableColumnIndex {
81 StartLatIndex = 2,
83 StartLonIndex,
85 EndLatIndex,
87 EndLonIndex,
89 StartSampIndex,
91 StartLineIndex,
93 EndSampIndex,
95 EndLineIndex,
97 ShadowLengthKmIndex,
99 ShadowLengthMIndex,
101 ShadowHeightKmIndex,
103 ShadowHeightMIndex,
105 IncidenceAngleDegreesIndex,
107 IncidenceAngleRadiansIndex,
109 PathIndex,
111 FileNameIndex
112 };
113
115 double m_startSamp;
117 double m_startLine;
119 SurfacePoint *m_startSurfacePoint;
120
122 double m_endSamp;
124 double m_endLine;
126 SurfacePoint *m_endSurfacePoint;
127
129 Angle *m_incidenceAngle;
130
132 Distance *m_shadowHeight;
134 Distance *m_shadowLength;
135
137 QString m_path;
139 QString m_fileName;
140
142 TableMainWindow *m_tableWin;
144 bool m_enabled;
149 bool m_tracking;
151 Angle *m_trackingAngle;
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.
Definition MdiCubeViewport.h:39
Tool for measuring shadow heights.
Definition SunShadowTool.h:39
QAction * toolPadAction(ToolPad *pad)
Create an action for activating this tool.
Definition SunShadowTool.cpp:91
void updateTool()
This enables/disables this tool's functionality based on the active viewport's compatibility.
Definition SunShadowTool.cpp:586
virtual void mouseButtonPress(QPoint p, Qt::MouseButton s)
When the mouse left button is pressed we start tracking.
Definition SunShadowTool.cpp:268
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget (button) that goes on the tool bar.
Definition SunShadowTool.cpp:117
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
Paint anything we need to on the viewport.
Definition SunShadowTool.cpp:184
SunShadowTool(QWidget *parent)
Construct a sun shadow tool.
Definition SunShadowTool.cpp:34
virtual void mouseButtonRelease(QPoint p, Qt::MouseButton s)
When the mouse left button is released we finish tracking.
Definition SunShadowTool.cpp:300
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:211
void addTo(QMenu *menu)
Adds the measure action to the given menu.
Definition SunShadowTool.cpp:173
This class defines a body-fixed surface point.
Definition SurfacePoint.h:132
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
Definition TableMainWindow.h:57
Base class for the Qisis tools.
Definition Tool.h:67
Definition ToolPad.h:14
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16