/* SPDX-FileCopyrightText: 2013 Marco Martin SPDX-License-Identifier: LGPL-2.0-or-later */ #include "imageplugin.h" #include #include #include "finder/mediametadatafinder.h" #include "imagebackend.h" #include "provider/packageimageprovider.h" #include "sortingmode.h" #include "utils/maximizedwindowmonitor.h" #include "utils/mediaproxy.h" void ImagePlugin::initializeEngine(QQmlEngine *engine, const char *) { engine->addImageProvider(QStringLiteral("package"), new PackageImageProvider); } void ImagePlugin::registerTypes(const char *uri) { qRegisterMetaType(); // For image preview qRegisterMetaType(); // For image preview qmlRegisterType(uri, 2, 0, "ImageBackend"); qmlRegisterType(uri, 2, 0, "MediaProxy"); qmlRegisterType(uri, 2, 0, "MaximizedWindowMonitor"); qmlRegisterAnonymousType("QAbstractItemModel", 1); const QString reason = QStringLiteral("error: only enums"); qmlRegisterUncreatableMetaObject(Provider::staticMetaObject, uri, 2, 0, "Provider", reason); qmlRegisterUncreatableMetaObject(BackgroundType::staticMetaObject, uri, 2, 0, "BackgroundType", reason); qmlRegisterUncreatableMetaObject(SortingMode::staticMetaObject, uri, 2, 0, "SortingMode", reason); }