~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to src/qwt_matrix_raster_data.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2011-06-10 11:22:47 UTC
  • mfrom: (1.1.6 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110610112247-0i1019vvmzaq6p86
Tags: 6.0.0-1
* New upstream release (Closes: #624107):
  - drop Qt3 support. (Closes: #604379, #626868)
* Register documentation with doc-base. (Closes: #626567)
* Drop patches:
  - 01_makefiles.diff
  - 02_add_missing_warnings.diff
  - 03_qwt_branch_pull_r544.diff
* Add qwt_install_paths.patch to fix the hardcoded installation paths.
* Update debian/control:
  - drop libqt3-mt-dev build dependency.
  - bump Standards-Version to 3.9.2 (no changes).
  - drop Qt3 related packages.
  - due to bump soname (and as we dropper Qt3 support):
    - libqwt5-qt4-dev -> libqwt-dev
    - libqwt5-qt4 -> libqwt6
    - libqwt5-doc -> libqwt-doc
* Update debian/copyright file.
* Update debian/rules: drop Qt3 packages support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
 
2
 * Qwt Widget Library
 
3
 * Copyright (C) 1997   Josef Wilgen
 
4
 * Copyright (C) 2002   Uwe Rathmann
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the Qwt License, Version 1.0
 
8
 *****************************************************************************/
 
9
 
 
10
#ifndef QWT_MATRIX_RASTER_DATA_H
 
11
#define QWT_MATRIX_RASTER_DATA_H 1
 
12
 
 
13
#include "qwt_global.h"
 
14
#include "qwt_raster_data.h"
 
15
#include <qvector.h>
 
16
 
 
17
/*!
 
18
  \brief A class representing a matrix of values as raster data
 
19
 
 
20
  QwtMatrixRasterData implements an interface for a matrix of
 
21
  equidistant values, that can be used by a QwtPlotRasterItem. 
 
22
  It implements a couple of resampling algorithms, to provide
 
23
  values for positions, that or not on the value matrix.
 
24
*/
 
25
class QWT_EXPORT QwtMatrixRasterData: public QwtRasterData
 
26
{
 
27
public:
 
28
    /*!
 
29
      \brief Resampling algorithm
 
30
      The default setting is NearestNeighbour;
 
31
    */
 
32
    enum ResampleMode
 
33
    {
 
34
        /*!
 
35
          Return the value from the matrix, that is nearest to the
 
36
          the requested position.
 
37
         */
 
38
        NearestNeighbour,
 
39
 
 
40
        /*!
 
41
          Interpolate the value from the distances and values of the 
 
42
          4 surrounding values in the matrix,
 
43
         */
 
44
        BilinearInterpolation
 
45
    };
 
46
 
 
47
    QwtMatrixRasterData();
 
48
    virtual ~QwtMatrixRasterData();
 
49
 
 
50
    void setResampleMode(ResampleMode mode);
 
51
    ResampleMode resampleMode() const;
 
52
 
 
53
    virtual void setInterval( Qt::Axis, const QwtInterval & );
 
54
    void setValueMatrix( const QVector<double> &values, size_t numColumns );
 
55
    
 
56
    const QVector<double> valueMatrix() const;
 
57
    size_t numColumns() const;
 
58
    size_t numRows() const;
 
59
 
 
60
    virtual QRectF pixelHint( const QRectF & ) const;
 
61
 
 
62
    virtual double value( double x, double y ) const;
 
63
 
 
64
private:
 
65
    void update();
 
66
 
 
67
    class PrivateData;
 
68
    PrivateData *d_data;
 
69
};
 
70
 
 
71
#endif