10 #ifndef QWT_PLOT_CURVE_H
11 #define QWT_PLOT_CURVE_H
135 Q_DECLARE_FLAGS( CurveAttributes, CurveAttribute )
150 LegendNoAttribute = 0x00,
156 LegendShowLine = 0x01,
161 LegendShowSymbol = 0x02,
167 LegendShowBrush = 0x04
170 Q_DECLARE_FLAGS( LegendAttributes, LegendAttribute )
200 MinimizeMemory = 0x04,
233 FilterPointsAggressive = 0x10,
236 Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
238 explicit QwtPlotCurve(
const QString& title = QString() );
245 void setPaintAttribute( PaintAttribute,
bool on = true );
246 bool testPaintAttribute( PaintAttribute ) const;
248 void setLegendAttribute( LegendAttribute,
bool on = true );
249 bool testLegendAttribute( LegendAttribute ) const;
251 void setLegendAttributes( LegendAttributes );
252 LegendAttributes legendAttributes() const;
254 void setRawSamples( const
double* xData, const
double* yData,
int size );
255 void setRawSamples( const
float* xData, const
float* yData,
int size );
257 void setRawSamples( const
double* yData,
int size );
258 void setRawSamples( const
float* yData,
int size );
260 void setSamples( const
double* xData, const
double* yData,
int size );
261 void setSamples( const
float* xData, const
float* yData,
int size );
263 void setSamples( const
double* yData,
int size );
264 void setSamples( const
float* yData,
int size );
266 void setSamples( const
QVector<
double >& yData );
267 void setSamples( const
QVector<
float >& yData );
269 void setSamples( const
QVector<
double >& xData, const
QVector<
double >& yData );
270 void setSamples( const
QVector<
float >& xData, const
QVector<
float >& yData );
272 void setSamples( const
QVector< QPointF >& );
275 virtual
int closestPoint( const QPointF& pos,
double* dist = NULL ) const;
276 virtual
int adjacentPoint( Qt::Orientation orientation, qreal value ) const;
278 qreal interpolatedValueAt( Qt::Orientation,
double ) const;
280 double minXValue() const;
281 double maxXValue() const;
282 double minYValue() const;
283 double maxYValue() const;
285 void setCurveAttribute( CurveAttribute,
bool on = true );
286 bool testCurveAttribute( CurveAttribute ) const;
288 void setPen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
289 void setPen( const QPen& );
290 const QPen& pen() const;
292 void setBrush( const QBrush& );
293 const QBrush& brush() const;
295 void setBaseline(
double );
296 double baseline() const;
298 void setStyle( CurveStyle style );
299 CurveStyle style() const;
307 virtual
void drawSeries( QPainter*,
309 const QRectF& canvasRect,
int from,
int to ) const
QWT_OVERRIDE;
317 virtual
void drawCurve( QPainter*,
int style,
319 const QRectF& canvasRect,
int from,
int to ) const;
321 virtual
void drawSymbols( QPainter*, const
QwtSymbol&,
323 const QRectF& canvasRect,
int from,
int to ) const;
325 virtual
void drawLines( QPainter*,
327 const QRectF& canvasRect,
int from,
int to ) const;
329 virtual
void drawSticks( QPainter*,
331 const QRectF& canvasRect,
int from,
int to ) const;
333 virtual
void drawDots( QPainter*,
335 const QRectF& canvasRect,
int from,
int to ) const;
337 virtual
void drawSteps( QPainter*,
339 const QRectF& canvasRect,
int from,
int to ) const;
341 virtual
void fillCurve( QPainter*,
343 const QRectF& canvasRect, QPolygonF& ) const;
345 void closePolyline( QPainter*,
377 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotCurve::PaintAttributes )
378 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotCurve::LegendAttributes )
379 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotCurve::CurveAttributes )