KItemModels

plugin.cpp
1/*
2 SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "plugin.h"
8
9#include <QDebug>
10#include <QQmlContext>
11
12#include "kdescendantsproxymodel_qml.h"
13#include "krolenames.h"
14#include "ksortfilterproxymodel.h"
15#include <KColumnHeadersModel>
16#include <KDescendantsProxyModel>
17#include <KNumberModel>
18
19using namespace Qt::StringLiterals;
20
21void Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
22{
23 Q_UNUSED(engine);
24 Q_UNUSED(uri);
25}
26
27void Plugin::registerTypes(const char *uri)
28{
30
31 // 1.0
32 qmlRegisterType<KDescendantsProxyModelQml>(uri, 1, 0, "KDescendantsProxyModel");
33 qmlRegisterType<KNumberModel>(uri, 1, 0, "KNumberModel");
34 qmlRegisterType<KColumnHeadersModel>(uri, 1, 0, "KColumnHeadersModel");
35 qmlRegisterType<KSortFilterProxyModel>(uri, 1, 0, "KSortFilterProxyModel");
36
37 // 1.1
38 qmlRegisterUncreatableType<KRoleNames>(uri, 1, 1, "KRoleNames", u"KRoleNames can only be used as an attached property"_s);
39}
40
41#include "moc_plugin.cpp"
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:34 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.