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
16class QAction;
17class QCheckBox;
18class QLineEdit;
19class QTabWidget;
20class QToolButton;
21
22namespace 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
Distance measurement, usually in meters.
Definition Distance.h:34
Tool to locate a point on a cube that is projected and/or has a camera model.
Definition FindTool.h:115
void recordPoint(QPoint p)
Emitted when point should be recorded.
void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method paints the viewport.
Definition FindTool.cpp:501
void addTo(QMenu *menu)
Adds the find tool to the menu.
Definition FindTool.cpp:198
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
void createDialog(QWidget *parent)
Creates the dialog used by this tool.
Definition FindTool.cpp:89
~FindTool()
Definition FindTool.cpp:78
QString menuName() const
This method returns the menu name associated with this tool.
Definition FindTool.h:130
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
Handles mouse clickes in the CubeViewport.
Definition FindTool.cpp:448
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the tool bar for the find tool.
Definition FindTool.cpp:210
FindTool(QWidget *parent)
Constructs a FindTool object.
Definition FindTool.cpp:38
QAction * toolPadAction(ToolPad *toolpad)
Adds the find tool to the toolpad.
Definition FindTool.cpp:180
Definition FindTool.h:31
QLineEdit * p_lonLineEdit
Input for longitude.
Definition FindTool.h:37
GroundTab(QWidget *parent=0)
The ground tab used by the dialog in the FindTool.
Definition FindTool.cpp:130
QLineEdit * p_latLineEdit
Input for latitude.
Definition FindTool.h:38
Definition FindTool.h:46
QLineEdit * p_sampLineEdit
Input for sample.
Definition FindTool.h:52
QLineEdit * p_lineLineEdit
Input for line.
Definition FindTool.h:53
ImageTab(QWidget *parent=0)
The image tab used by the dialog in the FindTool.
Definition FindTool.cpp:155
Cube display widget for certain Isis MDI applications.
Definition MdiCubeViewport.h:39
Base class for the Qisis tools.
Definition Tool.h:67
Definition ToolPad.h:14
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16