KWin
Loading...
Searching...
No Matches
plastikplugin.cpp
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#include "plastikplugin.h"
7#include "plastikbutton.h"
8#include <QQmlEngine>
9
10void PlastikPlugin::registerTypes(const char *uri)
11{
12 // Need to register something to tell Qt that it loaded (QTBUG-84571)
13 qmlRegisterModule(uri, 1, 0);
14}
15
16void PlastikPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
17{
18 Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.kwin.decorations.plastik"));
19 engine->addImageProvider(QLatin1String("plastik"), new KWin::PlastikButtonProvider());
20 QQmlExtensionPlugin::initializeEngine(engine, uri);
21}
22
23#include "moc_plastikplugin.cpp"
void initializeEngine(QQmlEngine *engine, const char *uri) override
void registerTypes(const char *uri) override