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