QwtPlotCurve(3) | Qwt User's Guide | QwtPlotCurve(3) |
QwtPlotCurve -
#include <qwt_plot_curve.h>
Inherits QwtPlotItem.
enum CurveAttribute { Inverted = 1, Fitted =
2 }
enum CurveStyle { NoCurve, Lines, Sticks,
Steps, Dots, UserCurve = 100 }
enum CurveType { Yfx, Xfy }
enum PaintAttribute { PaintFiltered = 1, ClipPolygons = 2
}
QwtPlotCurve ()
QwtPlotCurve (const QwtText &title)
QwtPlotCurve (const QString &title)
virtual ~QwtPlotCurve ()
double baseline () const
virtual QwtDoubleRect boundingRect () const
const QBrush & brush () const
int closestPoint (const QPoint &pos, double *dist=NULL) const
QwtCurveFitter * curveFitter () const
CurveType curveType () const
QwtData & data ()
const QwtData & data () const
int dataSize () const
virtual void draw (QPainter *p, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, const QRect &) const
virtual void draw (QPainter *p, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, int from, int to) const
void draw (int from, int to) const
double maxXValue () const
double maxYValue () const
double minXValue () const
double minYValue () const
const QPen & pen () const
virtual int rtti () const
void setBaseline (double ref)
void setBrush (const QBrush &)
void setCurveAttribute (CurveAttribute, bool on=true)
void setCurveFitter (QwtCurveFitter *)
void setCurveType (CurveType)
void setData (const double *xData, const double *yData, int size)
void setData (const QwtArray< double > &xData, const
QwtArray< double > &yData)
void setData (const QPolygonF &data)
void setData (const QwtData &data)
void setPaintAttribute (PaintAttribute, bool on=true)
void setPen (const QPen &)
void setRawData (const double *x, const double *y, int
size)
void setStyle (CurveStyle style)
void setSymbol (const QwtSymbol &s)
CurveStyle style () const
const QwtSymbol & symbol () const
bool testCurveAttribute (CurveAttribute) const
bool testPaintAttribute (PaintAttribute) const
virtual void updateLegend (QwtLegend *) const
double x (int i) const
double y (int i) const
void closePolyline (const QwtScaleMap &, const
QwtScaleMap &, QwtPolygon &) const
virtual void drawCurve (QPainter *p, int style, const
QwtScaleMap &xMap, const QwtScaleMap &yMap, int from,
int to) const
void drawDots (QPainter *p, const QwtScaleMap &xMap, const
QwtScaleMap &yMap, int from, int to) const
void drawLines (QPainter *p, const QwtScaleMap &xMap, const
QwtScaleMap &yMap, int from, int to) const
void drawSteps (QPainter *p, const QwtScaleMap &xMap, const
QwtScaleMap &yMap, int from, int to) const
void drawSticks (QPainter *p, const QwtScaleMap &xMap, const
QwtScaleMap &yMap, int from, int to) const
virtual void drawSymbols (QPainter *p, const QwtSymbol &,
const QwtScaleMap &xMap, const QwtScaleMap &yMap, int
from, int to) const
void fillCurve (QPainter *, const QwtScaleMap &, const
QwtScaleMap &, QwtPolygon &) const
void init ()
A plot item, that represents a series of points.
A curve is the representation of a series of points in the x-y plane. It supports different display styles, interpolation ( f.e. spline ) and symbols.
Usage
Example:
See also:
Attribute for drawing the curve
See also:
Curve styles.
See also:
Curve type.
The baseline is used for aligning the sticks, or filling the curve with a brush.
See also:
Attributes to modify the drawing algorithm.
The default is, that no paint attributes are enabled.
See also:
Constructor
Parameters:
Constructor
Parameters:
Return the value of the baseline
See also:
Returns the bounding rectangle of the curve data. If there is no bounding rect, like for empty data the rectangle is invalid.
See also:
Reimplemented from QwtPlotItem.
Return the brush used to fill the area between lines and the baseline. See also:
Complete a polygon to be a closed polygon including the area between the original polygon and the baseline. Parameters:
Find the closest curve point for a specific position
Parameters:
Returns:
Note:
Get the curve fitter. If curve fitting is disabled NULL is returned.
Returns:
Return the curve type
See also:
Returns:
Returns:
Return the size of the data arrays
See also:
Draw the complete curve. Parameters:
See also:
Implements QwtPlotItem.
Draw an interval of the curve. Parameters:
See also:
Draw a set of points of a curve. When observing an measurement while it is running, new points have to be added to an existing curve. drawCurve can be used to display them avoiding a complete redraw of the canvas.
Setting plot()->canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true); will result in faster painting, if the paint engine of the canvas widget supports this feature.
Parameters:
See also:
Draw the line part (without symbols) of a curve interval. Parameters:
See also:
Draw dots
Parameters:
See also:
Draw lines. If the CurveAttribute Fitted is enabled a QwtCurveFitter tries to interpolate/smooth the curve, before it is painted.
Parameters:
See also:
Draw step function
The direction of the steps depends on Inverted attribute.
Parameters:
See also:
Draw sticks
Parameters:
See also:
Draw symbols. Parameters:
See also:
Fill the area between the curve and the baseline with the curve brush
Parameters:
See also:
Return the pen used to draw the lines. See also:
Returns:
Reimplemented from QwtPlotItem.
Set the value of the baseline. The baseline is needed for filling the curve with a brush or the Sticks drawing style. The default value is 0.0. The interpretation of the baseline depends on the CurveType. With QwtPlotCurve::Yfx, the baseline is interpreted as a horizontal line at y = baseline(), with QwtPlotCurve::Yfy, it is interpreted as a vertical line at x = baseline().
Parameters:
See also:
Assign a brush. In case of brush.style() != QBrush::NoBrush and style() != QwtPlotCurve::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).
Parameters:
See also:
Specify an attribute for drawing the curve
Parameters:
/sa CurveAttribute, testCurveAttribute(), setCurveFitter()
Assign a curve fitter setCurveFitter(NULL) disables curve fitting.
Parameters:
Assign the curve type
Parameters:
See also:
Set data by copying x- and y-values from specified memory blocks. Contrary to setCurveRawData(), this function makes a 'deep copy' of the data.
Parameters:
Note:
Initialize data with x- and y-arrays (explicitly shared) ( Builds an QwtArrayData object internally )
Parameters:
Note:
Initialize data with an array of points (explicitly shared).
Parameters:
Note:
Initialize data with a pointer to QwtData.
Parameters:
See also:
Specify an attribute how to draw the curve
Parameters:
Assign a pen
The width of non cosmetic pens is scaled according to the resolution of the paint device.
Parameters:
See also:
Initialize the data by pointing to memory blocks which are not managed by QwtPlotCurve. setRawData is provided for efficiency. It is important to keep the pointers during the lifetime of the underlying QwtCPointerData class.
Parameters:
Note:
Set the curve's drawing style
Parameters:
See also:
Assign a symbol. Parameters:
See also:
Return the current style
See also:
Return the current symbol. See also:
Returns:
See also:
Return the current paint attributes. See also:
Parameters:
Returns:
Parameters:
Returns:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Tue Nov 20 2012 | Version 5.2.3 |