##// END OF EJS Templates
Fix bug/typo in chartdataset
Fix bug/typo in chartdataset

File last commit:

r793:dbc1daf2590a
r828:efd18f904bfe
Show More
declarativelineseries.cpp
37 lines | 1006 B | text/x-c | CppLexer
/ qmlplugin / declarativelineseries.cpp
#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<DeclarativeChart *>(parent());
if (declarativeChart) {
QChart *chart = qobject_cast<QChart *>(declarativeChart->m_chart);
Q_ASSERT(chart);
chart->addSeries(this);
}
}
QDeclarativeListProperty<DeclarativeXyPoint> DeclarativeLineSeries::points()
{
return QDeclarativeListProperty<DeclarativeXyPoint>(this, 0, &DeclarativeXySeries::appendPoints);
}
void DeclarativeLineSeries::appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
DeclarativeXyPoint *element)
{
DeclarativeXySeries::appendPoints(list, element);
}
#include "moc_declarativelineseries.cpp"
QTCOMMERCIALCHART_END_NAMESPACE