Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef PlotCurve_h 00002 #define PlotCurve_h 00003 00004 00028 #include <qwt_plot.h> 00029 #include <qwt_plot_curve.h> 00030 #include <qwt_plot_marker.h> 00031 #include <qwt_symbol.h> 00032 #include <qwt_plot_marker.h> 00033 00034 namespace Isis { 00040 class PlotCurve : public QwtPlotCurve { 00041 00042 public: 00043 enum Units { 00044 Unknown, 00045 Band, 00046 CubeDN, 00047 Elevation, 00048 Percentage, 00049 PixelNumber, 00050 Wavelength 00051 }; 00052 00053 PlotCurve(Units xUnits, Units yUnits); 00054 ~PlotCurve(); 00055 00056 void attachMarkers(); 00057 00058 QColor color() const; 00059 QwtSymbol markerSymbol() const; 00060 Units xUnits() const; 00061 Units yUnits() const; 00062 00063 void setColor(const QColor &color); 00064 void setData(const QwtData &data); 00065 void setData(const double *xData, const double *yData, int size); 00066 void setPen(const QPen &pen); 00067 void setMarkerSymbol(QwtSymbol symbol); 00068 void setMarkerVisible(bool visible); 00069 00070 protected: 00071 QByteArray fromByteArray(const QByteArray &classData); 00072 QByteArray toByteArray() const; 00073 00074 private: 00075 PlotCurve(const PlotCurve &other); 00076 PlotCurve &operator=(const PlotCurve &other); 00077 00078 void clearMarkers(); 00079 void recreateMarkers(); 00080 00081 private: 00082 QColor m_color; 00083 QwtSymbol m_markerSymbol; 00084 QList<QwtPlotMarker *> m_valuePointMarkers; 00085 Units m_xUnits; 00086 Units m_yUnits; 00087 }; 00088 }; 00089 #endif