Poster of Linux kernelThe best gift for a Linux geek
QwtData

QwtData

Section: Qwt User's Guide (3) Updated: 16 Nov 2004
Local index Up
 

NAME

QwtData -  

SYNOPSIS


Inherited by QwtArrayData, QwtCPointerData, and QwtDoublePointData.

 

Detailed Description

QwtData defines an interface to any type of data.

Classes, derived from QwtData may:

store the data in almost any type of container
calculate the data on the fly instead of storing it
implement data with error bars (this implies subclassing QwtPlot, QwtCurve and QwtPlotCurve)

Warning:

In the future, 'almost any type of container' may be limited to containers supporting bi-directional iterators like the vector, array and list classes in Qt or in the standard template library.

Definition at line 40 of file qwt_data.h.  

Public Member Functions


virtual QwtData * copy () const =0

virtual size_t size () const =0

virtual double x (size_t i) const =0

virtual double y (size_t i) const =0

virtual QwtDoubleRect boundingRect () const
 

Protected Member Functions


QwtData & operator= (const QwtData &)
 

Member Function Documentation

 

QwtDoubleRect QwtData::boundingRect () const [virtual]

Returns the bounding rectangle of the data. If there is no bounding rect, like for empty data the rectangle is invalid: QwtDoubleRect::isValid() == FALSE

Warning:

This is an slow implementation iterating over all points. It is intended to be overloaded by derived classes. In case of auto scaling boundingRect() is called for every replot, so it might be worth to implement a cache, or use x(0), x(size() - 1) for ordered data ...

Reimplemented in QwtArrayData, and QwtCPointerData.

Definition at line 33 of file qwt_data.cpp.

References size(), x(), and y().

Referenced by QwtCurve::boundingRect().  

virtual QwtData* QwtData::copy () const [pure virtual]

Return a pointer to a copy (virtual copy constructor)

Implemented in QwtDoublePointData, QwtArrayData, and QwtCPointerData.

Referenced by QwtCurve::copy(), and QwtCurve::setData().  

QwtData& QwtData::operator= (const QwtData &) [protected]

Assignment operator (virtualized)  

virtual size_t QwtData::size () const [pure virtual]

Return the size of the data set

Implemented in QwtDoublePointData, QwtArrayData, and QwtCPointerData.

Referenced by boundingRect(), and QwtCurve::dataSize().  

virtual double QwtData::x (size_t i) const [pure virtual]

Return the x value of data point i

Parameters:

i Index

Returns:

x X value of data point i

Implemented in QwtDoublePointData, QwtArrayData, and QwtCPointerData.

Referenced by boundingRect().  

virtual double QwtData::y (size_t i) const [pure virtual]

Return the y value of data point i

Parameters:

i Index

Returns:

y Y value of data point i

Implemented in QwtDoublePointData, QwtArrayData, and QwtCPointerData.

Referenced by boundingRect(), and QwtCurve::y().

 

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.


 

Index

NAME
SYNOPSIS
Detailed Description
Public Member Functions
Protected Member Functions
Member Function Documentation
QwtDoubleRect QwtData::boundingRect () const [virtual]
virtual QwtData* QwtData::copy () const [pure virtual]
QwtData& QwtData::operator= (const QwtData &) [protected]
virtual size_t QwtData::size () const [pure virtual]
virtual double QwtData::x (size_t i) const [pure virtual]
virtual double QwtData::y (size_t i) const [pure virtual]
Author

This document was created by man2html, using the manual pages.
Time: 21:53:51 GMT, April 16, 2011