##// END OF EJS Templates
Adds force option to chartTheme...
Adds force option to chartTheme * adds missing pen to QLegend * adds missing getters pen,brush from qcharts * renames set getters for titile and background in qchart

File last commit:

r311:e1f0c8c24a70
r645:9b55fd85f9c4
Show More
plugin.cpp
35 lines | 1.2 KiB | text/x-c | CppLexer
#include <QtDeclarative/qdeclarativeextensionplugin.h>
#include <QtDeclarative/qdeclarative.h>
#include "declarativechart.h"
#include "scatterelement.h"
#include "declarativescatterseries.h"
#include "declarativelineseries.h"
#include "declarativepieseries.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class ChartQmlPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
public:
virtual void registerTypes(const char *uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart"));
qmlRegisterType<DeclarativeChart>(uri, 1, 0, "Chart");
qmlRegisterType<DeclarativeScatterSeries>(uri, 1, 0, "ScatterSeries");
qmlRegisterType<DeclarativeLineSeries>(uri, 1, 0, "LineSeries");
qmlRegisterType<DeclarativePieSeries>(uri, 1, 0, "PieSeries");
qmlRegisterType<QPieSlice>(uri, 1, 0, "ChartPieElement");
// TODO: rename ScatterElement class to something like "PointElement"
qmlRegisterType<ScatterElement>(uri, 1, 0, "ChartPointElement");
}
};
#include "plugin.moc"
QTCOMMERCIALCHART_END_NAMESPACE
QTCOMMERCIALCHART_USE_NAMESPACE
Q_EXPORT_PLUGIN2(qtcommercialchartqml, QT_PREPEND_NAMESPACE(ChartQmlPlugin))