Isis 3 Programmer Reference
AdvancedTrackTool.h
Go to the documentation of this file.
1 #ifndef Qisis_AdvancedTrackTool_h
2 #define Qisis_AdvancedTrackTool_h
3 
25 // The only includes allowed in this file are the direct parents of this class!
26 #include "Tool.h"
27 #include <QList>
28 #include <QString>
29 
30 class QAction;
31 
32 namespace Isis {
33 
34  class TableMainWindow;
35  class MdiCubeViewport;
36 
104  class AdvancedTrackTool : public Tool {
105  Q_OBJECT
106 
107  public:
108  AdvancedTrackTool(QWidget *parent);
109  void addTo(QMenu *menu);
110  void addToPermanent(QToolBar *perm);
111  bool eventFilter(QObject *o, QEvent *e);
112 
113  public slots:
114  virtual void mouseMove(QPoint p);
115  virtual void mouseLeave();
116  void record(QPoint p);
117 
118  protected:
125  QString menuName() const {
126  return "&Options";
127  };
128 
129  private slots:
130  void updateRow(QPoint p);
131  void updateRow(MdiCubeViewport *cvp, QPoint p, int row);
132  void record();
133  void updateID();
134  void TrackMosaicOrigin(MdiCubeViewport *cvp, int piLine, int piSample,
135  int &piOrigin, QString &psSrcFileName,
136  QString &psSrcSerialNum);
137  void helpDialog();
138 
139  private:
140  void readSettings();
141  void writeSettings();
142  QString settingsFilePath() const;
143  int getIndex(QString keyword);
144 
145  // Used to store information about each check box to later add to the table
146  // New entries can be added anywhere in the QList.
147  // Format: QList<QString>({<Header>, <onByDefault>, <menuText>, <toolTip>}) <<
148  // If a toolTip is not needed, use "".
149  QList<QList<QString> > checkBoxItems = QList< QList<QString> >() <<
150  QList<QString>({"Id", "false", "Id", ""}) <<
151  QList<QString>({"Sample:Line", "true", "Sample:Line", ""}) <<
152  QList<QString>({"Band", "false", "Band", ""}) <<
153  QList<QString>({"Pixel", "true", "Pixel", ""}) <<
154  QList<QString>({"Planetocentric Latitude", "true", "Planetocentric Lat", ""}) <<
155  QList<QString>({"Planetographic Latitude", "false", "Planetographic Lat", ""}) <<
156  QList<QString>({"360 Positive East Longitude", "true", "360 East Longitude", ""}) <<
157  QList<QString>({"360 Positive West Longitude", "false", "360 West Longitude", ""}) <<
158  QList<QString>({"180 Positive East Longitude", "true", "180 East Longitude", ""}) <<
159  QList<QString>({"180 Positive West Longitude", "false", "180 West Longitude", ""}) <<
160  QList<QString>({"Projected X:Projected Y", "false", "Projected X:Projected Y",
161  "X and Y values for a projected image"}) <<
162  QList<QString>({"Local Radius", "false", "Radius", ""}) <<
163  QList<QString>({"Point X:Point Y:Point Z", "false", "XYZ",
164  "The X, Y, and Z of surface intersection in body-fixed coordinates"}) <<
165  QList<QString>({"Right Ascension:Declination", "false", "Ra:Dec",
166  "Right Ascension and Declination"}) <<
167  QList<QString>({"Resolution", "false", "Resolution", ""}) <<
168  QList<QString>({"Oblique Pixel Resolution", "false", "Oblique Pixel Res", ""}) <<
169  QList<QString>({"Phase", "false", "Phase", ""}) <<
170  QList<QString>({"Incidence", "false", "Incidence", ""}) <<
171  QList<QString>({"Emission", "false", "Emission", ""}) <<
172  QList<QString>({"LocalIncidence", "false", "LocalIncidence", ""}) <<
173  QList<QString>({"LocalEmission", "false", "LocalEmission", ""}) <<
174  QList<QString>({"North Azimuth", "false", "North Azimuth", ""}) <<
175  QList<QString>({"Sun Azimuth", "false", "Sun Azimuth", ""}) <<
176  QList<QString>({"Solar Longitude", "false", "Solar Longitude", ""}) <<
177  QList<QString>({"Spacecraft X:Spacecraft Y:Spacecraft Z", "false", "Spacecraft Position",
178  "The X, Y, and Z of the spacecraft position"}) <<
179  QList<QString>({"Spacecraft Azimuth", "false", "Spacecraft Azimuth", ""}) <<
180  QList<QString>({"Slant Distance", "false", "Slant Distance", ""}) <<
181  QList<QString>({"Focal Plane X:Focal Plane Y", "false", "Focal Plane X:Y", ""}) <<
182  QList<QString>({"Undistorted Focal X:Undistorted Focal Y:Undistorted Focal Z",
183  "false", "Undistorted Focal Plane X:Y:Z", ""}) <<
184  QList<QString>({"Ephemeris Time", "false", "Ephemeris iTime", ""}) <<
185  QList<QString>({"Local Solar Time", "false", "Local Solar iTime", ""}) <<
186  QList<QString>({"UTC", "false", "UTC", "Internal time in UTC format"}) <<
187  QList<QString>({"Path", "false", "Path", ""}) <<
188  QList<QString>({"FileName", "false", "FileName", ""}) <<
189  QList<QString>({"Serial Number", "false", "Serial Number", ""}) <<
190  QList<QString>({"Track Mosaic Index", "false", "Track Mosaic Index", ""}) <<
191  QList<QString>({"Track Mosaic FileName", "false", "Track Mosaic FileName", ""}) <<
192  QList<QString>({"Track Mosaic Serial Number", "false", "Track Mosaic Serial Number", ""}) <<
193  QList<QString>({"Notes", "false", "Notes", ""});
194 
196  int p_numRows;
197  int p_id;
200  };
201 };
202 
203 #endif
Cube display widget for certain Isis MDI applications.
QString menuName() const
This method returns the menu name associated with this tool.
void updateRow(QPoint p)
This method updates the row with data from the point given.
AdvancedTrackTool(QWidget *parent)
Constructs an AdvancedTrackTool object.
void addTo(QMenu *menu)
This method adds the action to bring up the track tool to the menu.
void record()
This method records data to the current row.
int getIndex(QString keyword)
This method finds the index of the header in checkBoxItems by looping through checkBoxItems, grabbing the header from each QList, and parsing the header at ":" to account for check boxes selecting multiple columns.
int p_id
The record id.
void writeSettings()
Write out this tool&#39;s preserved state between runs.
TableMainWindow * p_tableWin
The table window.
bool m_showHelpOnStart
True to show dialog When tool is started.
QString settingsFilePath() const
Generate the correct path for the config file.
bool eventFilter(QObject *o, QEvent *e)
An event filter that calls methods on certain events.
void helpDialog()
This method creates a dialog box that shows help tips.
QAction * p_action
Action to bring up the track tool.
virtual void mouseMove(QPoint p)
This method is called when the mouse has moved across the viewport and updates the row accordingly...
a subclass of the qisis mainwindow, tablemainwindow handles all of the table tasks.
virtual void mouseLeave()
This method is called when the mouse leaves the viewport and clears any rows accordingly.
int p_numRows
The number of rows in the table.
void readSettings()
Read this tool&#39;s preserved state.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Base class for the Qisis tools.
Definition: Tool.h:81
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...
void updateID()
This method updates the record ID.
Tool to display info for a point on a cube.
void addToPermanent(QToolBar *perm)
This method adds the action to bring up the track tool to the permanent tool bar. ...