Isis Developer Reference
PlotCurve.h
Go to the documentation of this file.
1#ifndef PlotCurve_h
2#define PlotCurve_h
3
26#include <qwt_plot.h>
27#include <qwt_plot_curve.h>
28#include <qwt_plot_marker.h>
29#include <qwt_symbol.h>
30#include <qwt_plot_marker.h>
31
32namespace Isis {
44 class PlotCurve : public QwtPlotCurve {
45
46 public:
94
95 PlotCurve(Units xUnits, Units yUnits);
96 ~PlotCurve();
97
98 void attachMarkers();
99
100 QColor color() const;
101 QwtSymbol *markerSymbol() const;
102 Units xUnits() const;
103 Units yUnits() const;
104
105 void setColor(const QColor &color);
106 void setData(QwtSeriesData<QPointF> *data);
107 void setPen(const QPen &pen);
108 void setMarkerSymbol(QwtSymbol::Style style);
109 void setMarkerVisible(bool visible);
110
111 protected:
112 QByteArray fromByteArray(const QByteArray &classData);
113 QByteArray toByteArray() const;
114
115 private:
116 PlotCurve(const PlotCurve &other);
117 PlotCurve &operator=(const PlotCurve &other);
118
119 void clearMarkers();
120 void recreateMarkers();
121
122 private:
123 QColor m_color;
124 QwtSymbol *m_markerSymbol;
125 QList<QwtPlotMarker *> m_valuePointMarkers;
126 Units m_xUnits;
127 Units m_yUnits;
128 };
129};
130#endif
Definition PlotCurve.h:44
void setColor(const QColor &color)
Set the color of this curve and it's markers.
Definition PlotCurve.cpp:96
QColor color() const
This method returns the color of the curve.
Definition PlotCurve.cpp:55
~PlotCurve()
Definition PlotCurve.cpp:31
void setData(QwtSeriesData< QPointF > *data)
This method sets the data for the curve, then sets the value for the markers associated with the curv...
Definition PlotCurve.cpp:108
QByteArray fromByteArray(const QByteArray &classData)
Construct the plot curve given the past results of toByteArray(...).
Definition PlotCurve.cpp:144
Units yUnits() const
Get the units of the y-axis double data.
Definition PlotCurve.cpp:85
void setMarkerSymbol(QwtSymbol::Style style)
This method sets the shape of the markers.
Definition PlotCurve.cpp:119
PlotCurve(Units xUnits, Units yUnits)
Constructs and instance of a PlotCurve with some default properties.
Definition PlotCurve.cpp:21
Units xUnits() const
Get the units of the x-axis double data.
Definition PlotCurve.cpp:75
void attachMarkers()
After attaching this curve to a plot, due to an inheritance/implementation complication with qwt the ...
Definition PlotCurve.cpp:45
Units
These are all the possible units for the x or y data in a plot curve.
Definition PlotCurve.h:54
@ Elevation
The data is an elevation (in meters).
Definition PlotCurve.h:71
@ Band
The data is a band number.
Definition PlotCurve.h:63
@ CubeDN
The data is a Cube DN value.
Definition PlotCurve.h:67
@ Wavelength
The data is a wavelength.
Definition PlotCurve.h:92
@ Unknown
The data units are not yet known.
Definition PlotCurve.h:59
@ Kilometers
The data is in kilometers.
Definition PlotCurve.h:87
@ PixelNumber
The data is a pixel #.
Definition PlotCurve.h:79
@ Meters
The data is in meters.
Definition PlotCurve.h:83
@ Percentage
The data is a percentage (0-100).
Definition PlotCurve.h:75
void setPen(const QPen &pen)
Sets the plot pen to the passed-in pen.
Definition PlotCurve.cpp:338
QwtSymbol * markerSymbol() const
This method returns the shape of the markers.
Definition PlotCurve.cpp:65
QByteArray toByteArray() const
Definition PlotCurve.cpp:260
void setMarkerVisible(bool visible)
This method sets the visibility states of the markers at each value point.
Definition PlotCurve.cpp:130
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16