qwt_point_data.h
Go to the documentation of this file.
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_POINT_DATA_H
00011 #define QWT_POINT_DATA_H 1
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_series_data.h"
00015 
00019 class QWT_EXPORT QwtPointArrayData: public QwtSeriesData<QPointF>
00020 {
00021 public:
00022     QwtPointArrayData( const QVector<double> &x, const QVector<double> &y );
00023     QwtPointArrayData( const double *x, const double *y, size_t size );
00024 
00025     virtual QRectF boundingRect() const;
00026 
00027     virtual size_t size() const;
00028     virtual QPointF sample( size_t i ) const;
00029 
00030     const QVector<double> &xData() const;
00031     const QVector<double> &yData() const;
00032 
00033 private:
00034     QVector<double> d_x;
00035     QVector<double> d_y;
00036 };
00037 
00041 class QWT_EXPORT QwtCPointerData: public QwtSeriesData<QPointF>
00042 {
00043 public:
00044     QwtCPointerData( const double *x, const double *y, size_t size );
00045 
00046     virtual QRectF boundingRect() const;
00047     virtual size_t size() const;
00048     virtual QPointF sample( size_t i ) const;
00049 
00050     const double *xData() const;
00051     const double *yData() const;
00052 
00053 private:
00054     const double *d_x;
00055     const double *d_y;
00056     size_t d_size;
00057 };
00058 
00112 class QWT_EXPORT QwtSyntheticPointData: public QwtSeriesData<QPointF>
00113 {
00114 public:
00115     QwtSyntheticPointData( size_t size,
00116         const QwtInterval & = QwtInterval() );
00117 
00118     void setSize( size_t size );
00119     virtual size_t size() const;
00120 
00121     void setInterval( const QwtInterval& );
00122     QwtInterval interval() const;
00123 
00124     virtual QRectF boundingRect() const;
00125     virtual QPointF sample( size_t i ) const;
00126 
00133     virtual double y( double x ) const = 0;
00134     virtual double x( uint index ) const;
00135 
00136     virtual void setRectOfInterest( const QRectF & );
00137     QRectF rectOfInterest() const;
00138 
00139 private:
00140     size_t d_size;
00141     QwtInterval d_interval;
00142     QRectF d_rectOfInterest;
00143     QwtInterval d_intervalOfInterest;
00144 };
00145 
00146 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56