File indexing completed on 2022-11-29 13:02:26

0001 /*
0002     SPDX-FileCopyrightText: 2012, 2013, 2014, 2015 Ivan Cukic <ivan.cukic(at)kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "activitiesextensionplugin.h"
0008 
0009 #include "activityinfo.h"
0010 #include "activitymodel.h"
0011 #include "resourceinstance.h"
0012 
0013 // #include "resourcemodel.h"
0014 
0015 // TODO: Clean up unused classes from the imports module
0016 
0017 // TODO: Since plasma is now dealing with activity model wallpapers,
0018 //       replace ActivityModel with the KActivities::ActivitiesModel
0019 //       (but keep the name)
0020 
0021 ActivitiesExtensionPlugin::ActivitiesExtensionPlugin(QObject *parent)
0022     : QQmlExtensionPlugin(parent)
0023 {
0024 }
0025 
0026 void ActivitiesExtensionPlugin::registerTypes(const char *uri)
0027 {
0028     Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.activities"));
0029 
0030     // Used by applets/activitybar
0031     qmlRegisterType<KActivities::Imports::ActivityModel>(uri, 0, 1, "ActivityModel");
0032 
0033     qmlRegisterType<KActivities::Imports::ActivityInfo>(uri, 0, 1, "ActivityInfo");
0034     qmlRegisterType<KActivities::Imports::ResourceInstance>(uri, 0, 1, "ResourceInstance");
0035 
0036     // This one is removed in favor of KActivities::Stats::ResultModel.
0037     // Subclass it, and make it do what you want.
0038     // qmlRegisterType<KActivities::Imports::ResourceModel>(uri, 0, 1, "ResourceModel");
0039 }