KIdentityManagement

kidentitymanagementquickplugin.cpp
1// SPDX-FileCopyrightText: 2023 Claudio Cambra <claudio.cambra@kde.org>
2// SPDX-License-Identifier: LGPL-2.0-or-later
3
4#include "kidentitymanagementquickplugin.h"
5
6#include <QQmlEngine>
7
8#include "identity.h"
9#include "identityeditorbackend.h"
10#include "identitymodel.h"
11#include "identityutils.h"
12#include "keylistmodelinterface.h"
13#include <KIdentityManagementQuick/CryptographyEditorBackend>
14
15using namespace KIdentityManagementQuick;
16
17void KIdentityManagementQuickPlugin::registerTypes(const char *uri)
18{
19 // @uri org.kde.kidentitymanagement
20 Q_ASSERT(uri == QByteArray("org.kde.kidentitymanagement"));
21
22 qmlRegisterSingletonType<IdentityUtils>(uri, 1, 0, "IdentityUtils", [](QQmlEngine *engine, QJSEngine *scriptEngine) {
23 Q_UNUSED(engine)
24 Q_UNUSED(scriptEngine)
25 return new IdentityUtils;
26 });
27
28 qmlRegisterType<CryptographyEditorBackend>(uri, 1, 0, "CryptographyEditorBackend");
29 qmlRegisterType<IdentityEditorBackend>(uri, 1, 0, "IdentityEditorBackend");
30 qmlRegisterType<KIdentityManagementCore::IdentityModel>(uri, 1, 0, "IdentityModel");
31
32 qRegisterMetaType<CryptographyBackendInterfacePtr>("CryptographyBackendInterfacePtr");
33 qRegisterMetaType<KIdentityManagementCore::Identity>("Identity");
34 qRegisterMetaType<KeyUseTypes::KeyUse>("KeyUseTypes::KeyUse");
35
36 qmlRegisterUncreatableType<KeyUseTypes>(uri, 1, 0, "KeyUseTypes", QStringLiteral("Cannot instantiate KeyUseTypes wrapper!"));
37}
38
39#include "moc_kidentitymanagementquickplugin.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:04:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.