qxychartseries.h
40 lines
| 907 B
| text/x-c
|
CLexer
Michal Klocek
|
r12 | #ifndef QXYSERIES_H_ | ||
#define QXYSERIES_H_ | ||||
Tero Ahola
|
r19 | |||
Tero Ahola
|
r30 | #include "qchartglobal.h" | ||
Michal Klocek
|
r21 | #include "qchartseries.h" | ||
Michal Klocek
|
r12 | #include <QDebug> | ||
#include <QColor> | ||||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r12 | |||
Tero Ahola
|
r30 | class QTCOMMERCIALCHART_EXPORT QXYChartSeries : public QChartSeries | ||
Michal Klocek
|
r12 | { | ||
Michal Klocek
|
r21 | private: | ||
QXYChartSeries(QObject* parent=0); | ||||
Michal Klocek
|
r12 | public: | ||
Michal Klocek
|
r21 | virtual ~QXYChartSeries(); | ||
//implemented from QChartSeries | ||||
static QXYChartSeries* create(QObject* parent=0); | ||||
Tero Ahola
|
r30 | virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeLine;} | ||
Michal Klocek
|
r21 | |||
Michal Klocek
|
r12 | void add(qreal x, qreal y); | ||
void clear(); | ||||
void setColor(const QColor& color); | ||||
const QColor& color() const { return m_color;} | ||||
int count() const; | ||||
qreal x(int pos) const; | ||||
qreal y(int pos) const; | ||||
Michal Klocek
|
r21 | friend QDebug operator<< (QDebug d, const QXYChartSeries series); | ||
Michal Klocek
|
r12 | |||
private: | ||||
QColor m_color; | ||||
QList<qreal> m_x; | ||||
QList<qreal> m_y; | ||||
}; | ||||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Tero Ahola
|
r19 | |||
Michal Klocek
|
r12 | #endif | ||