qlinechartseries.h
48 lines
| 1.1 KiB
| text/x-c
|
CLexer
Michal Klocek
|
r144 | #ifndef QLINECHARTSERIES_H_ | ||
#define QLINECHARTSERIES_H_ | ||||
Tero Ahola
|
r19 | |||
Tero Ahola
|
r30 | #include "qchartglobal.h" | ||
Michal Klocek
|
r21 | #include "qchartseries.h" | ||
Michal Klocek
|
r12 | #include <QDebug> | ||
Michal Klocek
|
r85 | #include <QPen> | ||
#include <QBrush> | ||||
Michal Klocek
|
r12 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
Michal Klocek
|
r12 | |||
Michal Klocek
|
r144 | class QTCOMMERCIALCHART_EXPORT QLineChartSeries : public QChartSeries | ||
Michal Klocek
|
r12 | { | ||
Michal Klocek
|
r131 | Q_OBJECT | ||
Michal Klocek
|
r12 | public: | ||
Michal Klocek
|
r156 | QLineChartSeries(QObject* parent=0); | ||
Michal Klocek
|
r144 | virtual ~QLineChartSeries(); | ||
Michal Klocek
|
r21 | |||
Tero Ahola
|
r108 | public: // from QChartSeries | ||
Tero Ahola
|
r30 | virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeLine;} | ||
Michal Klocek
|
r131 | int add(qreal x, qreal y); | ||
void set(int index,qreal x,qreal y); | ||||
Michal Klocek
|
r12 | void clear(); | ||
Michal Klocek
|
r85 | |||
void setPen(const QPen& pen); | ||||
const QPen& pen() const { return m_pen;} | ||||
Michal Klocek
|
r186 | void setPointsVisible(bool visible); | ||
Michal Klocek
|
r185 | bool isPointsVisible() const {return m_pointsVisible;} | ||
Michal Klocek
|
r12 | int count() const; | ||
qreal x(int pos) const; | ||||
qreal y(int pos) const; | ||||
Michal Klocek
|
r144 | friend QDebug operator<< (QDebug d, const QLineChartSeries series); | ||
Michal Klocek
|
r12 | |||
Michal Klocek
|
r131 | signals: | ||
void changed(int index); | ||||
Michal Klocek
|
r12 | private: | ||
Michal Klocek
|
r131 | QVector<qreal> m_x; | ||
QVector<qreal> m_y; | ||||
Michal Klocek
|
r85 | QPen m_pen; | ||
Michal Klocek
|
r185 | bool m_pointsVisible; | ||
Michal Klocek
|
r12 | }; | ||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_END_NAMESPACE | ||
Tero Ahola
|
r19 | |||
Michal Klocek
|
r12 | #endif | ||