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 "keysequencevalidator.h"
13#include "translationcontext.h"
14
15void KQuickControlsPrivatePlugin::registerTypes(const char *uri)
16{
17 Q_ASSERT(QString::fromLatin1(uri) == QLatin1String("org.kde.private.kquickcontrols"));
18 qmlRegisterType<KeySequenceHelper>(uri, 2, 0, "KeySequenceHelper");
19 qmlRegisterType<TranslationContext>(uri, 2, 0, "TranslationContext");
20 qmlRegisterType<KeySequenceValidator>(uri, 2, 0, "KeySequenceValidator");
21 // Register the Helper again publicly but uncreatable, so one can access the shortcuttype enum
22 // values as for example "ShortcutType.StandardShortcuts" from qml
23 qmlRegisterUncreatableType<KeySequenceHelper>("org.kde.kquickcontrols", 2, 0, "ShortcutType", QStringLiteral("This is just to allow accessing the enum"));
24}
25
26#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 Sat Dec 21 2024 17:05:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.