Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_histogram.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_histogram.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_seriesitem.h"
    15 #include "qwt_column_symbol.h"
    16 #include <qcolor.h>
    17 #include <qvector.h>
    1815
    19 class QwtIntervalData;
    20 class QString;
     16class QwtColumnSymbol;
     17class QwtColumnRect;
     18class QColor;
    2119class QPolygonF;
    2220
     21#if QT_VERSION < 0x060000
     22template< typename T > class QVector;
     23#endif
     24
    2325/*!
    24   \brief QwtPlotHistogram represents a series of samples, where an interval
     26   \brief QwtPlotHistogram represents a series of samples, where an interval
    2527         is associated with a value ( \f$y = f([x1,x2])\f$ ).
    2628
    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.
    2931
    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
    3133        digital image processing and statistics. Wikipedia introduces the
    3234        terms "image histogram" and "color histogram" to avoid confusions.
    … …  
    3436        is no applicable plot item for a "color histogram" yet.
    3537
    36   \sa QwtPlotBarChart, QwtPlotMultiBarChart
    37 */
     38   \sa QwtPlotBarChart, QwtPlotMultiBarChart
     39 */
    3840
    39 class QWT_EXPORT QwtPlotHistogram:
    40     public QwtPlotSeriesItem, public QwtSeriesStore<QwtIntervalSample>
     41class QWT_EXPORT QwtPlotHistogram
     42    : public QwtPlotSeriesItem
     43    , public QwtSeriesStore< QwtIntervalSample >
    4144{
    42 public:
     45  public:
    4346    /*!
    4447        Histogram styles.
    … …  
    4649
    4750        \sa setStyle(), style(), setSymbol(), symbol(), setBaseline()
    48     */
     51     */
    4952    enum HistogramStyle
    5053    {
    … …  
    7780    };
    7881
    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 );
    8184    virtual ~QwtPlotHistogram();
    8285
    83     virtual int rtti() const;
     86    virtual int rtti() const QWT_OVERRIDE;
    8487
    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 );
    8890
    89     void setBrush( const QBrush & );
    90     const QBrush &brush() const;
     91    void setPen( const QPen& );
     92    const QPen& pen() const;
    9193
    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 >* );
    9499
    95100    void setBaseline( double );
    … …  
    99104    HistogramStyle style() const;
    100105
    101     void setSymbol( const QwtColumnSymbol * );
    102     const QwtColumnSymbol *symbol() const;
     106    void setSymbol( const QwtColumnSymbol* );
     107    const QwtColumnSymbol* symbol() const;
    103108
    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;
    107112
    108     virtual QRectF boundingRect() const;
     113    virtual QRectF boundingRect() const QWT_OVERRIDE;
    109114
    110     virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
     115    virtual QwtGraphic legendIcon(
     116        int index, const QSizeF& ) const QWT_OVERRIDE;
    111117
    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;
    115121
    116     virtual void drawColumn( QPainter *, const QwtColumnRect &,
    117         const QwtIntervalSample & ) const;
     122    virtual void drawColumn( QPainter*, const QwtColumnRect&,
     123        const QwtIntervalSample& ) const;
    118124
    119     void drawColumns( QPainter *,
    120         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
     125    void drawColumns( QPainter*,
     126        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
    121127        int from, int to ) const;
    122128
    123     void drawOutline( QPainter *,
    124         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
     129    void drawOutline( QPainter*,
     130        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
    125131        int from, int to ) const;
    126132
    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;
    130136
    131 private:
     137  private:
    132138    void init();
    133     void flushPolygon( QPainter *, double baseLine, QPolygonF & ) const;
     139    void flushPolygon( QPainter*, double baseLine, QPolygonF& ) const;
    134140
    135141    class PrivateData;
    136     PrivateData *d_data;
     142    PrivateData* m_data;
    137143};
    138144
Note: See TracChangeset for help on using the changeset viewer.