Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_histogram.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_histogram.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_histogram.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_column_symbol.h"16 #include <qcolor.h>17 #include <qvector.h>18 15 19 class QwtIntervalData; 20 class QString; 16 class QwtColumnSymbol; 17 class QwtColumnRect; 18 class QColor; 21 19 class QPolygonF; 22 20 21 #if QT_VERSION < 0x060000 22 template< typename T > class QVector; 23 #endif 24 23 25 /*! 24 \brief QwtPlotHistogram represents a series of samples, where an interval 26 \brief QwtPlotHistogram represents a series of samples, where an interval 25 27 is associated with a value ( \f$y = f([x1,x2])\f$ ). 26 28 27 The representation depends on the style() and an optional symbol() 28 that is displayed for each interval. 29 The representation depends on the style() and an optional symbol() 30 that is displayed for each interval. 29 31 30 \note The term "histogram" is used in a different way in the areas of 32 \note The term "histogram" is used in a different way in the areas of 31 33 digital image processing and statistics. Wikipedia introduces the 32 34 terms "image histogram" and "color histogram" to avoid confusions. … … 34 36 is no applicable plot item for a "color histogram" yet. 35 37 36 \sa QwtPlotBarChart, QwtPlotMultiBarChart 37 */ 38 \sa QwtPlotBarChart, QwtPlotMultiBarChart 39 */ 38 40 39 class QWT_EXPORT QwtPlotHistogram: 40 public QwtPlotSeriesItem, public QwtSeriesStore<QwtIntervalSample> 41 class QWT_EXPORT QwtPlotHistogram 42 : public QwtPlotSeriesItem 43 , public QwtSeriesStore< QwtIntervalSample > 41 44 { 42 public: 45 public: 43 46 /*! 44 47 Histogram styles. … … 46 49 47 50 \sa setStyle(), style(), setSymbol(), symbol(), setBaseline() 48 */ 51 */ 49 52 enum HistogramStyle 50 53 { … … 77 80 }; 78 81 79 explicit QwtPlotHistogram( const QString &title = QString() );80 explicit QwtPlotHistogram( const QwtText &title );82 explicit QwtPlotHistogram( const QString& title = QString() ); 83 explicit QwtPlotHistogram( const QwtText& title ); 81 84 virtual ~QwtPlotHistogram(); 82 85 83 virtual int rtti() const; 86 virtual int rtti() const QWT_OVERRIDE; 84 87 85 void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine ); 86 void setPen( const QPen & ); 87 const QPen &pen() const; 88 void setPen( const QColor&, 89 qreal width = 0.0, Qt::PenStyle = Qt::SolidLine ); 88 90 89 void set Brush( const QBrush& );90 const Q Brush &brush() const;91 void setPen( const QPen& ); 92 const QPen& pen() const; 91 93 92 void setSamples( const QVector<QwtIntervalSample> & ); 93 void setSamples( QwtSeriesData<QwtIntervalSample> * ); 94 void setBrush( const QBrush& ); 95 const QBrush& brush() const; 96 97 void setSamples( const QVector< QwtIntervalSample >& ); 98 void setSamples( QwtSeriesData< QwtIntervalSample >* ); 94 99 95 100 void setBaseline( double ); … … 99 104 HistogramStyle style() const; 100 105 101 void setSymbol( const QwtColumnSymbol * );102 const QwtColumnSymbol *symbol() const;106 void setSymbol( const QwtColumnSymbol* ); 107 const QwtColumnSymbol* symbol() const; 103 108 104 virtual void drawSeries( QPainter *,105 const QwtScaleMap &xMap, const QwtScaleMap&yMap,106 const QRectF &canvasRect, int from, int to ) const;109 virtual void drawSeries( QPainter*, 110 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 111 const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE; 107 112 108 virtual QRectF boundingRect() const; 113 virtual QRectF boundingRect() const QWT_OVERRIDE; 109 114 110 virtual QwtGraphic legendIcon( int index, const QSizeF & ) const; 115 virtual QwtGraphic legendIcon( 116 int index, const QSizeF& ) const QWT_OVERRIDE; 111 117 112 protected: 113 virtual QwtColumnRect columnRect( const QwtIntervalSample &,114 const QwtScaleMap &, const QwtScaleMap& ) const;118 protected: 119 virtual QwtColumnRect columnRect( const QwtIntervalSample&, 120 const QwtScaleMap&, const QwtScaleMap& ) const; 115 121 116 virtual void drawColumn( QPainter *, const QwtColumnRect&,117 const QwtIntervalSample & ) const;122 virtual void drawColumn( QPainter*, const QwtColumnRect&, 123 const QwtIntervalSample& ) const; 118 124 119 void drawColumns( QPainter *,120 const QwtScaleMap &xMap, const QwtScaleMap&yMap,125 void drawColumns( QPainter*, 126 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 121 127 int from, int to ) const; 122 128 123 void drawOutline( QPainter *,124 const QwtScaleMap &xMap, const QwtScaleMap&yMap,129 void drawOutline( QPainter*, 130 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 125 131 int from, int to ) const; 126 132 127 void drawLines( QPainter *,128 const QwtScaleMap&xMap, const QwtScaleMap&yMap,129 int from, int to ) const;133 void drawLines( QPainter*, 134 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 135 int from, int to ) const; 130 136 131 private: 137 private: 132 138 void init(); 133 void flushPolygon( QPainter *, double baseLine, QPolygonF& ) const;139 void flushPolygon( QPainter*, double baseLine, QPolygonF& ) const; 134 140 135 141 class PrivateData; 136 PrivateData *d_data;142 PrivateData* m_data; 137 143 }; 138 144
Note:
See TracChangeset
for help on using the changeset viewer.
