Warning, file /libraries/kqtquickcharts/src/chartplugin.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * Copyright 2014 Sebastian Gottfried <sebastiangottfried@web.de> 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Lesser General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2.1 of the License, or (at your option) version 3, or any 0008 * later version accepted by the membership of KDE e.V. (or its 0009 * successor approved by the membership of KDE e.V.), which shall 0010 * act as a proxy defined in Section 6 of version 3 of the license. 0011 * 0012 * This library is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 * Lesser General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Lesser General Public 0018 */ 0019 0020 #include "chartplugin.h" 0021 0022 #include <QQmlEngine> 0023 #include <QAbstractTableModel> 0024 0025 #include "barchartcore.h" 0026 #include "barchartsegment.h" 0027 #include "chartforegroundpainter.h" 0028 #include "chartcore.h" 0029 #include "chartmodel.h" 0030 #include "dimension.h" 0031 #include "linechartcore.h" 0032 #include "linechartbackgroundpainter.h" 0033 #include "linechartpainter.h" 0034 #include "linechartpoint.h" 0035 #include "xychartcore.h" 0036 #include "xychartbackgroundpainter.h" 0037 #include "xychartpainter.h" 0038 #include "xychartpoint.h" 0039 #include "record.h" 0040 0041 void ChartPlugin::registerTypes(const char *uri) 0042 { 0043 Q_ASSERT(uri == QLatin1String("org.kde.charts")); 0044 0045 qmlRegisterType<Dimension>(uri, 0, 1, "Dimension"); 0046 qmlRegisterType<BarChartCore>(uri, 0, 1, "BarChartCore"); 0047 qmlRegisterType<BarChartSegment>(uri, 0, 1, "BarChartSegment"); 0048 qmlRegisterType<ChartCore>(uri, 0, 1, "ChartCore"); 0049 qmlRegisterType<ChartForegroundPainter>(uri, 0, 1, "ChartForegroundPainter"); 0050 qmlRegisterType<LineChartCore>(uri, 0, 1, "LineChartCore"); 0051 qmlRegisterType<LineChartBackgroundPainter>(uri, 0, 1, "LineChartBackgroundPainter"); 0052 qmlRegisterType<LineChartPainter>(uri, 0, 1, "LineChartPainter"); 0053 qmlRegisterType<LineChartPoint>(uri, 0, 1, "LineChartPoint"); 0054 qmlRegisterType<XYChartCore>(uri, 0, 1, "XYChartCore"); 0055 qmlRegisterType<XYChartBackgroundPainter>(uri, 0, 1, "XYChartBackgroundPainter"); 0056 qmlRegisterType<XYChartPainter>(uri, 0, 1, "XYChartPainter"); 0057 qmlRegisterType<XYChartPoint>(uri, 0, 1, "XYChartPoint"); 0058 qmlRegisterType<ChartModel>(uri, 0, 1, "ChartModel"); 0059 qmlRegisterType<Record>(uri, 0, 1, "Record"); 0060 0061 qmlRegisterUncreatableType<QAbstractTableModel>(uri, 0, 1, "QAbstractTableModel", QStringLiteral("abstract class")); 0062 }