#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 &) |
const QPen & | pen () const |
void | setBrush (const QBrush &) |
const QBrush & | brush () 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) |
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) |
void | closePolyline (const QwtDiMap &, const QwtDiMap &, QPointArray &) const |
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.
|
|
Return the brush used to fill the area between lines and the baseline.
|
|
Complete a polygon to be a closed polygon including the area between the original polygon and 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.
|
|
Draw lines.
|
|
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 filling the curve with a brush or 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().
|
|
Assign a brush. In case of brush.style() != QBrush::NoBrush and style() != QwtCurve::Sticks the area between the curve and the baseline will be filled. In case !brush.color().isValid() the area will be filled by pen.color(). The fill algorithm simply connects the first and the last curve point to the baseline. So the curve data has to be sorted (ascending or descending).
|
|
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.
|
|
|
|
|