QWT 7.0.1
Loading...
Searching...
No Matches
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 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_MATRIX_RASTER_DATA_H
28#define QWT_MATRIX_RASTER_DATA_H
29
30#include "qwt_global.h"
31#include "qwt_raster_data.h"
32
33#if QT_VERSION < 0x060000
34template< typename T > class QVector;
35#endif
36
45class QWT_EXPORT QwtMatrixRasterData : public QwtRasterData
46{
47 public:
53 {
59
65
70 BicubicInterpolation
71 };
72
74 virtual ~QwtMatrixRasterData();
75
76 void setResampleMode(ResampleMode mode);
77 ResampleMode resampleMode() const;
78
79 void setInterval( Qt::Axis, const QwtInterval& );
80 virtual QwtInterval interval( Qt::Axis axis) const QWT_OVERRIDE QWT_FINAL;
81
82 void setValueMatrix( const QVector< double >& values, int numColumns );
83 const QVector< double > valueMatrix() const;
84
85 void setValue( int row, int col, double value );
86
87 int numColumns() const;
88 int numRows() const;
89
90 virtual QRectF pixelHint( const QRectF& ) const QWT_OVERRIDE;
91
92 virtual double value( double x, double y ) const QWT_OVERRIDE;
93
94 private:
95 void update();
96
97 class PrivateData;
98 PrivateData* m_data;
99};
100
101#endif
Definition qwt_clipper.h:40
A class representing an interval.
Definition qwt_interval.h:40
A class representing a matrix of values as raster data.
Definition qwt_matrix_raster_data.h:46
ResampleMode
Resampling algorithm The default setting is NearestNeighbour;.
Definition qwt_matrix_raster_data.h:53
@ BilinearInterpolation
Interpolate the value from the distances and values of the 4 surrounding values in the matrix,...
Definition qwt_matrix_raster_data.h:64
@ NearestNeighbour
Return the value from the matrix, that is nearest to the the requested position.
Definition qwt_matrix_raster_data.h:58
QwtRasterData defines an interface to any type of raster data.
Definition qwt_raster_data.h:60
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
Definition qwt_raster_data.cpp:284
virtual double value(double x, double y) const =0
virtual QwtInterval interval(Qt::Axis) const =0