##// END OF EJS Templates
Make stackedbarchartdrilldown compile
Make stackedbarchartdrilldown compile

File last commit:

r793:dbc1daf2590a
r829:f9360d7ac284
Show More
declarativelineseries.cpp
37 lines | 1006 B | text/x-c | CppLexer
/ qmlplugin / declarativelineseries.cpp
Tero Ahola
Dynamic data for QML pie and line series
r215 #include "declarativelineseries.h"
#include "declarativechart.h"
#include "qchart.h"
Michal Klocek
Rename QLineChartSeries to QLineSeries
r349 #include "qlineseries.h"
Tero Ahola
Dynamic data for QML pie and line series
r215
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Tero Ahola
Declarative series classed now derived from QSeries childs
r789 DeclarativeLineSeries::DeclarativeLineSeries(QObject *parent) :
QLineSeries(parent)
Tero Ahola
Dynamic data for QML pie and line series
r215 {
}
Tero Ahola
Refactoring declarative xy series
r793 void DeclarativeLineSeries::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);
chart->addSeries(this);
}
}
QDeclarativeListProperty<DeclarativeXyPoint> DeclarativeLineSeries::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 DeclarativeLineSeries::appendPoints(QDeclarativeListProperty<DeclarativeXyPoint> *list,
DeclarativeXyPoint *element)
{
DeclarativeXySeries::appendPoints(list, element);
}
Tero Ahola
Dynamic data for QML pie and line series
r215 #include "moc_declarativelineseries.cpp"
QTCOMMERCIALCHART_END_NAMESPACE