##// END OF EJS Templates
Implemented QAbstractSeries::chart()...
Implemented QAbstractSeries::chart() Now you can actuallu use it :) Also implemented some auto tests about it and added some more checks for add/remove series.

File last commit:

r1294:6b4eaf123ca6
r1314:f6f67dde6408
Show More
qxymodelmapper.h
58 lines | 1.3 KiB | text/x-c | CLexer
#ifndef QXYMODELMAPPER_H
#define QXYMODELMAPPER_H
#include "qchartglobal.h"
#include <QObject>
class QAbstractItemModel;
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QXYModelMapperPrivate;
class QXYSeries;
class QTCOMMERCIALCHART_EXPORT QXYModelMapper : public QObject
{
Q_OBJECT
Q_PROPERTY(QXYSeries *series READ series WRITE setSeries)
Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel)
Q_PROPERTY(int first READ first WRITE setFirst)
Q_PROPERTY(int count READ count WRITE setCount)
Q_ENUMS(Qt::Orientation)
public:
QAbstractItemModel* model() const;
void setModel(QAbstractItemModel *model);
QXYSeries* series() const;
void setSeries(QXYSeries *series);
int first() const;
void setFirst(int first);
int count() const;
void setCount(int count);
void reset();
protected:
explicit QXYModelMapper(QObject *parent = 0);
~QXYModelMapper();
Qt::Orientation orientation() const;
void setOrientation(Qt::Orientation orientation);
int xSection() const;
void setXSection(int xSection);
int ySection() const;
void setYSection(int ySection);
protected:
QXYModelMapperPrivate * const d_ptr;
Q_DECLARE_PRIVATE(QXYModelMapper)
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // QXYMODELMAPPER_H