Class DdsDataSource

Inheritance Relationships

Base Type

  • public QObject

Class Documentation

class DdsDataSource : public QObject

Test class to generate artificial data.

This class is used as an artificial data source in conjunction with QtChart data structures. This is probably a reminiscent from code examples.

It can generate a set of data and replace the contents of a QAbstractSeries data structure, which is used by QtChart.

Public Functions

explicit DdsDataSource(QObject *parent = nullptr)



parent[in] QObject pointer.

Public Slots

void generateData(int type, int rowCount, int colCount)

Generates random data.

Creates some phony data.

  • type[in] of data, 0 is sine wave, 1 is linearly increasing.

  • rowCount[in] Number of vectors to create in the list.

  • colCount[in] Number of data points in a vector.

void update(QAbstractSeries *series)

Updates series with next row of data vector.

For each call it takes the next row of data and increments the row index. The index wraps around to 0.


series[inout] Pointer to series to update.

Private Members

QList<QVector<QPointF>> m_data

Container for generated data. List of vectors.

int m_index

Index in list.