#include "declarativesplineseries.h" #include "declarativechart.h" #include "qchart.h" QTCOMMERCIALCHART_BEGIN_NAMESPACE DeclarativeSplineSeries::DeclarativeSplineSeries(QObject *parent) : QSplineSeries(parent) { } void DeclarativeSplineSeries::componentComplete() { DeclarativeChart *declarativeChart = qobject_cast(parent()); if (declarativeChart) { QChart *chart = qobject_cast(declarativeChart->m_chart); Q_ASSERT(chart); chart->addSeries(this); } } QDeclarativeListProperty DeclarativeSplineSeries::points() { return QDeclarativeListProperty(this, 0, &DeclarativeXySeries::appendPoints); } void DeclarativeSplineSeries::appendPoints(QDeclarativeListProperty *list, DeclarativeXyPoint *element) { DeclarativeXySeries::appendPoints(list, element); } #include "moc_declarativesplineseries.cpp" QTCOMMERCIALCHART_END_NAMESPACE