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_rasteritem.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_item.h"
    15 #include "qwt_interval.h"
    16 #include <qglobal.h>
     15
    1716#include <qstring.h>
    18 #include <qimage.h>
     17
     18class QwtInterval;
    1919
    2020/*!
    21   \brief A class, which displays raster data
     21   \brief A class, which displays raster data
    2222
    23   Raster data is a grid of pixel values, that can be represented
    24   as a QImage. It is used for many types of information like
    25   spectrograms, cartograms, geographical maps ...
     23   Raster data is a grid of pixel values, that can be represented
     24   as a QImage. It is used for many types of information like
     25   spectrograms, cartograms, geographical maps ...
    2626
    27   Often a plot has several types of raster data organized in layers.
    28   ( f.e a geographical map, with weather statistics ).
    29   Using setAlpha() raster items can be stacked easily.
     27   Often a plot has several types of raster data organized in layers.
     28   ( f.e a geographical map, with weather statistics ).
     29   Using setAlpha() raster items can be stacked easily.
    3030
    31   QwtPlotRasterItem is only implemented for images of the following formats:
    32   QImage::Format_Indexed8, QImage::Format_ARGB32.
     31   QwtPlotRasterItem is only implemented for images of the following formats:
     32   QImage::Format_Indexed8, QImage::Format_ARGB32.
    3333
    34   \sa QwtPlotSpectrogram
    35 */
     34   \sa QwtPlotSpectrogram
     35 */
    3636
    37 class QWT_EXPORT QwtPlotRasterItem: public QwtPlotItem
     37class QWT_EXPORT QwtPlotRasterItem : public QwtPlotItem
    3838{
    39 public:
     39  public:
    4040    /*!
    41       \brief Cache policy
    42       The default policy is NoCache
     41       \brief Cache policy
     42       The default policy is NoCache
    4343     */
    4444    enum CachePolicy
    4545    {
    4646        /*!
    47           renderImage() is called each time the item has to be repainted
     47           renderImage() is called each time the item has to be repainted
    4848         */
    4949        NoCache,
    5050
    5151        /*!
    52           renderImage() is called, whenever the image cache is not valid,
    53           or the scales, or the size of the canvas has changed.
     52           renderImage() is called, whenever the image cache is not valid,
     53           or the scales, or the size of the canvas has changed.
    5454
    55           This type of cache is useful for improving the performance
    56           of hide/show operations or manipulations of the alpha value.
    57           All other situations are handled by the canvas backing store.
     55           This type of cache is useful for improving the performance
     56           of hide/show operations or manipulations of the alpha value.
     57           All other situations are handled by the canvas backing store.
    5858         */
    5959        PaintCache
    … …  
    6363        Attributes to modify the drawing algorithm.
    6464        \sa setPaintAttribute(), testPaintAttribute()
    65     */
     65     */
    6666    enum PaintAttribute
    6767    {
    6868        /*!
    69           When the image is rendered according to the data pixels
    70           ( QwtRasterData::pixelHint() ) it can be expanded to paint
    71           device resolution before it is passed to QPainter.
    72           The expansion algorithm rounds the pixel borders in the same
    73           way as the axis ticks, what is usually better than the
    74           scaling algorithm implemented in Qt.
    75           Disabling this flag might make sense, to reduce the size of a
    76           document/file. If this is possible for a document format
    77           depends on the implementation of the specific QPaintEngine.
     69           When the image is rendered according to the data pixels
     70           ( QwtRasterData::pixelHint() ) it can be expanded to paint
     71           device resolution before it is passed to QPainter.
     72           The expansion algorithm rounds the pixel borders in the same
     73           way as the axis ticks, what is usually better than the
     74           scaling algorithm implemented in Qt.
     75           Disabling this flag might make sense, to reduce the size of a
     76           document/file. If this is possible for a document format
     77           depends on the implementation of the specific QPaintEngine.
    7878         */
    7979
    … …  
    8181    };
    8282
    83     //! Paint attributes
    84     typedef QFlags<PaintAttribute> PaintAttributes;
     83    Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
    8584
    8685    explicit QwtPlotRasterItem( const QString& title = QString() );
    … …  
    9998    void invalidateCache();
    10099
    101     virtual void draw( QPainter *,
    102         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    103         const QRectF &canvasRect ) const;
     100    virtual void draw( QPainter*,
     101        const QwtScaleMap& xMap, const QwtScaleMap& yMap,
     102        const QRectF& canvasRect ) const QWT_OVERRIDE;
    104103
    105     virtual QRectF pixelHint( const QRectF & ) const;
     104    virtual QRectF pixelHint( const QRectF& ) const;
    106105
    107106    virtual QwtInterval interval(Qt::Axis) const;
    108     virtual QRectF boundingRect() const;
     107    virtual QRectF boundingRect() const QWT_OVERRIDE;
    109108
    110 protected:
     109  protected:
    111110    /*!
    112       \brief Render an image
     111       \brief Render an image
    113112
    114       An implementation of render() might iterate over all
    115       pixels of imageRect. Each pixel has to be translated into
    116       the corresponding position in scale coordinates using the maps.
    117       This position can be used to look up a value in a implementation
    118       specific way and to map it into a color.
     113       An implementation of render() might iterate over all
     114       pixels of imageRect. Each pixel has to be translated into
     115       the corresponding position in scale coordinates using the maps.
     116       This position can be used to look up a value in a implementation
     117       specific way and to map it into a color.
    119118
    120       \param xMap X-Scale Map
    121       \param yMap Y-Scale Map
    122       \param area Requested area for the image in scale coordinates
    123       \param imageSize Requested size of the image
     119       \param xMap X-Scale Map
     120       \param yMap Y-Scale Map
     121       \param area Requested area for the image in scale coordinates
     122       \param imageSize Requested size of the image
    124123
    125       \return Rendered image
     124       \return Rendered image
    126125     */
    127     virtual QImage renderImage( const QwtScaleMap &xMap,
    128         const QwtScaleMap &yMap, const QRectF &area,
    129         const QSize &imageSize ) const = 0;
     126    virtual QImage renderImage( const QwtScaleMap& xMap,
     127        const QwtScaleMap& yMap, const QRectF& area,
     128        const QSize& imageSize ) const = 0;
    130129
    131130    virtual QwtScaleMap imageMap( Qt::Orientation,
    132         const QwtScaleMap &map, const QRectF &area,
    133         const QSize &imageSize, double pixelSize) const;
     131        const QwtScaleMap& map, const QRectF& area,
     132        const QSize& imageSize, double pixelSize) const;
    134133
    135 private:
    136     QwtPlotRasterItem( const QwtPlotRasterItem & );
    137     QwtPlotRasterItem &operator=( const QwtPlotRasterItem & );
     134  private:
     135    explicit QwtPlotRasterItem( const QwtPlotRasterItem& );
     136    QwtPlotRasterItem& operator=( const QwtPlotRasterItem& );
    138137
    139138    void init();
    140139
    141     QImage compose( const QwtScaleMap &, const QwtScaleMap &,
    142         const QRectF &imageArea, const QRectF &paintRect,
    143         const QSize &imageSize, bool doCache) const;
     140    QImage compose( const QwtScaleMap&, const QwtScaleMap&,
     141        const QRectF& imageArea, const QRectF& paintRect,
     142        const QSize& imageSize, bool doCache) const;
    144143
    145144
    146145    class PrivateData;
    147     PrivateData *d_data;
     146    PrivateData* m_data;
    148147};
    149148
Note: See TracChangeset for help on using the changeset viewer.