Qwt User's Guide 6.2.0

qwt_matrix_raster_data.h
1 /******************************************************************************
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
12
13 #include "qwt_global.h"
14 #include "qwt_raster_data.h"
15
16 #if QT_VERSION < 0x060000
17 template< typename T > class QVector;
18 #endif
19
28 class QWT_EXPORT QwtMatrixRasterData : public QwtRasterData
29 {
30 public:
35 enum ResampleMode
36 {
41 NearestNeighbour,
42
47 BilinearInterpolation,
48
53 BicubicInterpolation
54 };
55
56 QwtMatrixRasterData();
57 virtual ~QwtMatrixRasterData();
58
59 void setResampleMode(ResampleMode mode);
60 ResampleMode resampleMode() const;
61
62 void setInterval( Qt::Axis, const QwtInterval& );
63 virtual QwtInterval interval( Qt::Axis axis) const QWT_OVERRIDE QWT_FINAL;
64
65 void setValueMatrix( const QVector< double >& values, int numColumns );
66 const QVector< double > valueMatrix() const;
67
68 void setValue( int row, int col, double value );
69
70 int numColumns() const;
71 int numRows() const;
72
73 virtual QRectF pixelHint( const QRectF& ) const QWT_OVERRIDE;
74
75 virtual double value( double x, double y ) const QWT_OVERRIDE;
76
77 private:
78 void update();
79
80 class PrivateData;
81 PrivateData* m_data;
82 };
83
84 #endif
QVector
Definition: qwt_clipper.h:23
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:23
QwtMatrixRasterData
A class representing a matrix of values as raster data.
Definition: qwt_matrix_raster_data.h:29
QwtMatrixRasterData::ResampleMode
ResampleMode
Resampling algorithm The default setting is NearestNeighbour;.
Definition: qwt_matrix_raster_data.h:36
QwtMatrixRasterData::BilinearInterpolation
@ BilinearInterpolation
Definition: qwt_matrix_raster_data.h:47
QwtMatrixRasterData::NearestNeighbour
@ NearestNeighbour
Definition: qwt_matrix_raster_data.h:41
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition: qwt_raster_data.h:43
QwtRasterData::pixelHint
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
Definition: qwt_raster_data.cpp:267
QwtRasterData::value
virtual double value(double x, double y) const =0
QwtRasterData::interval
virtual QwtInterval interval(Qt::Axis) const =0