File indexing completed on 2025-03-09 06:47:47
0001 /* 0002 SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "plugin.h" 0008 0009 #include <QDebug> 0010 #include <QQmlContext> 0011 0012 #include "kdescendantsproxymodel_qml.h" 0013 #include "krolenames.h" 0014 #include "ksortfilterproxymodel.h" 0015 #include <KColumnHeadersModel> 0016 #include <KDescendantsProxyModel> 0017 #include <KNumberModel> 0018 0019 using namespace Qt::StringLiterals; 0020 0021 void Plugin::initializeEngine(QQmlEngine *engine, const char *uri) 0022 { 0023 Q_UNUSED(engine); 0024 Q_UNUSED(uri); 0025 } 0026 0027 void Plugin::registerTypes(const char *uri) 0028 { 0029 qmlRegisterAnonymousType<QAbstractItemModel>(uri, 1); 0030 0031 // 1.0 0032 qmlRegisterType<KDescendantsProxyModelQml>(uri, 1, 0, "KDescendantsProxyModel"); 0033 qmlRegisterType<KNumberModel>(uri, 1, 0, "KNumberModel"); 0034 qmlRegisterType<KColumnHeadersModel>(uri, 1, 0, "KColumnHeadersModel"); 0035 qmlRegisterType<KSortFilterProxyModel>(uri, 1, 0, "KSortFilterProxyModel"); 0036 0037 // 1.1 0038 qmlRegisterUncreatableType<KRoleNames>(uri, 1, 1, "KRoleNames", u"KRoleNames can only be used as an attached property"_s); 0039 } 0040 0041 #include "moc_plugin.cpp"