##// END OF EJS Templates
added labels to series, intergrated with test app. minor hack to test app
added labels to series, intergrated with test app. minor hack to test app

File last commit:

r156:68a8d6592838
r167:023d2c8150a8
Show More
qlinechartseries.h
46 lines | 964 B | text/x-c | CLexer
#ifndef QLINECHARTSERIES_H_
#define QLINECHARTSERIES_H_
#include "qchartglobal.h"
#include "qchartseries.h"
#include <QDebug>
#include <QPen>
#include <QBrush>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QTCOMMERCIALCHART_EXPORT QLineChartSeries : public QChartSeries
{
Q_OBJECT
public:
QLineChartSeries(QObject* parent=0);
virtual ~QLineChartSeries();
public: // from QChartSeries
virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeLine;}
public:
int add(qreal x, qreal y);
void set(int index,qreal x,qreal y);
void clear();
void setPen(const QPen& pen);
const QPen& pen() const { return m_pen;}
int count() const;
qreal x(int pos) const;
qreal y(int pos) const;
friend QDebug operator<< (QDebug d, const QLineChartSeries series);
signals:
void changed(int index);
private:
QVector<qreal> m_x;
QVector<qreal> m_y;
QPen m_pen;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif