Isis 3 Programmer Reference
AdvancedTrackTool.h
1 #ifndef Qisis_AdvancedTrackTool_h
2 #define Qisis_AdvancedTrackTool_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 // The only includes allowed in this file are the direct parents of this class!
13 #include "Tool.h"
14 #include <QList>
15 #include <QString>
16 
17 class QAction;
18 
19 namespace Isis {
20 
21  class TableMainWindow;
22  class MdiCubeViewport;
23 
91  class AdvancedTrackTool : public Tool {
92  Q_OBJECT
93 
94  public:
95  AdvancedTrackTool(QWidget *parent);
96  void addTo(QMenu *menu);
97  void addToPermanent(QToolBar *perm);
98  bool eventFilter(QObject *o, QEvent *e);
99 
100  public slots:
101  virtual void mouseMove(QPoint p);
102  virtual void mouseLeave();
103  void record(QPoint p);
104 
105  protected:
112  QString menuName() const {
113  return "&Options";
114  };
115 
116  private slots:
117  void updateRow(QPoint p);
118  void updateRow(MdiCubeViewport *cvp, QPoint p, int row);
119  void record();
120  void updateID();
121  void TrackMosaicOrigin(MdiCubeViewport *cvp, int piLine, int piSample,
122  int &piOrigin, QString &psSrcFileName,
123  QString &psSrcSerialNum);
124  void helpDialog();
125 
126  private:
127  void readSettings();
128  void writeSettings();
129  QString settingsFilePath() const;
130  int getIndex(QString keyword);
131 
132  // Used to store information about each check box to later add to the table
133  // New entries can be added anywhere in the QList.
134  // Format: QList<QString>({<Header>, <onByDefault>, <menuText>, <toolTip>}) <<
135  // If a toolTip is not needed, use "".
136  QList<QList<QString> > checkBoxItems = QList< QList<QString> >() <<
137  QList<QString>({"Id", "false", "Id", ""}) <<
138  QList<QString>({"Sample:Line", "true", "Sample:Line", ""}) <<
139  QList<QString>({"Band", "false", "Band", ""}) <<
140  QList<QString>({"Pixel", "true", "Pixel", ""}) <<
141  QList<QString>({"Planetocentric Latitude", "true", "Planetocentric Lat", ""}) <<
142  QList<QString>({"Planetographic Latitude", "false", "Planetographic Lat", ""}) <<
143  QList<QString>({"360 Positive East Longitude", "true", "360 East Longitude", ""}) <<
144  QList<QString>({"360 Positive West Longitude", "false", "360 West Longitude", ""}) <<
145  QList<QString>({"180 Positive East Longitude", "true", "180 East Longitude", ""}) <<
146  QList<QString>({"180 Positive West Longitude", "false", "180 West Longitude", ""}) <<
147  QList<QString>({"Projected X:Projected Y", "false", "Projected X:Projected Y",
148  "X and Y values for a projected image"}) <<
149  QList<QString>({"Local Radius", "false", "Radius", ""}) <<
150  QList<QString>({"Point X:Point Y:Point Z", "false", "XYZ",
151  "The X, Y, and Z of surface intersection in body-fixed coordinates"}) <<
152  QList<QString>({"Right Ascension:Declination", "false", "Ra:Dec",
153  "Right Ascension and Declination"}) <<
154  QList<QString>({"Resolution", "false", "Resolution", ""}) <<
155  QList<QString>({"Oblique Pixel Resolution", "false", "Oblique Pixel Res", ""}) <<
156  QList<QString>({"Phase", "false", "Phase", ""}) <<
157  QList<QString>({"Incidence", "false", "Incidence", ""}) <<
158  QList<QString>({"Emission", "false", "Emission", ""}) <<
159  QList<QString>({"LocalIncidence", "false", "LocalIncidence", ""}) <<
160  QList<QString>({"LocalEmission", "false", "LocalEmission", ""}) <<
161  QList<QString>({"North Azimuth", "false", "North Azimuth", ""}) <<
162  QList<QString>({"Sun Azimuth", "false", "Sun Azimuth", ""}) <<
163  QList<QString>({"Solar Longitude", "false", "Solar Longitude", ""}) <<
164  QList<QString>({"Spacecraft X:Spacecraft Y:Spacecraft Z", "false", "Spacecraft Position",
165  "The X, Y, and Z of the spacecraft position"}) <<
166  QList<QString>({"Spacecraft Azimuth", "false", "Spacecraft Azimuth", ""}) <<
167  QList<QString>({"Slant Distance", "false", "Slant Distance", ""}) <<
168  QList<QString>({"Focal Plane X:Focal Plane Y", "false", "Focal Plane X:Y", ""}) <<
169  QList<QString>({"Undistorted Focal X:Undistorted Focal Y:Undistorted Focal Z",
170  "false", "Undistorted Focal Plane X:Y:Z", ""}) <<
171  QList<QString>({"Ephemeris Time", "false", "Ephemeris iTime", ""}) <<
172  QList<QString>({"Local Solar Time", "false", "Local Solar iTime", ""}) <<
173  QList<QString>({"UTC", "false", "UTC", "Internal time in UTC format"}) <<
174  QList<QString>({"Path", "false", "Path", ""}) <<
175  QList<QString>({"FileName", "false", "FileName", ""}) <<
176  QList<QString>({"Serial Number", "false", "Serial Number", ""}) <<
177  QList<QString>({"Track Mosaic Index", "false", "Track Mosaic Index", ""}) <<
178  QList<QString>({"Track Mosaic FileName", "false", "Track Mosaic FileName", ""}) <<
179  QList<QString>({"Track Mosaic Serial Number", "false", "Track Mosaic Serial Number", ""}) <<
180  QList<QString>({"Notes", "false", "Notes", ""});
181 
183  int p_numRows;
184  int p_id;
187  };
188 };
189 
190 #endif
Isis::AdvancedTrackTool::p_tableWin
TableMainWindow * p_tableWin
The table window.
Definition: AdvancedTrackTool.h:185
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::AdvancedTrackTool::mouseMove
virtual void mouseMove(QPoint p)
This method is called when the mouse has moved across the viewport and updates the row accordingly.
Definition: AdvancedTrackTool.cpp:185
Isis::AdvancedTrackTool::p_id
int p_id
The record id.
Definition: AdvancedTrackTool.h:184
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
QMenu
Isis::AdvancedTrackTool::updateID
void updateID()
This method updates the record ID.
Definition: AdvancedTrackTool.cpp:832
Isis::AdvancedTrackTool::m_showHelpOnStart
bool m_showHelpOnStart
True to show dialog When tool is started.
Definition: AdvancedTrackTool.h:186
Isis::AdvancedTrackTool::settingsFilePath
QString settingsFilePath() const
Generate the correct path for the config file.
Definition: AdvancedTrackTool.cpp:871
Isis::AdvancedTrackTool::p_numRows
int p_numRows
The number of rows in the table.
Definition: AdvancedTrackTool.h:183
Isis::AdvancedTrackTool::addToPermanent
void addToPermanent(QToolBar *perm)
This method adds the action to bring up the track tool to the permanent tool bar.
Definition: AdvancedTrackTool.cpp:175
QToolBar
Isis::AdvancedTrackTool::writeSettings
void writeSettings()
Write out this tool's preserved state between runs.
Definition: AdvancedTrackTool.cpp:858
Isis::AdvancedTrackTool::readSettings
void readSettings()
Read this tool's preserved state.
Definition: AdvancedTrackTool.cpp:846
Isis::AdvancedTrackTool::addTo
void addTo(QMenu *menu)
This method adds the action to bring up the track tool to the menu.
Definition: AdvancedTrackTool.cpp:165
Isis::AdvancedTrackTool::AdvancedTrackTool
AdvancedTrackTool(QWidget *parent)
Constructs an AdvancedTrackTool object.
Definition: AdvancedTrackTool.cpp:53
Isis::TableMainWindow
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
Definition: TableMainWindow.h:57
Isis::AdvancedTrackTool::mouseLeave
virtual void mouseLeave()
This method is called when the mouse leaves the viewport and clears any rows accordingly.
Definition: AdvancedTrackTool.cpp:194
Isis::AdvancedTrackTool::p_action
QAction * p_action
Action to bring up the track tool.
Definition: AdvancedTrackTool.h:182
Isis::AdvancedTrackTool::updateRow
void updateRow(QPoint p)
This method updates the row with data from the point given.
Definition: AdvancedTrackTool.cpp:212
Isis::AdvancedTrackTool::TrackMosaicOrigin
void TrackMosaicOrigin(MdiCubeViewport *cvp, int piLine, int piSample, int &piOrigin, QString &psSrcFileName, QString &psSrcSerialNum)
TrackMosaicOrigin - Given the pointer to Cube and line and sample index, finds the origin of the mosa...
Definition: AdvancedTrackTool.cpp:626
Isis::AdvancedTrackTool
Tool to display info for a point on a cube.
Definition: AdvancedTrackTool.h:91
QObject
QAction
Isis::AdvancedTrackTool::getIndex
int getIndex(QString keyword)
This method finds the index of the header in checkBoxItems by looping through checkBoxItems,...
Definition: AdvancedTrackTool.cpp:244
Isis::AdvancedTrackTool::helpDialog
void helpDialog()
This method creates a dialog box that shows help tips.
Definition: AdvancedTrackTool.cpp:724
Isis::AdvancedTrackTool::menuName
QString menuName() const
This method returns the menu name associated with this tool.
Definition: AdvancedTrackTool.h:112
Isis::AdvancedTrackTool::eventFilter
bool eventFilter(QObject *o, QEvent *e)
An event filter that calls methods on certain events.
Definition: AdvancedTrackTool.cpp:144
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::AdvancedTrackTool::record
void record()
This method records data to the current row.
Definition: AdvancedTrackTool.cpp:776