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

File last commit:

r793:dbc1daf2590a
r828:efd18f904bfe
Show More
declarativescatterseries.cpp
38 lines | 1.1 KiB | text/x-c | CppLexer
/ qmlplugin / declarativescatterseries.cpp
Tero Ahola
Proposal for QML data API
r196 #include "declarativescatterseries.h"
#include "declarativechart.h"
#include "qchart.h"
#include "qscatterseries.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Tero Ahola
Declarative series classed now derived from QSeries childs
r789 DeclarativeScatterSeries::DeclarativeScatterSeries(QObject *parent) :
QScatterSeries(parent)
Tero Ahola
Proposal for QML data API
r196 {
Tero Ahola
Declarative series classed now derived from QSeries childs
r789 }
Tero Ahola
Refactoring declarative xy series
r793 void DeclarativeScatterSeries::componentComplete()
Tero Ahola
Declarative series classed now derived from QSeries childs
r789 {
DeclarativeChart *declarativeChart = qobject_cast<DeclarativeChart *>(parent());
if (declarativeChart) {
QChart *chart = qobject_cast<QChart *>(declarativeChart->m_chart);
Q_ASSERT(chart);
qDebug() << "chart:" << chart;
chart->addSeries(this);
}
}
QDeclarativeListProperty<DeclarativeXyPoint> DeclarativeScatterSeries::points()
{
Tero Ahola
Refactoring declarative xy series
r793 return QDeclarativeListProperty<DeclarativeXyPoint>(this, 0, &DeclarativeXySeries::appendPoints);
Tero Ahola
Declarative series classed now derived from QSeries childs
r789 }
void DeclarativeScatterSeries::appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
DeclarativeXyPoint *element)
{
DeclarativeXySeries::appendPoints(list, element);
Tero Ahola
Proposal for QML data API
r196 }
#include "moc_declarativescatterseries.cpp"
QTCOMMERCIALCHART_END_NAMESPACE