qxychartseries.h
45 lines
| 936 B
| text/x-c
|
CLexer
|
r12 | #ifndef QXYSERIES_H_ | ||
#define QXYSERIES_H_ | ||||
|
r19 | |||
|
r30 | #include "qchartglobal.h" | ||
|
r21 | #include "qchartseries.h" | ||
|
r12 | #include <QDebug> | ||
|
r85 | #include <QPen> | ||
#include <QBrush> | ||||
|
r12 | |||
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r12 | |||
|
r30 | class QTCOMMERCIALCHART_EXPORT QXYChartSeries : public QChartSeries | ||
|
r12 | { | ||
|
r62 | //TODO: | ||
// Q_OBJECT | ||||
|
r21 | private: | ||
QXYChartSeries(QObject* parent=0); | ||||
|
r12 | public: | ||
|
r21 | virtual ~QXYChartSeries(); | ||
|
r108 | public: // from QChartSeries | ||
|
r21 | static QXYChartSeries* create(QObject* parent=0); | ||
|
r30 | virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeLine;} | ||
|
r21 | |||
|
r108 | public: | ||
|
r12 | void add(qreal x, qreal y); | ||
void clear(); | ||||
|
r85 | |||
void setPen(const QPen& pen); | ||||
const QPen& pen() const { return m_pen;} | ||||
|
r12 | int count() const; | ||
qreal x(int pos) const; | ||||
qreal y(int pos) const; | ||||
|
r21 | friend QDebug operator<< (QDebug d, const QXYChartSeries series); | ||
|
r12 | |||
private: | ||||
QList<qreal> m_x; | ||||
QList<qreal> m_y; | ||||
|
r85 | QPen m_pen; | ||
|
r12 | }; | ||
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r19 | |||
|
r12 | #endif | ||