Isis 3 Programmer Reference
MeasureTool.h
1#ifndef Qisis_MeasureTool_h
2#define Qisis_MeasureTool_h
3
4#include "Tool.h"
5
6// FIXME: remove these includes
7#include <QAction>
8#include "RubberBandComboBox.h"
9#include "TableMainWindow.h"
10#include "IString.h"
11
12
13class QCheckBox;
14class QComboBox;
15class QDialog;
16class QMenu;
17class QLineEdit;
18class QString;
19
20namespace Isis {
21 class MdiCubeViewport;
22
58 class MeasureTool : public Tool {
59 Q_OBJECT
60
61 public:
62 MeasureTool(QWidget *parent);
63 void addTo(QMenu *menu);
64
66 QString menuName() const {
67 return "&Options";
68 }
69
70 protected slots:
71 virtual void rubberBandComplete();
72 virtual void updateMeasure();
73 virtual void mouseLeave();
74
75 protected:
76 QWidget *createToolBarWidget(QStackedWidget *parent);
78 void updateTool();
81
82 private slots:
83
84 void updateUnitsCombo();
85 void updateDistEdit();
86
87 private:
89 QLineEdit *m_distLineEdit;
91 int miComboUnit; // Store the previous unit chosen
92
93 void addRow();
94 void updateDist(MdiCubeViewport *cvp, int row);
95 void setDistances(MdiCubeViewport *cvp, QPoint lineStart, QPoint lineEnd);
96 void updateRow(int row);
97 void updateRows(int row);
98 void initData(void);
99
121
148
150 double m_endSamp;
152 double m_endLine;
154 double m_endLat;
156 double m_endLon;
157 double m_kmDist;
158 double m_mDist;
159 double m_pixDist;
162 double m_kmArea;
163 double m_mArea;
164 double m_pixArea;
166
167
168 QList<double> m_distanceSegments;
169 QList<double> m_pixDistSegments;
170 QList<double> m_startSampSegments;
171 QList<double> m_endSampSegments;
172 QList<double> m_startLineSegments;
173 QList<double> m_endLineSegments;
174 QList<double> m_startLatSegments;
175 QList<double> m_endLatSegments;
176 QList<double> m_startLonSegments;
177 QList<double> m_endLonSegments;
178
179
181 QString m_path;
182 QString m_fname;
183
186 QCheckBox *m_showAllSegments;
187 };
188
189};
190
191#endif
Cube display widget for certain Isis MDI applications.
Tool for measuring distances.
Definition MeasureTool.h:58
double m_kmArea
area in kilometers
TableMainWindow * m_tableWin
table window
double m_startLat
starting latitude
double m_mDist
distance in meters
double m_pixDist
distance in pixels
TableColumnIndex
Enum for storing all the indexes.
@ StartSampIndex
Starting sample index.
@ AreaPixIndex
Area in pixels index.
@ DistanceKmIndex
Distance in kilometers index.
@ DistanceMIndex
Distance in meters index.
@ EndLonIndex
Ending longitude index.
@ FileNameIndex
FileName index.
@ AngleDegIndex
Angle in degrees index.
@ EndSampIndex
Ending sample index.
@ EndLineIndex
Ending line index.
@ AreaMIndex
Area in meters index.
@ AngleRadIndex
Angle in radians index.
@ SegmentsSumIndex
Segment lengths in kilometers.
@ SegmentNumberIndex
Segment number.
@ StartLonIndex
Starting longitude index.
@ EndLatIndex
Ending latitude index.
@ StartLineIndex
Starting line index.
@ StartLatIndex
Starting latitude index.
@ DistancePixIndex
Distance in pixels index.
@ AreaKmIndex
Area in kilometers index.
@ PathIndex
FileName path index.
@ PlanarDistanceIndex
Planar distance in kilometers.
double m_startSamp
starting sample
double m_endSamp
ending sample
TableColumnsMap
Enum for all possible table columns.
@ FileName
FileName.
@ DistancePix
Distance in pixels.
@ Path
FileName path.
@ AngleDeg
Angle in degrees.
@ AngleRad
Angle in radians.
@ AreaM
Area in meters.
@ FeatureType
Feature type.
@ FeatureName
Feature name.
@ Segments
Segment lengths in kilometers.
@ AreaPix
Area in pixels.
@ SampleLine
Sample Line.
@ Notes
User input.
@ DistanceM
Distance in meters.
@ LatitudeLongitude
Latitude Longitude.
@ AreaKm
Area in kilometers.
@ DistanceKm
Distance in kilometers.
QComboBox * m_unitsComboBox
Units selection.
Definition MeasureTool.h:90
double m_startLine
starting line
void updateDist(MdiCubeViewport *cvp, int row)
This method updates the distance variables.
RubberBandComboBox * m_rubberBand
rubberband combo box
void initData(void)
Initialize Class data.
QAction * m_action
Measure tool's action.
Definition MeasureTool.h:88
void updateTool()
Updates the measure tool.
int m_numLinked
number of linked viewports
double m_kmDist
distance in kilometers
double m_pixArea
area in pixels
virtual void rubberBandComplete()
Called when the rubberBanding by the user is finished.
double m_radAngle
angle in radians
virtual void mouseLeave()
Mouse leave event.
double m_mArea
area in meters
double m_endLine
ending line
void updateRows(int row)
This method is called instead of updateRows if the 'Show All Segment' checkbox is checked.
void updateDistEdit()
Change the value in the distance edit to match the units.
void enableRubberBandTool()
Enables/resets the rubberband tool.
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget (button) that goes on the tool bar.
double m_kmPlanarDist
distance estimate used when at least one point is on the body (km)
void updateUnitsCombo()
Updates the units combo box.
MeasureTool(QWidget *parent)
MeasureTool constructor.
void updateRow(int row)
This method updates the row in the table window with the current measure information.
void removeConnections(MdiCubeViewport *cvp)
Removes the connection on the given cube viewport.
double m_startLon
starting longitude
double m_endLat
ending latitude
QString m_fname
filename
QString menuName() const
Returns the menu name.
Definition MeasureTool.h:66
QAction * toolPadAction(ToolPad *pad)
Add the measure tool action to the toolpad.
QLineEdit * m_distLineEdit
Distance line edit.
Definition MeasureTool.h:89
virtual void updateMeasure()
Updates the Measure specifications.
double m_degAngle
angle in degrees
void addTo(QMenu *menu)
Adds the measure action to the given menu.
double m_endLon
ending longitude
QString m_path
filename path
Combo box for choosing a rubber band type.
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