##// END OF EJS Templates
Fix test application to have valid window size
Fix test application to have valid window size

File last commit:

r13:335e8906dfcb
r147:ede69107bdd8
Show More
qscatterseries.cpp
30 lines | 817 B | text/x-c | CppLexer
#include "qscatterseries.h"
#include "qseriespointgraphicsitem.h"
#include <QPainter>
#include <QGraphicsScene>
QScatterSeries::QScatterSeries(QGraphicsItem *parent) :
QGraphicsItem(parent)
{
}
QRectF QScatterSeries::boundingRect() const
{
return QRectF(0, 50, 100, 100);
}
void QScatterSeries::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
// painter->drawRect(boundingRect());
}
void QScatterSeries::setData(QList<QChartDataPoint> data)
//void QScatterSeries::setData(QList<int> data)
{
foreach(QChartDataPoint point, data) {
// TODO: ownership?
// TODO: position
QSeriesPointGraphicsItem *item = new QSeriesPointGraphicsItem(
point[0].toReal(), 100-point[1].toReal(), this);
}
}