Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
qwt_plot_intervalcurve.h
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
17template< typename T > class QwtSeriesData;
18
27class QWT_EXPORT QwtPlotIntervalCurve
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
95 TubeAsLines = 0x10
96 };
97
98 Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
99
100 explicit QwtPlotIntervalCurve( const QString& title = QString() );
101 explicit QwtPlotIntervalCurve( const QwtText& title );
102
103 virtual ~QwtPlotIntervalCurve();
104
105 virtual int rtti() const QWT_OVERRIDE;
106
107 void setPaintAttribute( PaintAttribute, bool on = true );
108 bool testPaintAttribute( PaintAttribute ) const;
109
110 void setSamples( const QVector< QwtIntervalSample >& );
111 void setSamples( QwtSeriesData< QwtIntervalSample >* );
112
113 void setPen( const QColor&,
114 qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
115
116 void setPen( const QPen& );
117 const QPen& pen() const;
118
119 void setBrush( const QBrush& );
120 const QBrush& brush() const;
121
122 void setStyle( CurveStyle style );
123 CurveStyle style() const;
124
125 void setSymbol( const QwtIntervalSymbol* );
126 const QwtIntervalSymbol* symbol() const;
127
128 virtual void drawSeries( QPainter*,
129 const QwtScaleMap& xMap, const QwtScaleMap& yMap,
130 const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
131
132 virtual QRectF boundingRect() const QWT_OVERRIDE;
133
134 virtual QwtGraphic legendIcon(
135 int index, const QSizeF& ) const QWT_OVERRIDE;
136
137 protected:
138
139 void init();
140
141 virtual void drawTube( QPainter*,
142 const QwtScaleMap& xMap, const QwtScaleMap& yMap,
143 const QRectF& canvasRect, int from, int to ) const;
144
145 virtual void drawSymbols( QPainter*, const QwtIntervalSymbol&,
146 const QwtScaleMap& xMap, const QwtScaleMap& yMap,
147 const QRectF& canvasRect, int from, int to ) const;
148
149 private:
150 class PrivateData;
151 PrivateData* m_data;
152};
153
154Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotIntervalCurve::PaintAttributes )
155
156#endif
A paint device for scalable graphics.
Definition qwt_graphic.h:76
A sample of the types (x1-x2, y) or (x, y1-y2)
Definition qwt_samples.h:21
A drawing primitive for displaying an interval like an error bar.
QwtPlotIntervalCurve represents a series of samples, where each value is associated with an interval ...
QFlags< PaintAttribute > PaintAttributes
CurveStyle
Curve styles. The default setting is QwtPlotIntervalCurve::Tube.
virtual int rtti() const
Base class for plot items representing a series of samples.
A scale map.
Abstract interface for iterating over samples.
Class storing a QwtSeriesData object.
A class representing a text.
Definition qwt_text.h:52