|
Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef ScatterPlotWindow_h 00002 #define ScatterPlotWindow_h 00003 00004 // Only Parents of classes defined in this file should be included in this file! 00005 #include "PlotWindow.h" 00006 00007 #include <qwt_double_range.h> 00008 00009 #include <QList> 00010 #include <QScopedPointer> 00011 00012 class QwtPlotSpectrogram; 00013 class QwtPlotMarker; 00014 00015 namespace Isis { 00016 class Cube; 00017 class ScatterPlotTool; 00018 00026 class ScatterPlotWindow : public PlotWindow { 00027 Q_OBJECT 00028 00029 public: 00034 enum AlarmRangeUnits { 00036 CubeUnits, 00038 ScreenUnits 00039 }; 00040 00041 ScatterPlotWindow(QString title, 00042 Cube *xAxisCube, int xAxisBand, int xAxisBinCount, 00043 Cube *yAxisCube, int yAxisBand, int yAxisBinCount, 00044 QwtInterval sampleRange, QwtInterval lineRange, 00045 QWidget *parent); 00046 virtual ~ScatterPlotWindow(); 00047 00048 bool alarmingPlot() const; 00049 bool alarmingViewport() const; 00050 QPair<int, int> alarmPlotBoxSize() const; 00051 AlarmRangeUnits alarmViewportUnits() const; 00052 QPair<int, int> alarmViewportScreenBoxSize() const; 00053 QPair<double, double> alarmViewportDnBoxSize() const; 00054 00055 bool eventFilter(QObject *o, QEvent *e); 00056 00057 virtual void paint(MdiCubeViewport *vp, QPainter *painter); 00058 00059 void setMousePosition(MdiCubeViewport *vp, QPoint mouseLoc); 00060 00061 void setAlarmingPlot(bool); 00062 void setAlarmingViewport(bool); 00063 void setAlarmPlotBoxSize(int, int); 00064 void setAlarmViewportUnits(AlarmRangeUnits); 00065 void setAlarmViewportScreenBoxSize(int, int); 00066 void setAlarmViewportDnBoxSize(double, double); 00067 00068 public slots: 00069 void forgetCubes(); 00070 00071 protected slots: 00072 void colorPlot(); 00073 void showHideContour(); 00074 00075 private: 00076 bool isXCube(MdiCubeViewport *vp) const; 00077 bool isYCube(MdiCubeViewport *vp) const; 00078 00079 void mouseMoveEvent(QMouseEvent *e); 00080 void mouseLeaveEvent(QMouseEvent *e); 00081 void updateContourPen(); 00082 00083 private slots: 00084 void configureAlarming(); 00085 00086 private: 00088 QwtPlotSpectrogram *m_spectrogram; 00089 00091 QPointer<QAction> m_colorize; 00093 QPointer<QAction> m_contour; 00094 00096 Cube *m_xAxisCube; 00098 Cube *m_yAxisCube; 00100 QPair<double, double> m_xCubeDnAlarmRange; 00102 QPair<double, double> m_yCubeDnAlarmRange; 00104 int m_xAxisCubeBand; 00106 int m_yAxisCubeBand; 00108 QwtInterval m_sampleRange; 00110 QwtInterval m_lineRange; 00111 00113 bool m_alarmPlot; 00115 bool m_alarmViewport; 00116 00118 int m_alarmPlotSamples; 00120 int m_alarmPlotLines; 00121 00123 AlarmRangeUnits m_alarmViewportUnits; 00125 int m_alarmViewportScreenWidth; 00127 int m_alarmViewportScreenHeight; 00129 double m_alarmViewportXDnBoxSize; 00131 double m_alarmViewportYDnBoxSize; 00132 }; 00133 } 00134 00135 #endif 00136