KDeclarative

kquickcontrolsprivateplugin.cpp
1 /*
2  SPDX-FileCopyrightText: 2014 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "kquickcontrolsprivateplugin.h"
8 
9 #include <QtQml>
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, 2, 0, "KeySequenceHelper");
18  qmlRegisterType<TranslationContext>(uri, 2, 0, "TranslationContext");
19  // Register the Helper again publically 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",
22  QStringLiteral("This is just to allow accessing the enum"));
23 }
24 
QString fromLatin1(const char *str, int size)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:44:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.