The QScatterDataProxy class is the data proxy for 3D scatter graphs. 更多...
头: | #include <QScatterDataProxy> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
qmake: | QT += graphs |
实例化: | ScatterDataProxy |
继承: | QAbstractDataProxy |
继承者: | |
状态: | 技术预览 |
QScatterDataProxy (QObject * parent = nullptr) | |
virtual | ~QScatterDataProxy () override |
int | addItem (QScatterDataItem item ) |
int | addItems (QScatterDataArray 项 ) |
const QScatterDataArray & | array () const |
void | insertItem (int index , QScatterDataItem item ) |
void | insertItems (int index , QScatterDataArray 项 ) |
const QScatterDataItem & | itemAt (int index ) const |
int | itemCount () const |
void | removeItems (int index , int removeCount ) |
void | resetArray () |
void | resetArray (QScatterDataArray newArray ) |
QScatter3DSeries * | series () const |
void | setItem (int index , QScatterDataItem item ) |
void | setItems (int index , QScatterDataArray 项 ) |
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 ) |
QScatterDataArray |
A scatter data proxy handles adding, inserting, changing, and removing data items.
QScatterDataProxy takes ownership of all QtGraphs::QScatterDataArray and QScatterDataItem objects passed to it.
另请参阅 Qt Graphs Data Handling with 3D .
[read-only]
itemCount
: const
int
This property holds the number of items in the array.
访问函数:
int | itemCount () const |
通知程序信号:
void | itemCountChanged (int count ) |
[read-only]
series
:
QScatter3DSeries
* const
This property holds the series this proxy is attached to.
访问函数:
QScatter3DSeries * | series () const |
通知程序信号:
void | seriesChanged (QScatter3DSeries * series ) |
[explicit]
QScatterDataProxy::
QScatterDataProxy
(
QObject
*
parent
= nullptr)
Constructs QScatterDataProxy with the given parent .
[override virtual noexcept]
QScatterDataProxy::
~QScatterDataProxy
()
Deletes the scatter data proxy.
Adds the item item to the end of the array.
Returns the index of the added item.
Adds the items specified by 项 to the end of the array.
Returns the index of the first added item.
Returns the pointer to the data array.
[signal]
void
QScatterDataProxy::
arrayReset
()
This signal is emitted when the data array is reset. If the contents of the whole array are changed without calling resetArray (), this signal needs to be emitted to update the graph.
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.
Inserts the items specified by 项 to the position index . If the index is equal to data array size, the items are added to the array.
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
)
This signal is emitted when the number of items specified by count is added starting at the position startIndex . If items are added to the array without calling addItem () 或 addItems (), this signal needs to be emitted to update the graph.
[signal]
void
QScatterDataProxy::
itemsChanged
(
int
startIndex
,
int
count
)
This signal is emitted when the number of items specified by count is changed starting at the position startIndex . If items are changed in the array without calling setItem () 或 setItems (), this signal needs to be emitted to update the graph.
[signal]
void
QScatterDataProxy::
itemsInserted
(
int
startIndex
,
int
count
)
This signal is emitted when the number of items specified by count is inserted starting at the position startIndex . If items are inserted into the array without calling insertItem () 或 insertItems (), this signal needs to be emitted to update the graph.
[signal]
void
QScatterDataProxy::
itemsRemoved
(
int
startIndex
,
int
count
)
This signal is emitted when the number of rows specified by count is removed starting at the position startIndex . The index may be larger than the current array size if items are removed from the end. If items are removed from the array without calling removeItems (), this signal needs to be emitted to update the graph.
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.
Clears the existing array and triggers the arrayReset () 信号。
Sets the array from newArray . If the new array is equal to the existing one, this function simply triggers the arrayReset () 信号。
Replaces the item at the position index with the item item .
Replaces the items starting from the position index with the items specified by 项 .
[alias]
QScatterDataArray
A list of QScatterDataItem 对象。