##// END OF EJS Templates
Renamed SplinePresenter to SplineChartItem
Renamed SplinePresenter to SplineChartItem

File last commit:

r439:86afa1b4ff5f
r460:c1b7acf3f56f
Show More
qlineseries.h
60 lines | 1.2 KiB | text/x-c | CLexer
#ifndef QLINESERIES_H_
#define QLINESERIES_H_
#include "qchartglobal.h"
#include "qseries.h"
#include <QDebug>
#include <QPen>
#include <QBrush>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QTCOMMERCIALCHART_EXPORT QLineSeries : public QSeries
{
Q_OBJECT
public:
QLineSeries(QObject* parent=0);
virtual ~QLineSeries();
public: // from QChartSeries
virtual QSeriesType type() const {return QSeries::SeriesTypeLine;}
void add(qreal x, qreal y);
void add(const QPointF& point);
void replace(qreal x,qreal y);
void replace(const QPointF& point);
void remove(qreal x);
void remove(const QPointF& point);
void clear();
void setPen(const QPen& pen);
QPen pen() const {return m_pen;}
void setPointsVisible(bool visible);
bool pointsVisible() const {return m_pointsVisible;}
int count() const;
qreal x(int pos) const;
qreal y(int pos) const;
QLineSeries& operator << (const QPointF &point);
friend QDebug operator<< (QDebug d, const QLineSeries series);
signals:
void updated();
void pointReplaced(int index);
void pointRemoved(int index);
void pointAdded(int index);
protected:
QVector<qreal> m_x;
QVector<qreal> m_y;
private:
QPen m_pen;
bool m_pointsVisible;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif