Isis 3 Programmer Reference
FindTool.h
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();
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::FindTool::handleOkClicked
void handleOkClicked()
Actions to take when the dialog's ok button is clicked.
Definition: FindTool.cpp:372
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
QMenu
Isis::FindTool::distancePerPixel
Distance distancePerPixel(MdiCubeViewport *viewport, double lat, double lon)
This computes the distance covered by a pixel at the given lat/lon in the given viewport.
Definition: FindTool.cpp:620
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
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::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::FindTool::handleRecordClicked
void handleRecordClicked()
Slot called when the record button is clicked.
Definition: FindTool.cpp:415
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
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
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::handleLinkClicked
void handleLinkClicked()
Links all cubes that have camera models or are map projections.
Definition: FindTool.cpp:540
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::FindTool::centerLinkedViewports
void centerLinkedViewports()
centers all linked viewports
Definition: FindTool.cpp:555
QDialog
Isis::GroundTab::GroundTab
GroundTab(QWidget *parent=0)
The ground tab used by the dialog in the FindTool.
Definition: FindTool.cpp:130
Isis::FindTool::refresh
void refresh()
does a repaint for active viewport and also for any linked viewports
Definition: FindTool.cpp:672
Isis::FindTool::addTo
void addTo(QMenu *menu)
Adds the find tool to the menu.
Definition: FindTool.cpp:198
Isis::FindTool::togglePointVisible
void togglePointVisible()
toggles visibility of the red circle
Definition: FindTool.cpp:521
QAction
Isis::FindTool::paintViewport
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method paints the viewport.
Definition: FindTool.cpp:489
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16