Isis 3 Programmer Reference
FindTool.h
Go to the documentation of this file.
1 #ifndef FindTool_h
2 #define FindTool_h
3 
25 // The only includes allowed in this file are parents of classes defined here.
26 #include <QWidget>
27 #include "Tool.h"
28 
29 class QAction;
30 class QCheckBox;
31 class QLineEdit;
32 class QTabWidget;
33 class QToolButton;
34 
35 namespace Isis {
36  class Distance;
37  class MdiCubeViewport;
38 
44  class GroundTab : public QWidget {
45  Q_OBJECT
46 
47  public:
48  GroundTab(QWidget *parent = 0);
49 
50  QLineEdit *p_lonLineEdit;
51  QLineEdit *p_latLineEdit;
52  };
53 
59  class ImageTab : public QWidget {
60  Q_OBJECT
61 
62  public:
63  ImageTab(QWidget *parent = 0);
64 
65  QLineEdit *p_sampLineEdit;
66  QLineEdit *p_lineLineEdit;
67  };
68 
69 
128  class FindTool : public Tool {
129  Q_OBJECT
130 
131  public:
132  FindTool(QWidget *parent);
133  ~FindTool();
134  void addTo(QMenu *menu);
135  void paintViewport(MdiCubeViewport *vp, QPainter *painter);
136 
143  QString menuName() const {
144  return "&Options";
145  }
146 
147  signals:
148  void recordPoint(QPoint p);
149 
150  protected:
151  QAction *toolPadAction(ToolPad *toolpad);
152  QWidget *createToolBarWidget(QStackedWidget *parent);
153  void updateTool();
154  void createDialog(QWidget *parent);
155 
156  protected slots:
157  void mouseButtonRelease(QPoint p, Qt::MouseButton s);
158 
159  private slots:
160  void handleOkClicked();
161  void handleLinkClicked();
162  void handleRecordClicked();
163  void togglePointVisible();
164 
165  private: // methods
166  void centerLinkedViewports();
168  double lat, double lon);
169  void refresh();
170 
171  private:
172  QDialog *p_dialog;
173  QAction *p_findPoint;
174  QToolButton *p_showDialogButton;
175  QToolButton *p_linkViewportsButton;
176  QToolButton *p_togglePointVisibleButton;
177  QCheckBox *p_syncScale;
178  QLineEdit *p_statusEdit;
179  QTabWidget *p_tabWidget;
180  GroundTab *p_groundTab;
181  ImageTab *p_imageTab;
182 
183 
184  private:
185  double p_line;
186  double p_samp;
187 
188  double p_lat;
189  double p_lon;
190 
191  bool p_pointVisible;
192  };
193 
194 
195 
196 };
197 
198 #endif
Cube display widget for certain Isis MDI applications.
FindTool(QWidget *parent)
Constructs a FindTool object.
Definition: FindTool.cpp:38
ImageTab(QWidget *parent=0)
The image tab used by the dialog in the FindTool.
Definition: FindTool.cpp:155
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
QString menuName() const
This method returns the menu name associated with this tool.
Definition: FindTool.h:143
void centerLinkedViewports()
centers all linked viewports
Definition: FindTool.cpp:555
void handleOkClicked()
Actions to take when the dialog&#39;s ok button is clicked.
Definition: FindTool.cpp:372
QLineEdit * p_lineLineEdit
Input for line.
Definition: FindTool.h:66
void recordPoint(QPoint p)
Emitted when point should be recorded.
QLineEdit * p_sampLineEdit
Input for sample.
Definition: FindTool.h:65
QLineEdit * p_latLineEdit
Input for latitude.
Definition: FindTool.h:51
Distance measurement, usually in meters.
Definition: Distance.h:47
QAction * toolPadAction(ToolPad *toolpad)
Adds the find tool to the toolpad.
Definition: FindTool.cpp:180
void refresh()
does a repaint for active viewport and also for any linked viewports
Definition: FindTool.cpp:672
GroundTab(QWidget *parent=0)
The ground tab used by the dialog in the FindTool.
Definition: FindTool.cpp:130
void handleLinkClicked()
Links all cubes that have camera models or are map projections.
Definition: FindTool.cpp:540
QLineEdit * p_lonLineEdit
Input for longitude.
Definition: FindTool.h:50
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
Handles mouse clickes in the CubeViewport.
Definition: FindTool.cpp:448
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
void addTo(QMenu *menu)
Adds the find tool to the menu.
Definition: FindTool.cpp:198
void togglePointVisible()
toggles visibility of the red circle
Definition: FindTool.cpp:521
Tool to locate a point on a cube that is projected and/or has a camera model.
Definition: FindTool.h:128
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Base class for the Qisis tools.
Definition: Tool.h:81
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the tool bar for the find tool.
Definition: FindTool.cpp:210
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method paints the viewport.
Definition: FindTool.cpp:489
void createDialog(QWidget *parent)
Creates the dialog used by this tool.
Definition: FindTool.cpp:89
void handleRecordClicked()
Slot called when the record button is clicked.
Definition: FindTool.cpp:415