2
* Copyright 2015 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Christian Dywan <christian.dywan@canonical.com>
25
#include <QtQuick/private/qquickimagebase_p.h>
27
static QObject *registerPangaea(QQmlEngine *engine, QJSEngine *scriptEngine)
30
Q_UNUSED(scriptEngine)
32
return new EAPangaea();
35
static QObject *registerPangaea4(QQmlEngine *engine, QJSEngine *scriptEngine)
38
Q_UNUSED(scriptEngine)
40
return new EAPangaea4();
43
void ExtinctAnimalsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
49
void ExtinctAnimalsPlugin::registerTypes(const char *uri)
51
Q_ASSERT(uri == QLatin1String("Extinct.Animals"));
53
qmlRegisterType<EASmilodon>(uri, 1, 0, "Smilodon");
54
qmlRegisterType<EASmilodon>(uri, 0, 1, "ScimitarCat");
56
qmlRegisterType(QUrl(baseUrl().toString() + "/Andrewsarchus.qml"), uri, 0, 1, "Andrewsarchus");
57
// The second call overrrides the previous one, only the last version will show up
58
qmlRegisterType(QUrl(baseUrl().toString() + "/Paratriisodon.qml"), uri, 2, 0, "Andrewsarchus");
60
qmlRegisterType(QUrl("qrc:///ea/Paratriisodon.qml"), uri, 2, 3, "AndrewsarchusMongoliensis");
61
// The second call overrrides the previous one, only the last version will show up
62
qmlRegisterType(QUrl("qrc:///ea/Paratriisodon.qml"), uri, 2, 4, "AndrewsarchusMongoliensis");
64
qmlRegisterSingletonType<EAPangaea>(uri, 1, 0, "Pangaea", registerPangaea);
65
qmlRegisterSingletonType<EAPangaea4>(uri, 4, 0, "Pangaea", registerPangaea4);
67
qmlRegisterUncreatableType<EAEurope>(uri, 4, 1, "Europe", "");
68
qmlRegisterUncreatableType<EAEurope42, 1>(uri, 4, 2, "Europe", "");
70
qmlRegisterExtendedType<QQuickImageBase, UCQQuickImageExtension>(uri, 3, 3, "QQuickImageBase");