Qwt User's Guide
svn
|
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** 00002 * Qwt Widget Library 00003 * Copyright (C) 1997 Josef Wilgen 00004 * Copyright (C) 2002 Uwe Rathmann 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the Qwt License, Version 1.0 00008 *****************************************************************************/ 00009 00010 #ifndef QWT_MATRIX_RASTER_DATA_H 00011 #define QWT_MATRIX_RASTER_DATA_H 1 00012 00013 #include "qwt_global.h" 00014 #include "qwt_raster_data.h" 00015 #include <qvector.h> 00016 00025 class QWT_EXPORT QwtMatrixRasterData: public QwtRasterData 00026 { 00027 public: 00032 enum ResampleMode 00033 { 00038 NearestNeighbour, 00039 00044 BilinearInterpolation 00045 }; 00046 00047 QwtMatrixRasterData(); 00048 virtual ~QwtMatrixRasterData(); 00049 00050 void setResampleMode(ResampleMode mode); 00051 ResampleMode resampleMode() const; 00052 00053 virtual void setInterval( Qt::Axis, const QwtInterval & ); 00054 void setValueMatrix( const QVector<double> &values, size_t numColumns ); 00055 00056 const QVector<double> valueMatrix() const; 00057 size_t numColumns() const; 00058 size_t numRows() const; 00059 00060 virtual QRectF pixelHint( const QRectF & ) const; 00061 00062 virtual double value( double x, double y ) const; 00063 00064 private: 00065 void update(); 00066 00067 class PrivateData; 00068 PrivateData *d_data; 00069 }; 00070 00071 #endif