File indexing completed on 2024-05-12 11:55:20
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 "ksortfilterproxymodel.h" 0013 #include <KColumnHeadersModel> 0014 #include <KDescendantsProxyModel> 0015 #include <KNumberModel> 0016 #if KITEMMODELS_BUILD_DEPRECATED_SINCE(5, 80) 0017 #include "kconcatenaterowsproxymodel_qml.h" 0018 #endif 0019 #include "kdescendantsproxymodel_qml.h" 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 #if KITEMMODELS_BUILD_DEPRECATED_SINCE(5, 80) 0031 qmlRegisterExtendedType<KConcatenateRowsProxyModel, KConcatenateRowsProxyModelQml>(uri, 1, 0, "KConcatenateRowsProxyModel"); 0032 #endif 0033 qmlRegisterType<KDescendantsProxyModelQml>(uri, 1, 0, "KDescendantsProxyModel"); 0034 qmlRegisterType<KNumberModel>(uri, 1, 0, "KNumberModel"); 0035 qmlRegisterType<KColumnHeadersModel>(uri, 1, 0, "KColumnHeadersModel"); 0036 qmlRegisterType<KSortFilterProxyModel>(uri, 1, 0, "KSortFilterProxyModel"); 0037 } 0038 0039 #include "moc_plugin.cpp"