KIconThemes

kiconengineplugin.cpp
1/*
2 kiconengineplugin.cpp: Qt plugin providing the ability to create a KIconEngine
3
4 This file is part of the KDE project, module kdeui.
5 SPDX-FileCopyrightText: 2018 Fabian Vogt <fabian@ritter-vogt.de>
6
7 SPDX-License-Identifier: LGPL-2.0-only
8*/
9
10#include <QIconEnginePlugin>
11
12#include <KIconEngine>
13#include <KIconLoader>
14
15QT_BEGIN_NAMESPACE
16
17class KIconEnginePlugin : public QIconEnginePlugin
18{
20 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "kiconengineplugin.json")
21
22public:
23 QIconEngine *create(const QString &file) override
24 {
25 return new KIconEngine(file, KIconLoader::global());
26 }
27};
28
29QT_END_NAMESPACE
30
31#include "kiconengineplugin.moc"
A class to provide rendering of KDE icons.
Definition kiconengine.h:29
static KIconLoader * global()
Returns the global icon loader initialized with the application name.
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.