KQuickCharts
8#include "ArraySource.h"
15int ArraySource::itemCount()
const
17 return m_array.count();
20QVariant ArraySource::item(
int index)
const
22 if (!m_wrap && (index < 0 || index > m_array.count() - 1)) {
26 return m_array.at(index % m_array.count());
31 auto itr = std::min_element(m_array.cbegin(), m_array.cend(), variantCompare);
32 if (itr != m_array.cend()) {
40 auto itr = std::max_element(m_array.cbegin(), m_array.cend(), variantCompare);
41 if (itr != m_array.cend()) {
47QVariantList ArraySource::array()
const
52bool ArraySource::wrap()
const
57void ArraySource::setArray(
const QVariantList &array)
59 if (m_array == array) {
67void ArraySource::setWrap(
bool wrap)
77#include "moc_ArraySource.cpp"
ArraySource(QObject *parent=nullptr)
Constructor.
Abstract base class for data sources.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:57 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.