QScatterDataProxy Class

Base proxy class for Q3DScatter. More...

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

QItemModelScatterDataProxy

Properties

Public Functions

QScatterDataProxy(QObject *parent = Q_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)

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)

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

Base proxy class for Q3DScatter.

QScatterDataProxy handles adding, inserting, changing, and removing data items.

QScatterDataProxy takes ownership of all QScatterDataArrays and QScatterDataItems passed to it.

See also Qt Data Visualization Data Handling.

Property Documentation

itemCount : const int

Returns item count in the array.

Access functions:

int itemCount() const

Notifier signal:

void itemCountChanged(int count)

series : QScatter3DSeries * const

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 = Q_NULLPTR)

Constructs QScatterDataProxy with the given parent.

[virtual] QScatterDataProxy::~QScatterDataProxy()

Destroys QScatterDataProxy.

int QScatterDataProxy::addItem(const QScatterDataItem &item)

Adds a single item to the end of the array.

Returns index of the added item.

int QScatterDataProxy::addItems(const QScatterDataArray &items)

Adds items to the end of the array.

Returns index of the first added item.

const QScatterDataArray *QScatterDataProxy::array() const

Returns pointer to the data array.

[signal] void QScatterDataProxy::arrayReset()

Emitted when data array is reset. If you change the whole array contents without calling resetArray(), you need to emit this signal yourself or the graph won't get updated.

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

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

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

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

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

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

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

Emitted when items have been added. Provides startIndex and count of items added. If you add items directly to the array without calling addItem() or addItems(), you need to emit this signal yourself or the graph won't get updated.

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

Emitted when items have changed. Provides startIndex and count of changed items. If you change items directly in the array without calling setItem() or setItems(), you need to emit this signal yourself or the graph won't get updated.

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

Emitted when items have been inserted. Provides startIndex and count of inserted items. If you insert items directly into the array without calling insertItem() or insertItems(), you need to emit this signal yourself or the graph won't get updated.

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

Emitted when items have been removed. Provides startIndex and count of items removed. Index may be over current array size if removed from end. If you remove items directly from the array without calling removeItems(), you need to emit this signal yourself or the graph won't get updated.

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

Removes removeCount items starting from index. Attempting to remove items past the end of the array does nothing.

void QScatterDataProxy::resetArray(QScatterDataArray *newArray)

Takes ownership of the newArray. Clears the existing array if the newArray is different from the existing array. If it's the same array, this just triggers arrayReset() signal. Passing a null array deletes the old array and creates a new empty array.

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

Changes a single item at index with item.

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

Changes items starting from index with items.

Related Non-Members

typedef QtDataVisualization::QScatterDataArray

A vector of QScatterDataItems.

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.