Qt 5.11 | Qt Data Visualization | C++ Classes | QScatterDataProxy

Qt Data Visualization | Commercial or GPLv3

# QScatterDataProxy Class

The QScatterDataProxy class is the data proxy for 3D scatter graphs. More...

Header: | #include <QScatterDataProxy>
Since: | QtDataVisualization 1.0
Instantiated By: | ScatterDataProxy
Inherits: | QAbstractDataProxy
Inherited By: | QItemModelScatterDataProxy

- List of all members, including inherited members

## Properties

- itemCount : const int
- series : QScatter3DSeries* const

- 1 property inherited from QAbstractDataProxy

## Public Functions

| QScatterDataProxy(QObject *parent = nullptr)
virtual | ~QScatterDataProxy()
int | addItem(const QScatterDataItem &item)
int | addItems(const QScatterDataArray &items)
const QScatterDataArray * | array() const
void | insertItem(int index, const QScatterDataItem &item)
void | insertItems(int index, const QScatterDataArray &items)
const QScatterDataItem * | itemAt(int index) const
int | itemCount() const
void | removeItems(int index, int removeCount)
void | resetArray(QScatterDataArray *newArray)
QScatter3DSeries * | series() const
void | setItem(int index, const QScatterDataItem &item)
void | setItems(int index, const QScatterDataArray &items)

- 1 public function inherited from QAbstractDataProxy

## Signals

void | arrayReset()
void | itemCountChanged(int count)
void | itemsAdded(int startIndex, int count)
void | itemsChanged(int startIndex, int count)
void | itemsInserted(int startIndex, int count)
void | itemsRemoved(int startIndex, int count)
void | seriesChanged(QScatter3DSeries *series)

## Related Non-Members

typedef | QScatterDataArray

## Detailed Description

The QScatterDataProxy class is the data proxy for 3D scatter graphs.

A scatter data proxy handles adding, inserting, changing, and removing data items.

QScatterDataProxy takes ownership of all QtDataVisualization::QScatterDataArray and QScatterDataItem objects passed to it.

See also Qt Data Visualization Data Handling.

## Property Documentation

### itemCount : const int

This property holds the number of items in the array.

Access functions:

int | itemCount() const

Notifier signal:

void | itemCountChanged(int count)

### series : QScatter3DSeries* const

This property holds the series this proxy is attached to.

Access functions:

QScatter3DSeries * | series() const

Notifier signal:

void | seriesChanged(QScatter3DSeries *series)

## Member Function Documentation

### QScatterDataProxy::QScatterDataProxy(QObject *parent = nullptr)

Constructs QScatterDataProxy with the given parent.

### `[virtual]` QScatterDataProxy::~QScatterDataProxy()

Deletes the scatter data proxy.

### int QScatterDataProxy::addItem(const QScatterDataItem &item)

Adds the item item to the end of the array.

Returns the index of the added item.

### int QScatterDataProxy::addItems(const QScatterDataArray &items)

Adds the items specified by items to the end of the array.

Returns the index of the first added item.

### const QScatterDataArray *QScatterDataProxy::array() const

Returns the pointer to the data array.

### `[signal]` void QScatterDataProxy::arrayReset()

### void QScatterDataProxy::insertItem(int index, const QScatterDataItem &item)

Inserts the item item to the position index. If the index is equal to the data array size, the item is added to the array.

### void QScatterDataProxy::insertItems(int index, const QScatterDataArray &items)

Inserts the items specified by items to the position index. If the index is equal to data array size, the items are added to the array.

### const QScatterDataItem *QScatterDataProxy::itemAt(int index) const

Returns the pointer to the item at the index index. It is guaranteed to be valid only until the next call that modifies data.

### `[signal]` void QScatterDataProxy::itemsAdded(int startIndex, int count)

### `[signal]` void QScatterDataProxy::itemsChanged(int startIndex, int count)

### `[signal]` void QScatterDataProxy::itemsInserted(int startIndex, int count)

### `[signal]` void QScatterDataProxy::itemsRemoved(int startIndex, int count)

### void QScatterDataProxy::removeItems(int index, int removeCount)

Removes the number of items specified by removeCount starting at the position index. Attempting to remove items past the end of the array does nothing.

### void QScatterDataProxy::resetArray(QScatterDataArray *newArray)

Takes ownership of the array newArray. Clears the existing array if the new array differs from it. If the arrays are the same, this function just triggers the arrayReset() signal.

Passing a null array deletes the old array and creates a new empty array.

### void QScatterDataProxy::setItem(int index, const QScatterDataItem &item)

Replaces the item at the position index with the item item.

### void QScatterDataProxy::setItems(int index, const QScatterDataArray &items)

Replaces the items starting from the position index with the items specified by items.

## Related Non-Members

### typedef QScatterDataArray

A vector of QScatterDataItem objects.