All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_point_data.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_POINT_DATA_H
#define QWT_POINT_DATA_H 1
#include "qwt_global.h"
#include "qwt_series_data.h"
class QWT_EXPORT QwtPointArrayData: public QwtSeriesData<QPointF>
{
public:
QwtPointArrayData( const QVector<double> &x, const QVector<double> &y );
QwtPointArrayData( const double *x, const double *y, size_t size );
virtual QRectF boundingRect() const;
virtual size_t size() const;
virtual QPointF sample( size_t i ) const;
const QVector<double> &xData() const;
const QVector<double> &yData() const;
private:
QVector<double> d_x;
QVector<double> d_y;
};
class QWT_EXPORT QwtCPointerData: public QwtSeriesData<QPointF>
{
public:
QwtCPointerData( const double *x, const double *y, size_t size );
virtual QRectF boundingRect() const;
virtual size_t size() const;
virtual QPointF sample( size_t i ) const;
const double *xData() const;
const double *yData() const;
private:
const double *d_x;
const double *d_y;
size_t d_size;
};
class QWT_EXPORT QwtSyntheticPointData: public QwtSeriesData<QPointF>
{
public:
QwtSyntheticPointData( size_t size,
const QwtInterval & = QwtInterval() );
void setSize( size_t size );
virtual size_t size() const;
void setInterval( const QwtInterval& );
QwtInterval interval() const;
virtual QRectF boundingRect() const;
virtual QPointF sample( size_t i ) const;
virtual double y( double x ) const = 0;
virtual double x( uint index ) const;
virtual void setRectOfInterest( const QRectF & );
QRectF rectOfInterest() const;
private:
size_t d_size;
QwtInterval d_interval;
QRectF d_rectOfInterest;
QwtInterval d_intervalOfInterest;
};
#endif