1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qquickfusionstyle_p.h"
5#include "qquickfusiontheme_p.h"
6
7#include <QtQml/qqml.h>
8#include <QtQuickControls2/private/qquickstyleplugin_p.h>
9#include <QtQuickTemplates2/private/qquicktheme_p.h>
10
11QT_BEGIN_NAMESPACE
12
13extern void qml_register_types_QtQuick_Controls_Fusion();
14Q_GHS_KEEP_REFERENCE(qml_register_types_QtQuick_Controls_Fusion);
15
16class QtQuickControls2FusionStylePlugin : public QQuickStylePlugin
17{
18 Q_OBJECT
19 Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
20
21public:
22 QtQuickControls2FusionStylePlugin(QObject *parent = nullptr);
23
24 QString name() const override;
25 void initializeTheme(QQuickTheme *theme) override;
26
27 QQuickFusionTheme theme;
28};
29
30QtQuickControls2FusionStylePlugin::QtQuickControls2FusionStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
31{
32 volatile auto registration = &qml_register_types_QtQuick_Controls_Fusion;
33 Q_UNUSED(registration);
34}
35
36QString QtQuickControls2FusionStylePlugin::name() const
37{
38 return QStringLiteral("Fusion");
39}
40
41void QtQuickControls2FusionStylePlugin::initializeTheme(QQuickTheme *theme)
42{
43 this->theme.initialize(theme);
44}
45
46QT_END_NAMESPACE
47
48#include "qtquickcontrols2fusionstyleplugin.moc"
49

source code of qtdeclarative/src/quickcontrols/fusion/qtquickcontrols2fusionstyleplugin.cpp