Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_intervalcurve.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_intervalcurve.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_intervalcurve.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 13 13 #include "qwt_global.h" 14 14 #include "qwt_plot_seriesitem.h" 15 #include "qwt_series_data.h"16 15 17 16 class QwtIntervalSymbol; 17 template< typename T > class QwtSeriesData; 18 18 19 19 /*! 20 \brief QwtPlotIntervalCurve represents a series of samples, where each value 20 \brief QwtPlotIntervalCurve represents a series of samples, where each value 21 21 is associated with an interval ( \f$[y1,y2] = f(x)\f$ ). 22 22 23 The representation depends on the style() and an optional symbol() 24 that is displayed for each interval. QwtPlotIntervalCurve might be used 25 to display error bars or the area between 2 curves. 26 */ 27 class QWT_EXPORT QwtPlotIntervalCurve: 28 public QwtPlotSeriesItem, public QwtSeriesStore<QwtIntervalSample> 23 The representation depends on the style() and an optional symbol() 24 that is displayed for each interval. QwtPlotIntervalCurve might be used 25 to display error bars or the area between 2 curves. 26 */ 27 class QWT_EXPORT QwtPlotIntervalCurve 28 : public QwtPlotSeriesItem 29 , public QwtSeriesStore< QwtIntervalSample > 29 30 { 30 public: 31 public: 31 32 /*! 32 33 \brief Curve styles. … … 34 35 35 36 \sa setStyle(), style() 36 */ 37 */ 37 38 enum CurveStyle 38 39 { … … 60 61 Attributes to modify the drawing algorithm. 61 62 \sa setPaintAttribute(), testPaintAttribute() 62 */ 63 */ 63 64 enum PaintAttribute 64 65 { 65 66 /*! 66 Clip polygons before painting them. In situations, where points 67 are far outside the visible area (f.e when zooming deep) this 68 might be a substantial improvement for the painting performance. 67 Clip polygons before painting them. In situations, where points 68 are far outside the visible area (f.e when zooming deep) this 69 might be a substantial improvement for the painting performance. 69 70 */ 70 71 ClipPolygons = 0x01, 71 72 72 73 //! Check if a symbol is on the plot canvas before painting it. 73 ClipSymbol = 0x02 74 ClipSymbol = 0x02, 75 76 /*! 77 Fill the tube with horizontal or vertical lines and unite 78 overlapping border lines. This attribute is useful for large 79 data sets, where consecutive samples are often mapped to the same 80 coordinate. 81 82 Beside other minor visual differences the filling is always 83 monochrome - using brush().color(). 84 85 This algorithm is very fast and effective and can be used inside 86 a replot cycle. In the worst case the number of lines to be rendered 87 will be 5 times the ( width/height - depending on the orientation() ) 88 of the plot canvas. 89 90 \note Has only an effect, when drawing to a paint device 91 in integer coordinates ( f.e. all widgets on screen ). 92 93 \sa QwtPlotCurve::FilterPointsAggressive 94 */ 95 TubeAsLines = 0x10 74 96 }; 75 97 76 //! Paint attributes 77 typedef QFlags<PaintAttribute> PaintAttributes; 98 Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute ) 78 99 79 explicit QwtPlotIntervalCurve( const QString &title = QString() );80 explicit QwtPlotIntervalCurve( const QwtText &title );100 explicit QwtPlotIntervalCurve( const QString& title = QString() ); 101 explicit QwtPlotIntervalCurve( const QwtText& title ); 81 102 82 103 virtual ~QwtPlotIntervalCurve(); 83 104 84 virtual int rtti() const; 105 virtual int rtti() const QWT_OVERRIDE; 85 106 86 107 void setPaintAttribute( PaintAttribute, bool on = true ); 87 108 bool testPaintAttribute( PaintAttribute ) const; 88 109 89 void setSamples( const QVector<QwtIntervalSample >& );90 void setSamples( QwtSeriesData<QwtIntervalSample >* );110 void setSamples( const QVector< QwtIntervalSample >& ); 111 void setSamples( QwtSeriesData< QwtIntervalSample >* ); 91 112 92 void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine ); 93 void setPen( const QPen & ); 94 const QPen &pen() const; 113 void setPen( const QColor&, 114 qreal width = 0.0, Qt::PenStyle = Qt::SolidLine ); 95 115 96 void setBrush( const QBrush & ); 97 const QBrush &brush() const; 116 void setPen( const QPen& ); 117 const QPen& pen() const; 118 119 void setBrush( const QBrush& ); 120 const QBrush& brush() const; 98 121 99 122 void setStyle( CurveStyle style ); 100 123 CurveStyle style() const; 101 124 102 void setSymbol( const QwtIntervalSymbol * );103 const QwtIntervalSymbol *symbol() const;125 void setSymbol( const QwtIntervalSymbol* ); 126 const QwtIntervalSymbol* symbol() const; 104 127 105 virtual void drawSeries( QPainter *,106 const QwtScaleMap &xMap, const QwtScaleMap&yMap,107 const QRectF &canvasRect, int from, int to ) const;128 virtual void drawSeries( QPainter*, 129 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 130 const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE; 108 131 109 virtual QRectF boundingRect() const; 132 virtual QRectF boundingRect() const QWT_OVERRIDE; 110 133 111 virtual QwtGraphic legendIcon( int index, const QSizeF & ) const; 134 virtual QwtGraphic legendIcon( 135 int index, const QSizeF& ) const QWT_OVERRIDE; 112 136 113 protected: 137 protected: 114 138 115 139 void init(); 116 140 117 virtual void drawTube( QPainter *,118 const QwtScaleMap &xMap, const QwtScaleMap&yMap,119 const QRectF &canvasRect, int from, int to ) const;141 virtual void drawTube( QPainter*, 142 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 143 const QRectF& canvasRect, int from, int to ) const; 120 144 121 virtual void drawSymbols( QPainter *, const QwtIntervalSymbol&,122 const QwtScaleMap &xMap, const QwtScaleMap&yMap,123 const QRectF &canvasRect, int from, int to ) const;145 virtual void drawSymbols( QPainter*, const QwtIntervalSymbol&, 146 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 147 const QRectF& canvasRect, int from, int to ) const; 124 148 125 private: 149 private: 126 150 class PrivateData; 127 PrivateData *d_data;151 PrivateData* m_data; 128 152 }; 129 153
Note:
See TracChangeset
for help on using the changeset viewer.
