USGS

Isis 3.0 Developer's Reference (API)

Home

FindTool.h

Go to the documentation of this file.
00001 #ifndef FindTool_h
00002 #define FindTool_h
00003 
00025 // The only includes allowed in this file are parents of classes defined here.
00026 #include <QWidget>
00027 #include "Tool.h"
00028 
00029 class QAction;
00030 class QCheckBox;
00031 class QLineEdit;
00032 class QTabWidget;
00033 class QToolButton;
00034 
00035 namespace Isis {
00036   class Distance;
00037   class MdiCubeViewport;
00038 
00044   class GroundTab : public QWidget {
00045       Q_OBJECT
00046 
00047     public:
00048       GroundTab(QWidget *parent = 0);
00049 
00050       QLineEdit *p_lonLineEdit;  
00051       QLineEdit *p_latLineEdit;  
00052   };
00053 
00059   class ImageTab : public QWidget {
00060       Q_OBJECT
00061 
00062     public:
00063       ImageTab(QWidget *parent = 0);
00064 
00065       QLineEdit *p_sampLineEdit;  
00066       QLineEdit *p_lineLineEdit;  
00067   };
00068 
00069 
00119   class FindTool : public Tool {
00120       Q_OBJECT
00121 
00122     public:
00123       FindTool(QWidget *parent);
00124       ~FindTool();
00125       void addTo(QMenu *menu);
00126       void paintViewport(MdiCubeViewport *vp, QPainter *painter);
00127     signals:
00128       void recordPoint(QPoint p); 
00129 
00130     protected:
00131       QAction *toolPadAction(ToolPad *toolpad);
00138       QString menuName() const {
00139         return "&Options";
00140       };
00141       QWidget *createToolBarWidget(QStackedWidget *parent);
00142       void updateTool();
00143       void createDialog(QWidget *parent);
00144 
00145     protected slots:
00146       void mouseButtonRelease(QPoint p, Qt::MouseButton s);
00147 
00148     private slots:
00149       void handleOkClicked();
00150       void handleLinkClicked();
00151       void handleRecordClicked();
00152       void togglePointVisible();
00153 
00154     private: // methods
00155       void centerLinkedViewports();
00156       Distance distancePerPixel(MdiCubeViewport *viewport,
00157                                 double lat, double lon) const;
00158       void refresh();
00159 
00160     private:
00161       QDialog *p_dialog;
00162       QAction *p_findPoint;
00163       QToolButton *p_showDialogButton;
00164       QToolButton *p_linkViewportsButton;
00165       QToolButton *p_togglePointVisibleButton;
00166       QCheckBox *p_syncScale;
00167       QLineEdit *p_statusEdit;
00168       QTabWidget *p_tabWidget;
00169       GroundTab *p_groundTab;
00170       ImageTab *p_imageTab;
00171 
00172 
00173     private:
00174       double p_line;
00175       double p_samp;
00176 
00177       double p_lat;
00178       double p_lon;
00179 
00180       bool p_pointVisible;
00181   };
00182 
00183 
00184 
00185 };
00186 
00187 #endif