qlineseries.h
52 lines
| 1.1 KiB
| text/x-c
|
CLexer
|
r360 | #ifndef QLINESERIES_H_ | ||
#define QLINESERIES_H_ | ||||
|
r19 | |||
|
r30 | #include "qchartglobal.h" | ||
|
r360 | #include "qseries.h" | ||
|
r12 | #include <QDebug> | ||
|
r85 | #include <QPen> | ||
#include <QBrush> | ||||
|
r12 | |||
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
|
r12 | |||
|
r360 | class QTCOMMERCIALCHART_EXPORT QLineSeries : public QSeries | ||
|
r12 | { | ||
|
r131 | Q_OBJECT | ||
|
r12 | public: | ||
|
r349 | QLineSeries(QObject* parent=0); | ||
virtual ~QLineSeries(); | ||||
|
r21 | |||
|
r108 | public: // from QChartSeries | ||
|
r360 | virtual QSeriesType type() const { return QSeries::SeriesTypeLine;} | ||
|
r348 | 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); | ||||
|
r12 | void clear(); | ||
|
r85 | |||
void setPen(const QPen& pen); | ||||
|
r331 | QPen pen() const { return m_pen;} | ||
|
r85 | |||
|
r186 | void setPointsVisible(bool visible); | ||
|
r367 | bool pointsVisible() const {return m_pointsVisible;} | ||
|
r185 | |||
|
r12 | int count() const; | ||
qreal x(int pos) const; | ||||
qreal y(int pos) const; | ||||
|
r349 | friend QDebug operator<< (QDebug d, const QLineSeries series); | ||
|
r12 | |||
|
r131 | signals: | ||
void changed(int index); | ||||
|
r12 | private: | ||
|
r131 | QVector<qreal> m_x; | ||
QVector<qreal> m_y; | ||||
|
r85 | QPen m_pen; | ||
|
r185 | bool m_pointsVisible; | ||
|
r12 | }; | ||
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
|
r19 | |||
|
r12 | #endif | ||