Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions
QwtData Class Reference

`#include <qwt_data.h>`

Inheritance diagram for QwtData:
[legend]

List of all members.

## Public Member Functions

| QwtData ()
virtual | ~QwtData ()
virtual QwtDoubleRect | boundingRect () const
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

## Protected Member Functions

QwtData & | operator= (const QwtData &)

## Detailed Description

QwtData defines an interface to any type of curve 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

## 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 QwtCPointerData, and QwtArrayData.

virtual QwtData* QwtData::copy | ( |  | ) | const

pure virtual

Returns:
  Pointer to a copy (virtual copy constructor)

Implemented in QwtCPointerData, QwtArrayData, and QwtPolygonFData.

QwtData& QwtData::operator= | ( | const QwtData & |  | ) |

protected

Assignment operator (virtualized)

virtual size_t QwtData::size | ( |  | ) | const

pure virtual

Returns:
  Size of the data set

Implemented in QwtCPointerData, QwtArrayData, and QwtPolygonFData.

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 QwtCPointerData, QwtArrayData, and QwtPolygonFData.

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 QwtCPointerData, QwtArrayData, and QwtPolygonFData.