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

source code of qtdeclarative/src/quickcontrols/imagine/qtquickcontrols2imaginestyleplugin.cpp