This makes the types visible to QML toolingwilder/Plasma/6.2
parent
c8e0568022
commit
9e9da67fc0
11 changed files with 45 additions and 72 deletions
@ -1,39 +0,0 @@ |
||||
/*
|
||||
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> |
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL |
||||
*/ |
||||
#include "plugin.h" |
||||
#include "buttonsmodel.h" |
||||
#include "previewbridge.h" |
||||
#include "previewbutton.h" |
||||
#include "previewclient.h" |
||||
#include "previewitem.h" |
||||
#include "previewsettings.h" |
||||
|
||||
#include <KDecoration2/Decoration> |
||||
#include <KDecoration2/DecorationShadow> |
||||
|
||||
namespace KDecoration2 |
||||
{ |
||||
namespace Preview |
||||
{ |
||||
|
||||
void Plugin::registerTypes(const char *uri) |
||||
{ |
||||
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.kwin.private.kdecoration")); |
||||
qmlRegisterType<KDecoration2::Preview::BridgeItem>(uri, 1, 0, "Bridge"); |
||||
qmlRegisterType<KDecoration2::Preview::Settings>(uri, 1, 0, "Settings"); |
||||
qmlRegisterType<KDecoration2::Preview::PreviewItem>(uri, 1, 0, "Decoration"); |
||||
qmlRegisterType<KDecoration2::Preview::PreviewButtonItem>(uri, 1, 0, "Button"); |
||||
qmlRegisterType<KDecoration2::Preview::ButtonsModel>(uri, 1, 0, "ButtonsModel"); |
||||
qmlRegisterAnonymousType<KDecoration2::Preview::PreviewClient>(uri, 1); |
||||
qmlRegisterAnonymousType<KDecoration2::Decoration>(uri, 1); |
||||
qmlRegisterAnonymousType<KDecoration2::DecorationShadow>(uri, 1); |
||||
qmlRegisterAnonymousType<KDecoration2::Preview::PreviewBridge>(uri, 1); |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
#include "moc_plugin.cpp" |
||||
@ -1,24 +0,0 @@ |
||||
/*
|
||||
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> |
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL |
||||
*/ |
||||
#pragma once |
||||
|
||||
#include <QQmlExtensionPlugin> |
||||
|
||||
namespace KDecoration2 |
||||
{ |
||||
namespace Preview |
||||
{ |
||||
|
||||
class Plugin : public QQmlExtensionPlugin |
||||
{ |
||||
Q_PLUGIN_METADATA(IID "org.kde.kdecoration2") |
||||
Q_OBJECT |
||||
public: |
||||
void registerTypes(const char *uri) override; |
||||
}; |
||||
|
||||
} |
||||
} |
||||
@ -1,2 +0,0 @@ |
||||
module org.kde.kwin.private.kdecoration |
||||
plugin kdecorationprivatedeclarative |
||||
@ -0,0 +1,25 @@ |
||||
/*
|
||||
SPDX-FileCopyrightText: 2024 Nicolas Fella <nicolas.fella@gmx.de> |
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL |
||||
*/ |
||||
#pragma once |
||||
|
||||
#include <QQmlEngine> |
||||
|
||||
#include <KDecoration2/Decoration> |
||||
#include <KDecoration2/DecorationShadow> |
||||
|
||||
struct DecorationForeign |
||||
{ |
||||
Q_GADGET |
||||
QML_ANONYMOUS |
||||
QML_FOREIGN(KDecoration2::Decoration) |
||||
}; |
||||
|
||||
struct DecorationShadowForeign |
||||
{ |
||||
Q_GADGET |
||||
QML_ANONYMOUS |
||||
QML_FOREIGN(KDecoration2::DecorationShadow) |
||||
}; |
||||
Loading…
Reference in new issue