##// END OF EJS Templates
qdoc for QChartSeries
Tero Ahola -
r309:7038f6582ad4
parent child
Show More
@@ -1,5 +1,49
1 #include "qchartseries.h"
1 #include "qchartseries.h"
2
2
3 /*!
4 \class QChartSeries
5 \brief Base class for all QtCommercial Chart series.
6 \mainclass
7 */
8
9 /*!
10 \enum QChartSeries::QChartSeriesType
11
12 The type of the series object.
13
14 \value SeriesTypeLine
15 \value SeriesTypeArea
16 \value SeriesTypeBar
17 \value SeriesTypeStackedBar
18 \value SeriesTypePercentBar
19 \value SeriesTypePie
20 \value SeriesTypeScatter
21 \value SeriesTypeSpline
22 */
23
24 /*!
25 \fn QChartSeries::QChartSeries(QObject *parent)
26 \brief Constructs ChartSeries object with \a parent.
27 */
28
29 /*!
30 \fn QChartSeries::~QChartSeries()
31 \brief Virtual destructor for the chart series.
32 */
33
34 /*!
35 \fn QChartSeriesType QChartSeries::type() const
36 \brief The type of the series.
37 */
38
39 /*!
40 \fn bool QChartSeries::setModel(QAbstractItemModel *model)
41 \brief Use the \a model to provide data for the series. The model overrides possible user data
42 set with QChartSeries type specific data setters. For example if you call both
43 QScatterSeries::addData() and QScatterSeries::setModel, only the data provided by the model is
44 used by the series. Returns true if the model is valid for the series.
45 */
46
3 QTCOMMERCIALCHART_BEGIN_NAMESPACE
47 QTCOMMERCIALCHART_BEGIN_NAMESPACE
4 #include "moc_qchartseries.cpp"
48 #include "moc_qchartseries.cpp"
5 QTCOMMERCIALCHART_END_NAMESPACE
49 QTCOMMERCIALCHART_END_NAMESPACE
@@ -12,34 +12,26 class QTCOMMERCIALCHART_EXPORT QChartSeries : public QObject
12 Q_OBJECT
12 Q_OBJECT
13 public:
13 public:
14 enum QChartSeriesType {
14 enum QChartSeriesType {
15 SeriesTypeInvalid = -1,
16 SeriesTypeLine,
15 SeriesTypeLine,
17 // SeriesTypeArea,
16 SeriesTypeArea,
18 SeriesTypeBar,
17 SeriesTypeBar,
19 SeriesTypeStackedBar,
18 SeriesTypeStackedBar,
20 SeriesTypePercentBar,
19 SeriesTypePercentBar,
21 SeriesTypePie,
20 SeriesTypePie,
22 SeriesTypeScatter
21 SeriesTypeScatter,
23 // SeriesTypeSpline
22 SeriesTypeSpline
24 };
23 };
25
24
26 protected:
25 protected:
27 QChartSeries(QObject *parent = 0):QObject(parent){};
26 QChartSeries(QObject *parent = 0) : QObject(parent) {}
28
27
29 public:
28 public:
30 virtual ~QChartSeries(){};
29 virtual ~QChartSeries() {}
31
32 // Pure virtual
33 virtual QChartSeriesType type() const = 0;
30 virtual QChartSeriesType type() const = 0;
34
31 // TODO
35 virtual bool setData(QList<qreal> /*data*/) { return false; }
36 virtual bool setData(QList<qreal> /*x*/, QList<qreal> /*y*/){ return false; }
37
38 // Prototype for data model. TODO: remove the other setData methods and use something like this for now?
39 virtual bool setModel(QAbstractItemModel* /*model*/) { return false; }
32 virtual bool setModel(QAbstractItemModel* /*model*/) { return false; }
40 };
33 };
41
34
42 QTCOMMERCIALCHART_END_NAMESPACE
35 QTCOMMERCIALCHART_END_NAMESPACE
43
36
44 #endif
37 #endif
45
General Comments 0
You need to be logged in to leave comments. Login now