1 | /* |
2 | SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #include "kquickcontrolsprivateplugin.h" |
8 | |
9 | #include <QQmlEngine> |
10 | |
11 | #include "keysequencehelper.h" |
12 | #include "translationcontext.h" |
13 | |
14 | void KQuickControlsPrivatePlugin::registerTypes(const char *uri) |
15 | { |
16 | Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.private.kquickcontrols" )); |
17 | qmlRegisterType<KeySequenceHelper>(uri, versionMajor: 2, versionMinor: 0, qmlName: "KeySequenceHelper" ); |
18 | qmlRegisterType<TranslationContext>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TranslationContext" ); |
19 | // Register the Helper again publicly but uncreatable, so one can access the shortcuttype enum |
20 | // values as for example "ShortcutType.StandardShortcuts" from qml |
21 | qmlRegisterUncreatableType<KeySequenceHelper>(uri: "org.kde.kquickcontrols" , versionMajor: 2, versionMinor: 0, qmlName: "ShortcutType" , QStringLiteral("This is just to allow accessing the enum" )); |
22 | } |
23 | |
24 | #include "moc_kquickcontrolsprivateplugin.cpp" |
25 | |