Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_barchart.h


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_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 QwtPlotBarChart displays a series of a values as bars.
     21   \brief QwtPlotBarChart displays a series of a values as bars.
    2222
    23   Each bar might be customized individually by implementing
    24   a specialSymbol(). Otherwise it is rendered using a default symbol.
     23   Each bar might be customized individually by implementing
     24   a specialSymbol(). Otherwise it is rendered using a default symbol.
    2525
    26   Depending on its orientation() the bars are displayed horizontally
    27   or vertically. The bars cover the interval between the baseline()
    28   and the value.
     26   Depending on its orientation() the bars are displayed horizontally
     27   or vertically. The bars cover the interval between the baseline()
     28   and the value.
    2929
    30   By activating the LegendBarTitles mode each sample will have
    31   its own entry on the legend.
     30   By activating the LegendBarTitles mode each sample will have
     31   its own entry on the legend.
    3232
    33   The most common use case of a bar chart is to display a
    34   list of y coordinates, where the x coordinate is simply the index
    35   in the list. But for other situations ( f.e. when values are related
    36   to dates ) it is also possible to set x coordinates explicitly.
     33   The most common use case of a bar chart is to display a
     34   list of y coordinates, where the x coordinate is simply the index
     35   in the list. But for other situations ( f.e. when values are related
     36   to dates ) it is also possible to set x coordinates explicitly.
    3737
    38   \sa QwtPlotMultiBarChart, QwtPlotHistogram, QwtPlotCurve::Sticks,
     38   \sa QwtPlotMultiBarChart, QwtPlotHistogram, QwtPlotCurve::Sticks,
    3939      QwtPlotSeriesItem::orientation(), QwtPlotAbstractBarChart::baseline()
    4040 */
    41 class QWT_EXPORT QwtPlotBarChart:
    42     public QwtPlotAbstractBarChart, public QwtSeriesStore<QPointF>
     41class QWT_EXPORT QwtPlotBarChart
     42    : public QwtPlotAbstractBarChart
     43    , public QwtSeriesStore< QPointF >
    4344{
    44 public:
     45  public:
    4546    /*!
    46       \brief Legend modes.
     47       \brief Legend modes.
    4748
    48       The default setting is QwtPlotBarChart::LegendChartTitle.
    49       \sa setLegendMode(), legendMode()
    50     */
     49       The default setting is QwtPlotBarChart::LegendChartTitle.
     50       \sa setLegendMode(), legendMode()
     51     */
    5152    enum LegendMode
    5253    {
    5354        /*!
    54           One entry on the legend showing the default symbol
    55           and the title() of the chart
     55           One entry on the legend showing the default symbol
     56           and the title() of the chart
    5657
    57           \sa QwtPlotItem::title()
     58           \sa QwtPlotItem::title()
    5859         */
    5960        LegendChartTitle,
    6061
    6162        /*!
    62           One entry for each value showing the individual symbol
    63           of the corresponding bar and the bar title.
     63           One entry for each value showing the individual symbol
     64           of the corresponding bar and the bar title.
    6465
    65           \sa specialSymbol(), barTitle()
     66           \sa specialSymbol(), barTitle()
    6667         */
    6768        LegendBarTitles
    6869    };
    6970
    70     explicit QwtPlotBarChart( const QString &title = QString() );
    71     explicit QwtPlotBarChart( const QwtText &title );
     71    explicit QwtPlotBarChart( const QString& title = QString() );
     72    explicit QwtPlotBarChart( const QwtText& title );
    7273
    7374    virtual ~QwtPlotBarChart();
    7475
    75     virtual int rtti() const;
     76    virtual int rtti() const QWT_OVERRIDE;
    7677
    77     void setSamples( const QVector<QPointF> & );
    78     void setSamples( const QVector<double> & );
    79     void setSamples( QwtSeriesData<QPointF> * );
     78    void setSamples( const QVector< QPointF >& );
     79    void setSamples( const QVector< double >& );
     80    void setSamples( QwtSeriesData< QPointF >* );
    8081
    81     void setSymbol( QwtColumnSymbol * );
    82     const QwtColumnSymbol *symbol() const;
     82    void setSymbol( QwtColumnSymbol* );
     83    const QwtColumnSymbol* symbol() const;
    8384
    8485    void setLegendMode( LegendMode );
    8586    LegendMode legendMode() const;
    8687
    87     virtual void drawSeries( QPainter *painter,
    88         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    89         const QRectF &canvasRect, int from, int to ) const;
     88    virtual void drawSeries( QPainter*,
     89        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     90        const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
    9091
    91     virtual QRectF boundingRect() const;
     92    virtual QRectF boundingRect() const QWT_OVERRIDE;
    9293
    93     virtual QwtColumnSymbol *specialSymbol(
     94    virtual QwtColumnSymbol* specialSymbol(
    9495        int sampleIndex, const QPointF& ) const;
    9596
    9697    virtual QwtText barTitle( int sampleIndex ) const;
    9798
    98 protected:
    99     virtual void drawSample( QPainter *painter,
    100         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    101         const QRectF &canvasRect, const QwtInterval &boundingInterval,
     99  protected:
     100    virtual void drawSample( QPainter* painter,
     101        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     102        const QRectF& canvasRect, const QwtInterval& boundingInterval,
    102103        int index, const QPointF& sample ) const;
    103104
    104     virtual void drawBar( QPainter *,
     105    virtual void drawBar( QPainter*,
    105106        int sampleIndex, const QPointF& sample,
    106         const QwtColumnRect & ) const;
     107        const QwtColumnRect& ) const;
    107108
    108     QList<QwtLegendData> legendData() const;
    109     QwtGraphic legendIcon( int index, const QSizeF & ) const;
     109    QwtColumnRect columnRect(
     110        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     111        const QRectF& canvasRect, const QwtInterval& boundingInterval,
     112        const QPointF& sample ) const;
    110113
    111 private:
     114    QList< QwtLegendData > legendData() const QWT_OVERRIDE;
     115    QwtGraphic legendIcon( int index, const QSizeF& ) const QWT_OVERRIDE;
     116
     117  private:
    112118    void init();
    113119
    114120    class PrivateData;
    115     PrivateData *d_data;
     121    PrivateData* m_data;
    116122};
    117123
Note: See TracChangeset for help on using the changeset viewer.