Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_multi_barchart.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_plot_multi_barchart.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_multi_barchart.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_abstract_barchart.h" 15 #include "qwt_series_data.h"16 15 17 16 class QwtColumnRect; 18 17 class QwtColumnSymbol; 18 template< typename T > class QwtSeriesData; 19 19 20 20 /*! 21 \brief QwtPlotMultiBarChart displays a series of a samples that consist 21 \brief QwtPlotMultiBarChart displays a series of a samples that consist 22 22 each of a set of values. 23 23 24 Each value is displayed as a bar, the bars of each set can be organized 25 side by side or accumulated. 24 Each value is displayed as a bar, the bars of each set can be organized 25 side by side or accumulated. 26 26 27 Each bar of a set is rendered by a QwtColumnSymbol, that is set by setSymbol(). 28 The bars of different sets use the same symbols. Exceptions are possible 29 by overloading specialSymbol() or overloading drawBar(). 27 Each bar of a set is rendered by a QwtColumnSymbol, that is set by setSymbol(). 28 The bars of different sets use the same symbols. Exceptions are possible 29 by overloading specialSymbol() or overloading drawBar(). 30 30 31 Depending on its orientation() the bars are displayed horizontally 32 or vertically. The bars cover the interval between the baseline() 33 and the value. 31 Depending on its orientation() the bars are displayed horizontally 32 or vertically. The bars cover the interval between the baseline() 33 and the value. 34 34 35 In opposite to most other plot items, QwtPlotMultiBarChart returns more 36 than one entry for the legend - one for each symbol. 35 In opposite to most other plot items, QwtPlotMultiBarChart returns more 36 than one entry for the legend - one for each symbol. 37 37 38 \sa QwtPlotBarChart, QwtPlotHistogram 38 \sa QwtPlotBarChart, QwtPlotHistogram 39 39 QwtPlotSeriesItem::orientation(), QwtPlotAbstractBarChart::baseline() 40 40 */ 41 class QWT_EXPORT QwtPlotMultiBarChart: 42 public QwtPlotAbstractBarChart, public QwtSeriesStore<QwtSetSample> 41 class QWT_EXPORT QwtPlotMultiBarChart 42 : public QwtPlotAbstractBarChart 43 , public QwtSeriesStore< QwtSetSample > 43 44 { 44 public: 45 public: 45 46 /*! 46 47 \brief Chart styles. … … 48 49 The default setting is QwtPlotMultiBarChart::Grouped. 49 50 \sa setStyle(), style() 50 */ 51 */ 51 52 enum ChartStyle 52 53 { … … 62 63 }; 63 64 64 explicit QwtPlotMultiBarChart( const QString &title = QString() );65 explicit QwtPlotMultiBarChart( const QwtText &title );65 explicit QwtPlotMultiBarChart( const QString& title = QString() ); 66 explicit QwtPlotMultiBarChart( const QwtText& title ); 66 67 67 68 virtual ~QwtPlotMultiBarChart(); 68 69 69 virtual int rtti() const; 70 virtual int rtti() const QWT_OVERRIDE; 70 71 71 void setBarTitles( const QList<QwtText >& );72 QList< QwtText> barTitles() const;72 void setBarTitles( const QList< QwtText >& ); 73 QList< QwtText > barTitles() const; 73 74 74 void setSamples( const QVector<QwtSetSample >& );75 void setSamples( const QVector< QVector< double> >& );76 void setSamples( QwtSeriesData<QwtSetSample >* );75 void setSamples( const QVector< QwtSetSample >& ); 76 void setSamples( const QVector< QVector< double > >& ); 77 void setSamples( QwtSeriesData< QwtSetSample >* ); 77 78 78 79 void setStyle( ChartStyle style ); 79 80 ChartStyle style() const; 80 81 81 void setSymbol( int valueIndex, QwtColumnSymbol * );82 const QwtColumnSymbol *symbol( int valueIndex ) const;82 void setSymbol( int valueIndex, QwtColumnSymbol* ); 83 const QwtColumnSymbol* symbol( int valueIndex ) const; 83 84 84 85 void resetSymbolMap(); 85 86 86 virtual void drawSeries( QPainter *painter,87 const QwtScaleMap &xMap, const QwtScaleMap&yMap,88 const QRectF &canvasRect, int from, int to ) const;87 virtual void drawSeries( QPainter*, 88 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 89 const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE; 89 90 90 virtual QRectF boundingRect() const; 91 virtual QRectF boundingRect() const QWT_OVERRIDE; 91 92 92 virtual QList<QwtLegendData> legendData() const; 93 virtual QList< QwtLegendData > legendData() const QWT_OVERRIDE; 93 94 94 virtual QwtGraphic legendIcon( int index, const QSizeF & ) const; 95 virtual QwtGraphic legendIcon( 96 int index, const QSizeF& ) const QWT_OVERRIDE; 95 97 96 protected: 97 QwtColumnSymbol *symbol( int valueIndex );98 protected: 99 QwtColumnSymbol* symbol( int valueIndex ); 98 100 99 virtual QwtColumnSymbol *specialSymbol(101 virtual QwtColumnSymbol* specialSymbol( 100 102 int sampleIndex, int valueIndex ) const; 101 103 102 virtual void drawSample( QPainter *painter,103 const QwtScaleMap &xMap, const QwtScaleMap&yMap,104 const QRectF &canvasRect, const QwtInterval&boundingInterval,105 int index, const QwtSetSample& sample) const;104 virtual void drawSample( QPainter*, 105 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 106 const QRectF& canvasRect, const QwtInterval& boundingInterval, 107 int index, const QwtSetSample& ) const; 106 108 107 virtual void drawBar( QPainter *, int sampleIndex,108 int valueIndex, const QwtColumnRect & ) const;109 virtual void drawBar( QPainter*, int sampleIndex, 110 int valueIndex, const QwtColumnRect& ) const; 109 111 110 void drawStackedBars( QPainter *painter,111 const QwtScaleMap &xMap, const QwtScaleMap&yMap,112 const QRectF &canvasRect, int index,113 double sampleWidth, const QwtSetSample& sample) const;112 void drawStackedBars( QPainter*, 113 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 114 const QRectF& canvasRect, int index, 115 double sampleWidth, const QwtSetSample& ) const; 114 116 115 void drawGroupedBars( QPainter *painter,116 const QwtScaleMap &xMap, const QwtScaleMap&yMap,117 const QRectF &canvasRect, int index,118 double sampleWidth, const QwtSetSample& sample) const;117 void drawGroupedBars( QPainter*, 118 const QwtScaleMap& xMap, const QwtScaleMap& yMap, 119 const QRectF& canvasRect, int index, 120 double sampleWidth, const QwtSetSample& ) const; 119 121 120 private: 122 private: 121 123 void init(); 122 124 123 125 class PrivateData; 124 PrivateData *d_data;126 PrivateData* m_data; 125 127 }; 126 128
Note:
See TracChangeset
for help on using the changeset viewer.
