qchartseries.cpp
34 lines
| 849 B
| text/x-c
|
CppLexer
/ src / qchartseries.cpp
sauimone
|
r62 | #include "qchartglobal.h" | ||
#include "qchartseries.h" | ||||
#include "barchartseries.h" | ||||
#include "qxychartseries.h" | ||||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
QChartSeries* QChartSeries::create(QChartSeriesType type, QObject* parent) | ||||
{ | ||||
sauimone
|
r71 | qDebug() << "QChartSeries::create"; | ||
sauimone
|
r62 | // TODO: Other types | ||
switch (type) { | ||||
case QChartSeries::SeriesTypeLine: { | ||||
QXYChartSeries* s = QXYChartSeries::create(parent); // TODO: do we need create method for derived implementations? | ||||
return s; | ||||
} | ||||
case QChartSeries::SeriesTypePie: { | ||||
return 0; | ||||
} | ||||
case QChartSeries::SeriesTypeScatter: { | ||||
return 0; | ||||
} | ||||
case QChartSeries::SeriesTypeBar: { | ||||
BarChartSeries* s = new BarChartSeries(parent); | ||||
return s; | ||||
} | ||||
default: | ||||
return 0; | ||||
} | ||||
} | ||||
sauimone
|
r71 | #include "moc_qchartseries.cpp" | ||
sauimone
|
r62 | QTCOMMERCIALCHART_END_NAMESPACE | ||