1// Copyright (C) 2020 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 "qquickbasicstyle_p.h"
5#include "qquickbasictheme_p.h"
6
7#include <QtQuickControls2/private/qquickstyleplugin_p.h>
8#include <QtQuickTemplates2/private/qquicktheme_p.h>
9
10QT_BEGIN_NAMESPACE
11
12extern void qml_register_types_QtQuick_Controls_Basic();
13Q_GHS_KEEP_REFERENCE(qml_register_types_QtQuick_Controls_Basic);
14
15class QtQuickControls2BasicStylePlugin: public QQuickStylePlugin
16{
17 Q_OBJECT
18 Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
19
20public:
21 QtQuickControls2BasicStylePlugin(QObject *parent = nullptr);
22
23 QString name() const override;
24 void initializeTheme(QQuickTheme *theme) override;
25
26 QQuickBasicTheme theme;
27};
28
29QtQuickControls2BasicStylePlugin::QtQuickControls2BasicStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
30{
31 volatile auto registration = &qml_register_types_QtQuick_Controls_Basic;
32 Q_UNUSED(registration);
33}
34
35QString QtQuickControls2BasicStylePlugin::name() const
36{
37 return QStringLiteral("Basic");
38}
39
40void QtQuickControls2BasicStylePlugin::initializeTheme(QQuickTheme *theme)
41{
42 this->theme.initialize(theme);
43}
44
45QT_END_NAMESPACE
46
47#include "qtquickcontrols2basicstyleplugin.moc"
48

source code of qtdeclarative/src/quickcontrols/basic/qtquickcontrols2basicstyleplugin.cpp