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