mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 19:14:23 -04:00
If we are designing our UI's windows from QML, it makes sense that we might want to configure how they're placed from the same place. Everything was already in place but for a few technical bits which this change adds. Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
25 lines
663 B
C++
25 lines
663 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2023 Aleix Pol Gonzalez <aleix.pol_gonzalez@mercedes-benz.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-3.0-or-later
|
|
*/
|
|
|
|
#include <QQmlExtensionPlugin>
|
|
#include "../interfaces/window.h"
|
|
#include <qqml.h>
|
|
|
|
QML_DECLARE_TYPEINFO(LayerShellQt::Window, QML_HAS_ATTACHED_PROPERTIES)
|
|
|
|
class Plugin : public QQmlExtensionPlugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "org.kde.layershellqt")
|
|
Q_OBJECT
|
|
public:
|
|
void registerTypes(const char *uri) override {
|
|
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.layershell"));
|
|
qmlRegisterType<LayerShellQt::Window>(uri, 1, 0, "Window");
|
|
}
|
|
};
|
|
|
|
#include "layershellqtplugin.moc"
|