aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrols2plugin.cpp
blob: 7fbdfc8e8abd0729747ea4df90fbe1e171e012b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <QtQml/qqmlextensionplugin.h>
#include "qquickstyle_p.h"

#include <QtQuickControls/private/qquickabstractapplicationwindow_p.h>
#include <QtQuickControls/private/qquickabstractbusyindicator_p.h>
#include <QtQuickControls/private/qquickabstractbutton_p.h>
#include <QtQuickControls/private/qquickabstractcheckbox_p.h>
#include <QtQuickControls/private/qquickabstractframe_p.h>
#include <QtQuickControls/private/qquickabstractgroupbox_p.h>
#include <QtQuickControls/private/qquickabstractpageindicator_p.h>
#include <QtQuickControls/private/qquickabstractprogressbar_p.h>
#include <QtQuickControls/private/qquickabstractradiobutton_p.h>
#include <QtQuickControls/private/qquickabstractscrollbar_p.h>
#include <QtQuickControls/private/qquickabstractscrollindicator_p.h>
#include <QtQuickControls/private/qquickabstractslider_p.h>
#include <QtQuickControls/private/qquickabstractspinbox_p.h>
#include <QtQuickControls/private/qquickabstractstackview_p.h>
#include <QtQuickControls/private/qquickabstractswitch_p.h>
#include <QtQuickControls/private/qquickabstracttabbar_p.h>
#include <QtQuickControls/private/qquickabstracttabbutton_p.h>
#include <QtQuickControls/private/qquickabstracttabview_p.h>
#include <QtQuickControls/private/qquickabstracttextarea_p.h>
#include <QtQuickControls/private/qquickabstracttextfield_p.h>
#include <QtQuickControls/private/qquickabstracttogglebutton_p.h>
#include <QtQuickControls/private/qquickabstracttoolbar_p.h>

#include <QtQuickControls/private/qquickcontrol_p.h>
#include <QtQuickControls/private/qquickexclusivegroup_p.h>

void initResources()
{
    Q_INIT_RESOURCE(qtquickcontrols2plugin);
}

QT_BEGIN_NAMESPACE

class QtQuickControls2Plugin: public QQmlExtensionPlugin
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")

public:
    void registerTypes(const char *uri);
    void initializeEngine(QQmlEngine *engine, const char *uri);
};

void QtQuickControls2Plugin::registerTypes(const char *uri)
{
    qmlRegisterType<QQuickAbstractApplicationWindow>(uri, 2, 0, "AbstractApplicationWindow");
    qmlRegisterType<QQuickAbstractBusyIndicator>(uri, 2, 0, "AbstractBusyIndicator");
    qmlRegisterType<QQuickAbstractButton>(uri, 2, 0, "AbstractButton");
    qmlRegisterType<QQuickAbstractCheckBox>(uri, 2, 0, "AbstractCheckBox");
    qmlRegisterType<QQuickAbstractFrame>(uri, 2, 0, "AbstractFrame");
    qmlRegisterType<QQuickAbstractGroupBox>(uri, 2, 0, "AbstractGroupBox");
    qmlRegisterType<QQuickAbstractPageIndicator>(uri, 2, 0, "AbstractPageIndicator");
    qmlRegisterType<QQuickAbstractProgressBar>(uri, 2, 0, "AbstractProgressBar");
    qmlRegisterType<QQuickAbstractRadioButton>(uri, 2, 0, "AbstractRadioButton");
    qmlRegisterType<QQuickAbstractScrollBar>(uri, 2, 0, "AbstractScrollBar");
    qmlRegisterType<QQuickAbstractScrollIndicator>(uri, 2, 0, "AbstractScrollIndicator");
    qmlRegisterType<QQuickAbstractSlider>(uri, 2, 0, "AbstractSlider");
    qmlRegisterType<QQuickAbstractSpinBox>(uri, 2, 0, "AbstractSpinBox");
    qmlRegisterType<QQuickAbstractStackView>(uri, 2, 0, "AbstractStackView");
    qmlRegisterType<QQuickAbstractSwitch>(uri, 2, 0, "AbstractSwitch");
    qmlRegisterType<QQuickAbstractTabBar>(uri, 2, 0, "AbstractTabBar");
    qmlRegisterType<QQuickAbstractTabButton>(uri, 2, 0, "AbstractTabButton");
    qmlRegisterType<QQuickAbstractTabView>(uri, 2, 0, "AbstractTabView");
    qmlRegisterType<QQuickAbstractTextArea>(uri, 2, 0, "AbstractTextArea");
    qmlRegisterType<QQuickAbstractTextField>(uri, 2, 0, "AbstractTextField");
    qmlRegisterType<QQuickAbstractToggleButton>(uri, 2, 0, "AbstractToggleButton");
    qmlRegisterType<QQuickAbstractToolBar>(uri, 2, 0, "AbstractToolBar");

    qmlRegisterUncreatableType<QQuickExclusiveAttached>(uri, 2, 0, "Exclusive", "Exclusive is an attached property");
    qmlRegisterUncreatableType<QQuickStackAttached>(uri, 2, 0, "Stack", "Stack is an attached property");
    qmlRegisterUncreatableType<QQuickStyle>(uri, 2, 0, "Style", "Style is an attached property");
    qmlRegisterUncreatableType<QQuickTabAttached>(uri, 2, 0, "Tab", "Tab is an attached property");

    qmlRegisterType<QQuickControl>(uri, 2, 0, "Control");
    qmlRegisterType<QQuickExclusiveGroup>(uri, 2, 0, "ExclusiveGroup");

    qmlRegisterRevision<QQuickTextInput, 6>(uri, 2, 0);
    qmlRegisterRevision<QQuickTextEdit, 6>(uri, 2, 0);
}

void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
    Q_UNUSED(engine);
    Q_UNUSED(uri);
    initResources();
}

QT_END_NAMESPACE

#include "qtquickcontrols2plugin.moc"