##// END OF EJS Templates
Refactor current draft to fit int current design specs...
Refactor current draft to fit int current design specs * fixes compilation errors * adds QChartSeries * adds QXYChartSeries * adds QXYLineChartItem * fixes xylinechart example to use QChartWidget

File last commit:

r19:b231f8e5fa43
r21:f4dbcb0551ab
Show More
qchartgraphicswidget.cpp
41 lines | 825 B | text/x-c | CppLexer
/ src / xylinechart / qchartgraphicswidget.cpp
#include "qchartgraphicswidget.h"
#include "qchart.h"
QCHART_BEGIN_NAMESPACE
class QChartGraphicsWidgetPrivate
{
public:
QChart* chart;
//Q_DECLARE_PUBLIC(ChartWidget)
QChartGraphicsWidgetPrivate() {}
};
////////////////////////////////////////////////////////////////////////////
QChartGraphicsWidget::QChartGraphicsWidget(QGraphicsItem *parent,Qt::WindowFlags wFlags)
: QGraphicsWidget(parent,wFlags),
d_ptr(new QChartGraphicsWidgetPrivate())
{
}
QChartGraphicsWidget::~QChartGraphicsWidget()
{
delete d_ptr;
}
void QChartGraphicsWidget::addChart(QChart *chart)
{
d_ptr->chart=chart;
chart->setParentItem(this);
}
void QChartGraphicsWidget::setGeometry(const QRectF & rect)
{
d_ptr->chart->setSize(rect.size());
QGraphicsWidget::setGeometry(rect);
}
QCHART_END_NAMESPACE