File indexing completed on 2024-06-23 03:53:41
0001 /* 0002 SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "kquickcontrolsprivateplugin.h" 0008 0009 #include <QQmlEngine> 0010 0011 #include "keysequencehelper.h" 0012 #include "translationcontext.h" 0013 0014 void KQuickControlsPrivatePlugin::registerTypes(const char *uri) 0015 { 0016 Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.private.kquickcontrols")); 0017 qmlRegisterType<KeySequenceHelper>(uri, 2, 0, "KeySequenceHelper"); 0018 qmlRegisterType<TranslationContext>(uri, 2, 0, "TranslationContext"); 0019 // Register the Helper again publicly but uncreatable, so one can access the shortcuttype enum 0020 // values as for example "ShortcutType.StandardShortcuts" from qml 0021 qmlRegisterUncreatableType<KeySequenceHelper>("org.kde.kquickcontrols", 2, 0, "ShortcutType", QStringLiteral("This is just to allow accessing the enum")); 0022 } 0023 0024 #include "moc_kquickcontrolsprivateplugin.cpp"