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