##// END OF EJS Templates
Integrated scatter series...
Integrated scatter series Also implemented optional drawing algorithm of series that uses only paint method of QGraphicsItems.

File last commit:

r38:67e4c740a645
r38:67e4c740a645
Show More
qchart.h
54 lines | 1.4 KiB | text/x-c | CLexer
#ifndef CHART_H
#define CHART_H
#include <qchartglobal.h>
#include <qchartseries.h>
#include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class Axis;
class XYGrid;
class QChartSeries;
class XYPlotDomain;
class QChartPrivate;
// TODO: We don't need to have QChart tied to QGraphicsItem:
//class QTCOMMERCIALCHART_EXPORT QChart
//class QTCOMMERCIALCHART_EXPORT QChartGraphicsItem : public QGraphicsItem {
// public: QChartGraphicsItem(QChart &chart);
/*!
* TODO: define the responsibilities
*/
class QTCOMMERCIALCHART_EXPORT QChart : public QGraphicsItem, public QObject
{
public:
QChart(QGraphicsItem* parent = 0);
virtual ~QChart();
//from QGraphicsItem
virtual QRectF boundingRect() const;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget){};
void addSeries(QChartSeries* series);
//TODO: QChartSeries* createSeries(QSeriesData *data, QChartSeries::QChartSeriesType type);
// TODO: who owns the series now? maybe owned by chart and returned a reference instead...
QChartSeries* createSeries(QList<qreal> x, QList<qreal> y, QChartSeries::QChartSeriesType type);
virtual void setSize(const QSizeF& rect);
void setMargin(int margin);
int margin() const;
protected:
QChartPrivate * const d_ptr;
private:
Q_DISABLE_COPY(QChart)
Q_DECLARE_PRIVATE(QChart)
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif