Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_plot_multi_barchart.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1313#include "qwt_global.h"
    1414#include "qwt_plot_abstract_barchart.h"
    15 #include "qwt_series_data.h"
    1615
    1716class QwtColumnRect;
    1817class QwtColumnSymbol;
     18template< typename T > class QwtSeriesData;
    1919
    2020/*!
    21   \brief QwtPlotMultiBarChart displays a series of a samples that consist
     21   \brief QwtPlotMultiBarChart displays a series of a samples that consist
    2222         each of a set of values.
    2323
    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.
    2626
    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().
    3030
    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.
    3434
    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.
    3737
    38   \sa QwtPlotBarChart, QwtPlotHistogram
     38   \sa QwtPlotBarChart, QwtPlotHistogram
    3939      QwtPlotSeriesItem::orientation(), QwtPlotAbstractBarChart::baseline()
    4040 */
    41 class QWT_EXPORT QwtPlotMultiBarChart:
    42     public QwtPlotAbstractBarChart, public QwtSeriesStore<QwtSetSample>
     41class QWT_EXPORT QwtPlotMultiBarChart
     42    : public QwtPlotAbstractBarChart
     43    , public QwtSeriesStore< QwtSetSample >
    4344{
    44 public:
     45  public:
    4546    /*!
    4647        \brief Chart styles.
    … …  
    4849        The default setting is QwtPlotMultiBarChart::Grouped.
    4950        \sa setStyle(), style()
    50     */
     51     */
    5152    enum ChartStyle
    5253    {
    … …  
    6263    };
    6364
    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 );
    6667
    6768    virtual ~QwtPlotMultiBarChart();
    6869
    69     virtual int rtti() const;
     70    virtual int rtti() const QWT_OVERRIDE;
    7071
    71     void setBarTitles( const QList<QwtText> & );
    72     QList<QwtText> barTitles() const;
     72    void setBarTitles( const QList< QwtText >& );
     73    QList< QwtText > barTitles() const;
    7374
    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 >* );
    7778
    7879    void setStyle( ChartStyle style );
    7980    ChartStyle style() const;
    8081
    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;
    8384
    8485    void resetSymbolMap();
    8586
    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;
    8990
    90     virtual QRectF boundingRect() const;
     91    virtual QRectF boundingRect() const QWT_OVERRIDE;
    9192
    92     virtual QList<QwtLegendData> legendData() const;
     93    virtual QList< QwtLegendData > legendData() const QWT_OVERRIDE;
    9394
    94     virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
     95    virtual QwtGraphic legendIcon(
     96        int index, const QSizeF& ) const QWT_OVERRIDE;
    9597
    96 protected:
    97     QwtColumnSymbol *symbol( int valueIndex );
     98  protected:
     99    QwtColumnSymbol* symbol( int valueIndex );
    98100
    99     virtual QwtColumnSymbol *specialSymbol(
     101    virtual QwtColumnSymbol* specialSymbol(
    100102        int sampleIndex, int valueIndex ) const;
    101103
    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;
    106108
    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;
    109111
    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;
    114116
    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;
    119121
    120 private:
     122  private:
    121123    void init();
    122124
    123125    class PrivateData;
    124     PrivateData *d_data;
     126    PrivateData* m_data;
    125127};
    126128
Note: See TracChangeset for help on using the changeset viewer.