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 index ) 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 index ) 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 index ) 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
QwtCPointerData
Data class containing two pointers to memory blocks of doubles.
Definition: qwt_point_data.h:41
QwtPointArrayData
Interface for iterating over two QVector<double> objects.
Definition: qwt_point_data.h:19
QwtSeriesData::boundingRect
virtual QRectF boundingRect() const =0
QwtSeriesData::setRectOfInterest
virtual void setRectOfInterest(const QRectF &rect)
Definition: qwt_series_data.h:122
QwtSeriesData
Abstract interface for iterating over samples.
Definition: qwt_series_data.h:47
QwtSeriesData::sample
virtual T sample(size_t i) const =0
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:26
QwtSyntheticPointData
Synthetic point data.
Definition: qwt_point_data.h:112
QwtSeriesData::size
virtual size_t size() const =0