KDeclarative

kquickcontrolsprivateplugin.cpp
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
14void KQuickControlsPrivatePlugin::registerTypes(const char *uri)
15{
16 Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.private.kquickcontrols"));
17 qmlRegisterType<KeySequenceHelper>(uri, 2, 0, "KeySequenceHelper");
18 qmlRegisterType<TranslationContext>(uri, 2, 0, "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>("org.kde.kquickcontrols", 2, 0, "ShortcutType", QStringLiteral("This is just to allow accessing the enum"));
22}
23
24#include "moc_kquickcontrolsprivateplugin.cpp"
QString fromLatin1(QByteArrayView str)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:19 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.