Qwt User's Guide: QwtArraySeriesData< T > Class Template Reference

Qwt User's Guide 6.1.5

Public Member Functions | Protected Attributes | List of all members
QwtArraySeriesData< T > Class Template Reference

Template class for data, that is organized as QVector. More...

`#include <qwt_series_data.h>`

Inheritance diagram for QwtArraySeriesData< T >:
[legend]

## Public Member Functions
| QwtArraySeriesData ()
| Constructor.
| QwtArraySeriesData (const QVector< T > &samples)
void | setSamples (const QVector< T > &samples)
const QVector< T > | samples () const
virtual size_t | size () const
virtual T | sample (size_t index) const
Public Member Functions inherited from QwtSeriesData< T >
| QwtSeriesData ()
| Constructor.
virtual | ~QwtSeriesData ()
| Destructor.
virtual QRectF | boundingRect () const =0
virtual void | setRectOfInterest (const QRectF &rect)

## Protected Attributes
QVector< T > | d_samples
| Vector of samples.
Protected Attributes inherited from QwtSeriesData< T >
QRectF | d_boundingRect
| Can be used to cache a calculated bounding rectangle.

## Detailed Description

### template<typename T>
class QwtArraySeriesData< T >

Template class for data, that is organized as QVector.

QVector uses implicit data sharing and can be passed around as argument efficiently.

## Constructor & Destructor Documentation

## ◆ QwtArraySeriesData()

template<typename T>

QwtArraySeriesData< T >::QwtArraySeriesData | ( | const QVector< T > & | samples | ) |

Constructor

Parameters

  samples | Array of samples

## Member Function Documentation

## ◆ sample()

template<typename T >

T QwtArraySeriesData< T >::sample | ( | size_t | index | ) | const
| virtual

Returns
  Sample at a specific position

Parameters

  index | Index

Returns
  Sample at position index

Implements QwtSeriesData< T >.

## ◆ samples()

template<typename T >

const QVector< T > QwtArraySeriesData< T >::samples | ( |  | ) | const

Returns
  Array of samples

## ◆ setSamples()

template<typename T>

void QwtArraySeriesData< T >::setSamples | ( | const QVector< T > & | samples | ) |

Assign an array of samples

Parameters

  samples | Array of samples

## ◆ size()

template<typename T >

size_t QwtArraySeriesData< T >::size | ( |  | ) | const
| virtual

Returns
  Number of samples

Implements QwtSeriesData< T >.