Isis 3 Programmer Reference
|
#include <PlotCurve.h>
Public Types | |
enum | Units { Unknown, Band, CubeDN, Elevation, Percentage, PixelNumber, Meters, Kilometers, Wavelength } |
These are all the possible units for the x or y data in a plot curve. More... | |
Public Member Functions | |
PlotCurve (Units xUnits, Units yUnits) | |
Constructs and instance of a PlotCurve with some default properties. More... | |
void | attachMarkers () |
After attaching this curve to a plot, due to an inheritance/implementation complication with qwt the markers will remain detached until they are recreated. More... | |
QColor | color () const |
This method returns the color of the curve. More... | |
QwtSymbol * | markerSymbol () const |
This method returns the shape of the markers. More... | |
Units | xUnits () const |
Get the units of the x-axis double data. More... | |
Units | yUnits () const |
Get the units of the y-axis double data. More... | |
void | setColor (const QColor &color) |
Set the color of this curve and it's markers. More... | |
void | setData (QwtSeriesData< QPointF > *data) |
This method sets the data for the curve, then sets the value for the markers associated with the curve. More... | |
void | setPen (const QPen &pen) |
Sets the plot pen to the passed-in pen. More... | |
void | setMarkerSymbol (QwtSymbol::Style style) |
This method sets the shape of the markers. More... | |
void | setMarkerVisible (bool visible) |
This method sets the visibility states of the markers at each value point. More... | |
Protected Member Functions | |
QByteArray | fromByteArray (const QByteArray &classData) |
Construct the plot curve given the past results of toByteArray(...). More... | |
QByteArray | toByteArray () const |
Private Member Functions | |
PlotCurve (const PlotCurve &other) | |
PlotCurve & | operator= (const PlotCurve &other) |
void | clearMarkers () |
void | recreateMarkers () |
Private Attributes | |
QColor | m_color |
QwtSymbol * | m_markerSymbol |
Marker's styles. More... | |
QList< QwtPlotMarker * > | m_valuePointMarkers |
Units | m_xUnits |
Units | m_yUnits |
Definition at line 44 of file PlotCurve.h.
These are all the possible units for the x or y data in a plot curve.
We want these in order to have type checking when moving curves around - it's theoretically possible to even utilize the right y axis automatically when you put mismatched plot curve y data into the same plot. All of this and more requires knowing your data's units.
Enumerator | |
---|---|
Unknown | The data units are not yet known. Please avoid using this if at all possible. |
Band | The data is a band number. |
CubeDN | The data is a Cube DN value. |
Elevation | The data is an elevation (in meters). |
Percentage | The data is a percentage (0-100). |
PixelNumber | The data is a pixel #. For example, it's the nth pixel along a line. |
Meters | The data is in meters. For example, it's the nth meter along a line. |
Kilometers | The data is in kilometers. For example, it's the nth kilometer along a line. |
Wavelength | The data is a wavelength. This is usually associated with a band and comes from the band bin group. |
Definition at line 54 of file PlotCurve.h.
Constructs and instance of a PlotCurve with some default properties.
Definition at line 22 of file PlotCurve.cpp.
References m_markerSymbol, xUnits(), and yUnits().
void Isis::PlotCurve::attachMarkers | ( | ) |
After attaching this curve to a plot, due to an inheritance/implementation complication with qwt the markers will remain detached until they are recreated.
This forces the markers to be updated immediately.
Please always call this method after attaching this curve to a plot.
Definition at line 46 of file PlotCurve.cpp.
Referenced by Isis::PlotWindow::add().
QColor Isis::PlotCurve::color | ( | ) | const |
This method returns the color of the curve.
Definition at line 56 of file PlotCurve.cpp.
Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine(), Isis::CubePlotCurve::paint(), Isis::PlotWindow::plotCurves(), and setColor().
|
protected |
Construct the plot curve given the past results of toByteArray(...).
This is used for copy/paste and drag/drop.
Definition at line 145 of file PlotCurve.cpp.
References m_markerSymbol, Isis::IException::Programmer, setColor(), setData(), and setPen().
Referenced by Isis::CubePlotCurve::CubePlotCurve().
QwtSymbol * Isis::PlotCurve::markerSymbol | ( | ) | const |
This method returns the shape of the markers.
Definition at line 66 of file PlotCurve.cpp.
References m_markerSymbol.
void Isis::PlotCurve::setColor | ( | const QColor & | color | ) |
Set the color of this curve and it's markers.
This color will override the pen's color always.
color | The color of this curve. |
Definition at line 97 of file PlotCurve.cpp.
References color(), and setPen().
Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine(), Isis::AbstractPlotTool::createCurve(), fromByteArray(), and Isis::CubePlotCurve::mousePressEvent().
void Isis::PlotCurve::setData | ( | QwtSeriesData< QPointF > * | data | ) |
This method sets the data for the curve, then sets the value for the markers associated with the curve.
data |
Definition at line 109 of file PlotCurve.cpp.
Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine(), and fromByteArray().
void Isis::PlotCurve::setMarkerSymbol | ( | QwtSymbol::Style | style | ) |
This method sets the shape of the markers.
style |
Definition at line 120 of file PlotCurve.cpp.
References m_markerSymbol.
Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine().
void Isis::PlotCurve::setMarkerVisible | ( | bool | visible | ) |
This method sets the visibility states of the markers at each value point.
visible | True to show markers, false to hide |
Definition at line 131 of file PlotCurve.cpp.
Referenced by Isis::PlotWindow::updateVisibility().
void Isis::PlotCurve::setPen | ( | const QPen & | pen | ) |
Sets the plot pen to the passed-in pen.
pen |
Definition at line 340 of file PlotCurve.cpp.
Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine(), Isis::AbstractPlotTool::createCurve(), fromByteArray(), and setColor().
PlotCurve::Units Isis::PlotCurve::xUnits | ( | ) | const |
Get the units of the x-axis double data.
Definition at line 76 of file PlotCurve.cpp.
Referenced by Isis::PlotWindow::canAdd(), Isis::PlotWindowBestFitDialog::createBestFitLine(), and PlotCurve().
PlotCurve::Units Isis::PlotCurve::yUnits | ( | ) | const |
Get the units of the y-axis double data.
Definition at line 86 of file PlotCurve.cpp.
Referenced by Isis::PlotWindow::canAdd(), Isis::PlotWindowBestFitDialog::createBestFitLine(), and PlotCurve().
|
private |
Marker's styles.
Definition at line 124 of file PlotCurve.h.
Referenced by fromByteArray(), markerSymbol(), PlotCurve(), and setMarkerSymbol().