QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
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
52class QWT_EXPORT QwtMatrixRasterData : public QwtRasterData
53{
54 public:
67 {
78
89
99 BicubicInterpolation
100 };
101
102 // Constructor
104 // Destructor
105 virtual ~QwtMatrixRasterData();
106
107 // Set the resampling algorithm
108 void setResampleMode(ResampleMode mode);
109 // Return the resampling algorithm
110 ResampleMode resampleMode() const;
111
112 // Assign the bounding interval for an axis
113 void setInterval( Qt::Axis, const QwtInterval& );
114 // Return bounding interval for an axis
115 virtual QwtInterval interval( Qt::Axis axis) const override final;
116
117 // Assign a value matrix
118 void setValueMatrix( const QVector< double >& values, int numColumns );
119 // Return value matrix
120 const QVector< double > valueMatrix() const;
121
122 // Change a single value in the matrix
123 void setValue( int row, int col, double value );
124
125 // Return number of columns of the value matrix
126 int numColumns() const;
127 // Return number of rows of the value matrix
128 int numRows() const;
129
130 // Calculate the pixel hint
131 virtual QRectF pixelHint( const QRectF& ) const override;
132
133 // Return the value at a raster position
134 virtual double value( double x, double y ) const override;
135
136 private:
137 void update();
138
139 class PrivateData;
140 PrivateData* m_data;
141};
142
143#endif
Definition qwt_clipper.h:40
表示区间的类
Definition qwt_interval.h:45
将数值矩阵表示为栅格数据的类。
Definition qwt_matrix_raster_data.h:53
ResampleMode
重采样算法
Definition qwt_matrix_raster_data.h:67
@ BilinearInterpolation
Definition qwt_matrix_raster_data.h:88
@ NearestNeighbour
Definition qwt_matrix_raster_data.h:77
QwtRasterData 定义了任何类型栅格数据的接口
Definition qwt_raster_data.h:79
virtual QRectF pixelHint(const QRectF &) const
Return a hint for the raster item, about how to align the pixels
Definition qwt_raster_data.cpp:350