qwt_plot_intervalcurve.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PLOT_INTERVAL_CURVE_H
11 #define QWT_PLOT_INTERVAL_CURVE_H
12 
13 #include "qwt_global.h"
14 #include "qwt_plot_seriesitem.h"
15 
16 class QwtIntervalSymbol;
17 template< typename T > class QwtSeriesData;
18 
28  : public QwtPlotSeriesItem
29  , public QwtSeriesStore< QwtIntervalSample >
30 {
31  public:
39  {
44 
51 
57  UserCurve = 100
58  };
59 
65  {
71  ClipPolygons = 0x01,
72 
74  ClipSymbol = 0x02
75  };
76 
77  Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
78 
79  explicit QwtPlotIntervalCurve( const QString& title = QString() );
80  explicit QwtPlotIntervalCurve( const QwtText& title );
81 
82  virtual ~QwtPlotIntervalCurve();
83 
84  virtual int rtti() const QWT_OVERRIDE;
85 
86  void setPaintAttribute( PaintAttribute, bool on = true );
87  bool testPaintAttribute( PaintAttribute ) const;
88 
89  void setSamples( const QVector< QwtIntervalSample >& );
90  void setSamples( QwtSeriesData< QwtIntervalSample >* );
91 
92  void setPen( const QColor&,
93  qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
94 
95  void setPen( const QPen& );
96  const QPen& pen() const;
97 
98  void setBrush( const QBrush& );
99  const QBrush& brush() const;
100 
101  void setStyle( CurveStyle style );
102  CurveStyle style() const;
103 
104  void setSymbol( const QwtIntervalSymbol* );
105  const QwtIntervalSymbol* symbol() const;
106 
107  virtual void drawSeries( QPainter*,
108  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
109  const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
110 
111  virtual QRectF boundingRect() const QWT_OVERRIDE;
112 
113  virtual QwtGraphic legendIcon(
114  int index, const QSizeF& ) const QWT_OVERRIDE;
115 
116  protected:
117 
118  void init();
119 
120  virtual void drawTube( QPainter*,
121  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
122  const QRectF& canvasRect, int from, int to ) const;
123 
124  virtual void drawSymbols( QPainter*, const QwtIntervalSymbol&,
125  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
126  const QRectF& canvasRect, int from, int to ) const;
127 
128  private:
129  class PrivateData;
130  PrivateData* m_data;
131 };
132 
133 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotIntervalCurve::PaintAttributes )
134 
135 #endif
QwtPlotIntervalCurve::NoCurve
@ NoCurve
Definition: qwt_plot_intervalcurve.h:43
QwtPlotSeriesItem
Base class for plot items representing a series of samples.
Definition: qwt_plot_seriesitem.h:24
QwtGraphic
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
QVector
Definition: qwt_clipper.h:23
qwt_global.h
QwtText
A class representing a text.
Definition: qwt_text.h:51
QwtPlotIntervalCurve
QwtPlotIntervalCurve represents a series of samples, where each value is associated with an interval ...
Definition: qwt_plot_intervalcurve.h:27
QwtSeriesData
Abstract interface for iterating over samples.
Definition: qwt_plot_barchart.h:18
QwtPlotIntervalCurve::CurveStyle
CurveStyle
Curve styles. The default setting is QwtPlotIntervalCurve::Tube.
Definition: qwt_plot_intervalcurve.h:38
QwtIntervalSample
A sample of the types (x1-x2, y) or (x, y1-y2)
Definition: qwt_samples.h:20
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtPlotIntervalCurve::Tube
@ Tube
Definition: qwt_plot_intervalcurve.h:50
QwtPlotIntervalCurve::PrivateData
Definition: qwt_plot_intervalcurve.cpp:47
qwt_plot_seriesitem.h
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtIntervalSymbol
A drawing primitive for displaying an interval like an error bar.
Definition: qwt_interval_symbol.h:27
QwtSeriesStore
Class storing a QwtSeriesData object.
Definition: qwt_series_store.h:66
QwtPlotIntervalCurve::PaintAttribute
PaintAttribute
Definition: qwt_plot_intervalcurve.h:64
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:136


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46