Qwt User's Guide: QwtArrayData Class Reference

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# QwtArrayData Class Reference

Inheritance diagram for QwtArrayData:

[legend]
Collaboration diagram for QwtArrayData:

[legend]
List of all members.

## Detailed Description

Data class containing two QwtArray<double> objects.

Definition at line 119 of file qwt_data.h.

## Public Member Functions
| QwtArrayData (const QwtArray< double > &x, const QwtArray< double > &y)
| QwtArrayData (const double *x, const double *y, size_t size)
QwtArrayData & | operator= (const QwtArrayData &)
virtual QwtData * | copy () const
virtual size_t | size () const
virtual double | x (size_t i) const
virtual double | y (size_t i) const
const QwtArray< double > & | xData () const
const QwtArray< double > & | yData () const
virtual QwtDoubleRect | boundingRect () const

## Constructor & Destructor Documentation

QwtArrayData::QwtArrayData | ( | const QwtArray< double > & | x,
|  | const QwtArray< double > & | y |
| ) |  |  |

Constructor

Parameters:

  | x | Array of x values
  | y | Array of y values

See also:
  QwtPlotCurve::setData

Definition at line 141 of file qwt_data.cpp.

Referenced by copy().

QwtArrayData::QwtArrayData | ( | const double * | x,
|  | const double * | y,
|  | size_t | size |
| ) |  |  |

Constructor

Parameters:

  | x | Array of x values
  | y | Array of y values
  | size | Size of the x and y arrays

See also:
  QwtPlotCurve::setData

Definition at line 156 of file qwt_data.cpp.

## Member Function Documentation

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

Assignment.

Definition at line 174 of file qwt_data.cpp.

References d_x, and d_y.

QwtData * QwtArrayData::copy | ( |  | ) | const`[virtual]`

Returns:
  Pointer to a copy (virtual copy constructor)

Implements QwtData.

Definition at line 227 of file qwt_data.cpp.

References QwtArrayData().

size_t QwtArrayData::size | ( |  | ) | const`[virtual]`

Returns:
  Size of the data set

Implements QwtData.

Definition at line 185 of file qwt_data.cpp.

Referenced by boundingRect().

double QwtArrayData::x | ( | size_t | i | ) | const`[virtual]`

Return the x value of data point i

Parameters:

  | i | Index

Returns:
  x X value of data point i

Implements QwtData.

Definition at line 196 of file qwt_data.cpp.

double QwtArrayData::y | ( | size_t | i | ) | const`[virtual]`

Return the y value of data point i

Parameters:

  | i | Index

Returns:
  y Y value of data point i

Implements QwtData.

Definition at line 207 of file qwt_data.cpp.

const QwtArray< double > & QwtArrayData::xData | ( |  | ) | const

Returns:
  Array of the x-values

Definition at line 213 of file qwt_data.cpp.

const QwtArray< double > & QwtArrayData::yData | ( |  | ) | const

Returns:
  Array of the y-values

Definition at line 219 of file qwt_data.cpp.

QwtDoubleRect QwtArrayData::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

Reimplemented from QwtData.

Definition at line 237 of file qwt_data.cpp.

References size().