File indexing completed on 2024-12-15 03:45:05

0001 /*
0002     SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: MIT
0005 */
0006 
0007 #include "qmlplugin.h"
0008 #include "qmldatasources.h"
0009 #include "qmlpropertysource.h"
0010 #include "qmlpropertyratiosource.h"
0011 #include "qmlproviderextension.h"
0012 
0013 #include <auditloguicontroller.h>
0014 #include <feedbackconfiguicontroller.h>
0015 #include <provider.h>
0016 #include <surveyinfo.h>
0017 
0018 #include <QQmlEngine>
0019 
0020 using namespace KUserFeedback;
0021 
0022 void QmlPlugin::registerTypes(const char* uri)
0023 {
0024     qmlRegisterExtendedType<Provider, QmlProviderExtension>(uri, 1, 0, "Provider");
0025 
0026     qmlRegisterUncreatableType<QmlAbstractDataSource>(uri, 1, 0, "AbstractDataSource", QStringLiteral("abstract base class"));
0027     qmlRegisterType<QmlApplicationVersionSource>(uri, 1, 0, "ApplicationVersionSource");
0028     qmlRegisterType<QmlCompilerInfoSource>(uri, 1, 0, "CompilerInfoSource");
0029     qmlRegisterType<QmlCpuInfoSource>(uri, 1, 0, "CpuInfoSource");
0030     qmlRegisterType<QmlLocaleInfoSource>(uri, 1, 0, "LocaleInfoSource");
0031     qmlRegisterType<QmlOpenGLInfoSource>(uri, 1, 0, "OpenGLInfoSource");
0032     qmlRegisterType<QmlPlatformInfoSource>(uri, 1, 0, "PlatformInfoSource");
0033     qmlRegisterType<QmlQPAInfoSource>(uri, 1, 0, "QPAInfoSource");
0034     qmlRegisterType<QmlQtVersionSource>(uri, 1, 0, "QtVersionSource");
0035     qmlRegisterType<QmlScreenInfoSource>(uri, 1, 0, "ScreenInfoSource");
0036     qmlRegisterType<QmlStartCountSource>(uri, 1, 0, "StartCountSource");
0037     qmlRegisterType<QmlUsageTimeSource>(uri, 1, 0, "UsageTimeSource");
0038     qmlRegisterType<QmlPropertySource>(uri, 1, 0, "PropertySource");
0039     qmlRegisterType<QmlPropertyRatioSource>(uri, 1, 0, "PropertyRatioSource");
0040 
0041     qmlRegisterType<AuditLogUiController>(uri, 1, 0, "AuditLogUiController");
0042     qmlRegisterType<FeedbackConfigUiController>(uri, 1, 0, "FeedbackConfigUiController");
0043 
0044     qRegisterMetaType<SurveyInfo>();
0045 }
0046 
0047 #include "moc_qmlplugin.cpp"