##// END OF EJS Templates
Work-around for QML drawing issue
Work-around for QML drawing issue

File last commit:

r168:23b5a494bf5a
r199:12a66e29cabc
Show More
declarativechart.cpp
27 lines | 705 B | text/x-c | CppLexer
/ qmlplugin / declarativechart.cpp
Jani Honkonen
First draft of project structure
r1 #include "declarativechart.h"
Tero Ahola
Proof-of-concept for QML api...
r120 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Jani Honkonen
First draft of project structure
r1 DeclarativeChart::DeclarativeChart(QDeclarativeItem *parent)
Tero Ahola
Proof-of-concept for QML api...
r120 : QDeclarativeItem(parent),
m_chart(new QChart(this))
Jani Honkonen
First draft of project structure
r1 {
setFlag(QGraphicsItem::ItemHasNoContents, false);
Tero Ahola
Fixed regression in declarative impl
r168 // m_chart->setMargin(50); // TODO: should not be needed?
Jani Honkonen
First draft of project structure
r1 }
Tero Ahola
Proof-of-concept for QML api...
r120 DeclarativeChart::ChartTheme DeclarativeChart::theme()
{
if (m_chart)
Michal Klocek
minor. compilation fix for test widget
r154 return (ChartTheme) m_chart->chartTheme();
Jani Honkonen
First draft of project structure
r1 }
Tero Ahola
Proof-of-concept for QML api...
r120 void DeclarativeChart::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
Jani Honkonen
First draft of project structure
r1 {
Tero Ahola
Fixed regression in declarative impl
r168 if (newGeometry.isValid())
m_chart->resize(newGeometry.width(), newGeometry.height());
Jani Honkonen
First draft of project structure
r1 }
Tero Ahola
Proof-of-concept for QML api...
r120 #include "moc_declarativechart.cpp"
QTCOMMERCIALCHART_END_NAMESPACE