Isis Developer Reference
FindTool.h
Go to the documentation of this file.
1 #ifndef FindTool_h
2 #define FindTool_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 // The only includes allowed in this file are parents of classes defined here.
13 #include <QWidget>
14 #include "Tool.h"
15 
16 class QAction;
17 class QCheckBox;
18 class QLineEdit;
19 class QTabWidget;
20 class QToolButton;
21 
22 namespace Isis {
23  class Distance;
24  class MdiCubeViewport;
25 
31  class GroundTab : public QWidget {
32  Q_OBJECT
33 
34  public:
35  GroundTab(QWidget *parent = 0);
36 
37  QLineEdit *p_lonLineEdit;
38  QLineEdit *p_latLineEdit;
39  };
40 
46  class ImageTab : public QWidget {
47  Q_OBJECT
48 
49  public:
50  ImageTab(QWidget *parent = 0);
51 
52  QLineEdit *p_sampLineEdit;
53  QLineEdit *p_lineLineEdit;
54  };
55 
56 
115  class FindTool : public Tool {
116  Q_OBJECT
117 
118  public:
119  FindTool(QWidget *parent);
120  ~FindTool();
121  void addTo(QMenu *menu);
122  void paintViewport(MdiCubeViewport *vp, QPainter *painter);
123 
130  QString menuName() const {
131  return "&Options";
132  }
133 
134  signals:
135  void recordPoint(QPoint p);
136 
137  protected:
138  QAction *toolPadAction(ToolPad *toolpad);
139  QWidget *createToolBarWidget(QStackedWidget *parent);
140  void updateTool();
141  void createDialog(QWidget *parent);
142 
143  protected slots:
144  void mouseButtonRelease(QPoint p, Qt::MouseButton s);
145 
146  private slots:
147  void handleOkClicked();
148  void handleLinkClicked();
149  void handleRecordClicked();
150  void togglePointVisible();
151 
152  private: // methods
153  void centerLinkedViewports();
154  Distance distancePerPixel(MdiCubeViewport *viewport,
155  double lat, double lon);
156  void refresh();
157 
158  private:
159  QDialog *p_dialog;
160  QAction *p_findPoint;
161  QToolButton *p_showDialogButton;
162  QToolButton *p_linkViewportsButton;
163  QToolButton *p_togglePointVisibleButton;
164  QCheckBox *p_syncScale;
165  QLineEdit *p_statusEdit;
166  QTabWidget *p_tabWidget;
167  GroundTab *p_groundTab;
168  ImageTab *p_imageTab;
169 
170 
171  private:
172  double p_line;
173  double p_samp;
174 
175  double p_lat;
176  double p_lon;
177 
178  bool p_pointVisible;
179  };
180 
181 
182 
183 };
184 
185 #endif
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
MdiCubeViewport.h
Isis::UniversalGroundMap::Sample
double Sample() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:200
Isis::UniversalGroundMap::UniversalLatitude
double UniversalLatitude() const
Returns the universal latitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:247
Isis::Tool::cubeViewportList
CubeViewportList * cubeViewportList() const
Return the list of cubeviewports.
Definition: Tool.cpp:390
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
MainWindow.h
QMenu
Target.h
Isis::Tool::toolIconDir
QString toolIconDir() const
returns the path to the icon directory.
Definition: Tool.h:113
FindTool.h
Longitude.h
Tool.h
Isis::FindTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the tool bar for the find tool.
Definition: FindTool.cpp:210
Isis::FindTool::FindTool
FindTool(QWidget *parent)
Constructs a FindTool object.
Definition: FindTool.cpp:38
ToolPad.h
Isis::FindTool::updateTool
void updateTool()
Overriden method to update this tool - Checks if cube is open and checks if the image has camera and/...
Definition: FindTool.cpp:288
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
Isis::CubeViewport::universalGroundMap
UniversalGroundMap * universalGroundMap() const
Definition: CubeViewport.h:353
Isis::CubeViewport::camera
Camera * camera() const
Definition: CubeViewport.h:348
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::ImageTab::p_sampLineEdit
QLineEdit * p_sampLineEdit
Input for sample.
Definition: FindTool.h:52
Isis::FindTool::mouseButtonRelease
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
Handles mouse clickes in the CubeViewport.
Definition: FindTool.cpp:448
Isis::GroundTab::p_latLineEdit
QLineEdit * p_latLineEdit
Input for latitude.
Definition: FindTool.h:38
Isis::CubeViewport::cubeToViewport
void cubeToViewport(double sample, double line, int &x, int &y) const
Turns a cube into a viewport.
Definition: CubeViewport.cpp:852
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Latitude.h
Isis::FindTool::recordPoint
void recordPoint(QPoint p)
Emitted when point should be recorded.
Isis::GroundTab::p_lonLineEdit
QLineEdit * p_lonLineEdit
Input for longitude.
Definition: FindTool.h:37
SurfacePoint.h
Isis::MdiCubeViewport::isLinked
bool isLinked() const
Is the viewport linked with other viewports.
Definition: MdiCubeViewport.h:50
Workspace.h
Isis::FindTool::createDialog
void createDialog(QWidget *parent)
Creates the dialog used by this tool.
Definition: FindTool.cpp:89
Isis::GroundTab
Definition: FindTool.h:31
Isis::FindTool::menuName
QString menuName() const
This method returns the menu name associated with this tool.
Definition: FindTool.h:130
UniversalGroundMap.h
Camera.h
Isis::ImageTab::ImageTab
ImageTab(QWidget *parent=0)
The image tab used by the dialog in the FindTool.
Definition: FindTool.cpp:155
Isis::ImageTab::p_lineLineEdit
QLineEdit * p_lineLineEdit
Input for line.
Definition: FindTool.h:53
Isis::FindTool
Tool to locate a point on a cube that is projected and/or has a camera model.
Definition: FindTool.h:115
Isis::ToolPad
Definition: ToolPad.h:14
Isis::FindTool::toolPadAction
QAction * toolPadAction(ToolPad *toolpad)
Adds the find tool to the toolpad.
Definition: FindTool.cpp:180
Isis::ImageTab
Definition: FindTool.h:46
Isis::UniversalGroundMap::SetUniversalGround
bool SetUniversalGround(double lat, double lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:102
Projection.h
Isis::UniversalGroundMap::SetImage
bool SetImage(double sample, double line)
Returns whether the sample/line postion was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:233
QDialog
Isis::GroundTab::GroundTab
GroundTab(QWidget *parent=0)
The ground tab used by the dialog in the FindTool.
Definition: FindTool.cpp:130
Isis::CubeViewport::viewportToCube
void viewportToCube(int x, int y, double &sample, double &line) const
Turns a viewport into a cube.
Definition: CubeViewport.cpp:815
Isis::FindTool::addTo
void addTo(QMenu *menu)
Adds the find tool to the menu.
Definition: FindTool.cpp:198
Isis::FindTool::~FindTool
~FindTool()
Definition: FindTool.cpp:78
Distance.h
QAction
Isis::UniversalGroundMap::Line
double Line() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:214
Isis::Tool::cubeViewport
MdiCubeViewport * cubeViewport() const
Return the current cubeviewport.
Definition: Tool.h:197
Isis::FindTool::paintViewport
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method paints the viewport.
Definition: FindTool.cpp:489
Isis::UniversalGroundMap::UniversalLongitude
double UniversalLongitude() const
Returns the universal longitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:270
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CubeViewport::projection
Projection * projection() const
Definition: CubeViewport.h:343