Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_raster_data.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_raster_data.h

    r8127 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    99
    1010#ifndef QWT_RASTER_DATA_H
    11 #define QWT_RASTER_DATA_H 1
     11#define QWT_RASTER_DATA_H
    1212
    1313#include "qwt_global.h"
    14 #include "qwt_interval.h"
    15 #include <qmap.h>
    16 #include <qlist.h>
    17 #include <qpolygon.h>
     14#include <qnamespace.h>
    1815
    19 class QwtScaleMap;
     16class QwtInterval;
     17class QPolygonF;
     18class QRectF;
     19class QSize;
     20template< typename T > class QList;
     21template< class Key, class T > class QMap;
    2022
    2123/*!
    22   \brief QwtRasterData defines an interface to any type of raster data.
     24   \brief QwtRasterData defines an interface to any type of raster data.
    2325
    24   QwtRasterData is an abstract interface, that is used by
    25   QwtPlotRasterItem to find the values at the pixels of its raster.
     26   QwtRasterData is an abstract interface, that is used by
     27   QwtPlotRasterItem to find the values at the pixels of its raster.
    2628
    27   Often a raster item is used to display values from a matrix. Then the
    28   derived raster data class needs to implement some sort of resampling,
    29   that maps the raster of the matrix into the requested raster of
    30   the raster item ( depending on resolution and scales of the canvas ).
    31 */
     29   Gaps inside the bounding rectangle of the data can be indicated by NaN
     30   values ( when WithoutGaps is disabled ).
     31
     32   Often a raster item is used to display values from a matrix. Then the
     33   derived raster data class needs to implement some sort of resampling,
     34   that maps the raster of the matrix into the requested raster of
     35   the raster item ( depending on resolution and scales of the canvas ).
     36
     37   QwtMatrixRasterData implements raster data, that returns values from
     38   a given 2D matrix.
     39
     40   \sa QwtMatrixRasterData
     41 */
    3242class QWT_EXPORT QwtRasterData
    3343{
    34 public:
     44  public:
    3545    //! Contour lines
    36     typedef QMap<double, QPolygonF> ContourLines;
     46    typedef QMap< double, QPolygonF > ContourLines;
     47
     48    /*!
     49       \brief Raster data attributes
     50
     51       Additional information that is used to improve processing
     52       of the data.
     53     */
     54    enum Attribute
     55    {
     56        /*!
     57           The bounding rectangle of the data is spanned by
     58           the interval(Qt::XAxis) and interval(Qt::YAxis).
     59
     60           WithoutGaps indicates, that the data has no gaps
     61           ( unknown values ) in this area and the result of
     62           value() does not need to be checked for NaN values.
     63
     64           Enabling this flag will have an positive effect on
     65           the performance of rendering a QwtPlotSpectrogram.
     66
     67           The default setting is false.
     68
     69           \note NaN values indicate an undefined value
     70         */
     71        WithoutGaps = 0x01
     72    };
     73
     74    Q_DECLARE_FLAGS( Attributes, Attribute )
    3775
    3876    //! Flags to modify the contour algorithm
    … …  
    4684    };
    4785
    48     //! Flags to modify the contour algorithm
    49     typedef QFlags<ConrecFlag> ConrecFlags;
     86    Q_DECLARE_FLAGS( ConrecFlags, ConrecFlag )
    5087
    5188    QwtRasterData();
    5289    virtual ~QwtRasterData();
    5390
    54     virtual void setInterval( Qt::Axis, const QwtInterval & );
    55     const QwtInterval &interval(Qt::Axis) const;
     91    void setAttribute( Attribute, bool on = true );
     92    bool testAttribute( Attribute ) const;
    5693
    57     virtual QRectF pixelHint( const QRectF & ) const;
     94    /*!
     95       \return Bounding interval for an axis
     96       \sa setInterval
     97     */
     98    virtual QwtInterval interval( Qt::Axis ) const = 0;
    5899
    59     virtual void initRaster( const QRectF &, const QSize& raster );
     100    virtual QRectF pixelHint( const QRectF& ) const;
     101
     102    virtual void initRaster( const QRectF&, const QSize& raster );
    60103    virtual void discardRaster();
    61104
    … …  
    64107       \param x X value in plot coordinates
    65108       \param y Y value in plot coordinates
    66     */
     109     */
    67110    virtual double value( double x, double y ) const = 0;
    68111
    69     virtual ContourLines contourLines( const QRectF &rect,
    70         const QSize &raster, const QList<double> &levels,
     112    virtual ContourLines contourLines( const QRectF& rect,
     113        const QSize& raster, const QList< double >& levels,
    71114        ConrecFlags ) const;
    72115
    … …  
    74117    class ContourPlane;
    75118
    76 private:
    77     // Disabled copy constructor and operator=
    78     QwtRasterData( const QwtRasterData & );
    79     QwtRasterData &operator=( const QwtRasterData & );
     119  private:
     120    Q_DISABLE_COPY(QwtRasterData)
    80121
    81     QwtInterval d_intervals[3];
     122    class PrivateData;
     123    PrivateData* m_data;
    82124};
    83125
    84 /*!
    85    \return Bounding interval for a axis
    86    \sa setInterval
    87 */
    88 inline const QwtInterval &QwtRasterData::interval( Qt::Axis axis) const
    89 {
    90     return d_intervals[axis];
    91 }
    92 
    93126Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::ConrecFlags )
     127Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::Attributes )
    94128
    95129#endif
Note: See TracChangeset for help on using the changeset viewer.