#include <qwt_curve.h>
Inheritance diagram for QwtCurve::
Public Types | |
enum | CurveStyle { NoCurve, Lines, Sticks, Steps, Dots, Spline, UserCurve = 100 } |
enum | CurveOption { Auto = 0, Yfx = 1, Xfy = 2, Parametric = 4, Periodic = 8, Inverted = 16 } |
Public Methods | |
QwtCurve (const QString &title=QString::null) | |
QwtCurve (const QwtCurve &c) | |
virtual | ~QwtCurve () |
virtual const QwtCurve & | operator= (const QwtCurve &c) |
void | setRawData (double *x, double *y, int size) |
void | setData (double *x, double *y, int size) |
int | dataSize () const |
double | x (int i) const |
double | y (int i) const |
virtual double | minXValue () const |
virtual double | maxXValue () const |
virtual double | minYValue () const |
virtual double | maxYValue () const |
void | setOptions (int t) |
int | options () const |
void | setTitle (const QString &title) |
const QString & | title () const |
void | setPen (const QPen &p) |
const QPen & | pen () const |
void | setBaseline (double ref) |
double | baseline () const |
void | setStyle (int style, int options=0) |
int | style () const |
void | setSymbol (const QwtSymbol &s) |
const QwtSymbol & | symbol () const |
void | setSplineSize (int s) |
int | splineSize () const |
virtual void | draw (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap, int from=0, int to=-1) |
Static Public Methods | |
void | drawPoint (QPainter *, int x, int y) |
void | drawLine (QPainter *, int x1, int y1, int x2, int y2) |
void | drawPolyline (QPainter *, const QPointArray &) |
Protected Methods | |
void | init (const QString &title) |
void | copy (const QwtCurve &c) |
virtual void | drawCurve (QPainter *p, int style, const QwtDiMap &xMap, const QwtDiMap &yMap, int from, int to) |
virtual void | drawSymbols (QPainter *p, QwtSymbol &, const QwtDiMap &xMap, const QwtDiMap &yMap, int from, int to) |
void | drawLines (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap, int from, int to) |
void | drawSticks (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap, int from, int to) |
void | drawDots (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap, int from, int to) |
void | drawSteps (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap, int from, int to) |
void | drawSpline (QPainter *p, const QwtDiMap &xMap, const QwtDiMap &yMap) |
virtual void | curveChanged () |
int | verifyRange (int &i1, int &i2) |
Protected Attributes | |
bool | d_raw |
QArray< double > | d_x |
QArray< double > | d_y |
QwtSpline | d_spx |
QwtSpline | d_spy |
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.
|
Curve options.
|
|
Curve styles.
|
|
Ctor.
|
|
Copy Constructor.
|
|
Dtor.
|
|
Return the value of the baseline.
|
|
Copy the contents of a curve into another curve.
|
|
Notify a change of attributes. This virtual function is called when an attribute of the curve has changed. It can be redefined by derived classes. The default implementation does nothing.
Reimplemented in QwtPlotCurve. |
|
Return the size of the data arrays.
|
|
Draw an intervall of the curve.
|
|
Draw the line part (without symbols) of a curve interval.
|
|
Draw dots.
|
|
Wrapper for painter->drawLine(x1, y1, x2, y2). On X11 the cutting points with [-16384 .. 16384] will be calculated. Everything outside will be skipped to avoid overruns.
|
|
Draw lines.
|
|
Wrapper for painter->drawPoint(x, y). On X11 points outside [-16384 .. 16384] will be skipped to avoid overruns.
|
|
Wrapper for painter->drawPolyline(x1, y1, x2, y2). On X11 the cutting points with [-16384 .. 16384] will be calculated. Everything outside will be skipped to avoid overruns.
|
|
Draw a spline.
|
|
Draw step function.
|
|
Draw sticks.
|
|
Draw symbols.
|
|
Initialize data members.
|
|
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 from specified arrays.
|
|
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.
|
|
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.
|
|
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.
|
|
Return the current symbol.
|
|
Return the title.
|
|
Checks if a range of indices is valid and corrects it if necessary.
|
|
|
|
|