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