#include <qwt_curve.h>
Inherited by QwtPlotCurve.
Inheritance diagram for QwtCurve
Public Types | |
enum | { Auto = 0, Yfx = 1, Xfy = 2, Parametric = 4, Periodic = 8, Inverted = 16 } |
enum | CurveStyle { NoCurve, Lines, Sticks, Steps, Dots, Spline } |
Public Methods | |
QwtCurve (const char *title = 0) | |
QwtCurve (const QwtCurve &c) | |
virtual | ~QwtCurve () |
const QwtCurve& | operator= (const QwtCurve &c) |
void | draw (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap) |
void | draw (QPainter *p, const QRect &r) |
void | draw (QPainter *p) |
void | drawIntv (QPainter *p, int i1, int i2) |
void | setData (double *x, double *y, int size) |
void | setData (double *x, double *y, double *e, int size) |
void | setMap (const QRect &r, double x1, double x2, bool xlog, double y1, double y2, bool ylog) |
void | setMap (const QwtDiMap &mx, const QwtDiMap& my) |
void | setOptions (int t) |
void | setPen (const QPen &p) |
void | setRange (double x1, double x2, bool xlog, double y1, double y2, bool ylog) |
void | setRawData (double *x, double *y, int size) |
void | setRawData (double *x, double *y, double *e, int size) |
void | setRect (const QRect &r) |
void | setBaseline (double ref) |
void | setStyle (CurveStyle cs, int options = 0) |
void | setSymbol (const QwtSymbol &s) |
void | setSplineSize (int s) |
void | setTitle (const char *title) |
double | baseline () const |
int | dataSize () const |
double | minXValue () const |
double | maxXValue () const |
double | minYValue () const |
double | maxYValue () const |
int | options () const |
const QPen& | pen () const |
int | splineSize () const |
CurveStyle | style () const |
const QwtSymbol& | symbol () const |
const QString& | title () const |
double | x (int i) const |
double | y (int i) const |
double | e (int i) const |
Protected Methods | |
virtual void | curveChanged () |
int | verifyRange (int &i1, int &i2) |
Protected Attributes | |
QPen | d_pen |
QString | d_title |
QPointArray | d_pa |
QArray<double> | d_x |
QArray<double> | d_y |
QArray<double> | d_e |
int | d_options |
int | d_splineSize |
This class can be used to display data as a curve in the x-y plane. It supports different display styles, spline interpolation and symbols.
|
Ctor.
|
|
Copy Constructor.
|
|
Dtor.
|
|
Return the value of the baseline.
|
|
Return the size of the data arrays.
|
|
Draw the curve.
|
|
Assign a bounding rectangle and draw the curve.
|
|
Assign maps and draw the curve.
|
|
Draw a specified part of the curve.
|
|
find the largest x value.
|
|
find the largest y value.
|
|
find the smallest x value.
|
|
find the smallest y value.
|
|
Copy Assignment.
|
|
Return the current style options.
|
|
Return the pen used to draw the lines.
|
|
Set the value of the baseline.
The baseline is needed for the QwtCurve::Sticks drawing style. The default value is 0.0. The interpretation of the baseline depends on the style options. With QwtCurve::Yfx, the baseline is interpreted as a horizontal line at y = baseline(), with QwtCurve::Yfy, it is interpreted as a vertical line at x = baseline().
|
|
Copy x-y data and error data from specified arrays.
|
|
Copy x-y data from specified arrays.
|
|
Assign the maps for the x and y axes.
|
|
Specify x and y ranges.
|
|
Specify options for the drawing style.
The options can be used to modify the drawing style. Options can be or-combined. The following options are defined:
|
|
Assign a pen.
|
|
Changes the data range of the map.
|
|
Attach arrays of x, y, and error data.
|
|
Attach raw data.
setRawData is provided for efficiency. In contrast to setData, it does not copy the data, so it is important to keep the pointers valid while they are attached. The QwtCurve destructor does not delete the attached data, so you can safely call setRawData and setData several times subsequently.
|
|
Changes the drawing region of the map.
|
|
Change the number of interpolated points.
|
|
Set the curve's drawing style.
Valid styles are:
|
|
Assign a symbol.
|
|
Assign a title to a curve.
|
|
Return the spline size.
|
|
Return the current style.
|
|
Checks if a range of indices is valid and corrects it if necessary.
|