KOSMIndoorMap

editorcontrollerplugin.cpp
1/*
2 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#include "editorcontroller.h"
7
8#include <QJSEngine>
9#include <QQmlEngine>
10#include <QQmlExtensionPlugin>
11
12class KOSMEditorControllerPlugin : public QQmlExtensionPlugin
13{
15 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
16public:
17 void registerTypes(const char *uri) override
18 {
19 Q_UNUSED(uri);
20 qRegisterMetaType<OSM::BoundingBox>();
21 qRegisterMetaType<OSM::Element>();
22 qmlRegisterSingletonType("org.kde.osm.editorcontroller", 1, 0, "EditorController", [](QQmlEngine*, QJSEngine *engine) -> QJSValue {
23 return engine->toScriptValue(KOSM::EditorController());
24 });
25 qmlRegisterUncreatableMetaObject(KOSM::EditorController::staticMetaObject, "org.kde.osm.editorcontroller", 1, 0, "Editor", {});
26 }
27};
28
29#include "editorcontrollerplugin.moc"
Filtering/sorting on top of the AmenityModel.
QJSValue toScriptValue(const T &value)
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.