diff options
Diffstat (limited to 'src/imports/android')
34 files changed, 894 insertions, 11 deletions
diff --git a/src/imports/android/android.pro b/src/imports/android/android.pro index bb9c75d..1cdf6bc 100644 --- a/src/imports/android/android.pro +++ b/src/imports/android/android.pro @@ -1,11 +1,13 @@ -TARGET = qtqmlandroidplugin -TARGETPATH = android -IMPORT_VERSION = 0.21 - -QT += nativeandroid-private - -SOURCES += \ - $$PWD/qtqmlandroidplugin.cpp - -CONFIG += no_cxx_module -load(qml_plugin) +TEMPLATE = subdirs +SUBDIRS += \ + android \ + app \ + content \ + graphics \ + graphics/drawable \ + support/v4/widget \ + support/v7/app \ + support/v7/widget \ + view \ + view/animation \ + widget diff --git a/src/imports/android/android/android.pro b/src/imports/android/android/android.pro new file mode 100644 index 0000000..bb9c75d --- /dev/null +++ b/src/imports/android/android/android.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidplugin +TARGETPATH = android +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/qmldir b/src/imports/android/android/qmldir index 407a419..407a419 100644 --- a/src/imports/android/qmldir +++ b/src/imports/android/android/qmldir diff --git a/src/imports/android/qtqmlandroidplugin.cpp b/src/imports/android/android/qtqmlandroidplugin.cpp index 383eef5..383eef5 100644 --- a/src/imports/android/qtqmlandroidplugin.cpp +++ b/src/imports/android/android/qtqmlandroidplugin.cpp diff --git a/src/imports/android/app/app.pro b/src/imports/android/app/app.pro new file mode 100644 index 0000000..99a9e6a --- /dev/null +++ b/src/imports/android/app/app.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidappplugin +TARGETPATH = android/app +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidappplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/app/qmldir b/src/imports/android/app/qmldir new file mode 100644 index 0000000..e58d55b --- /dev/null +++ b/src/imports/android/app/qmldir @@ -0,0 +1,3 @@ +module android.app +plugin qtqmlandroidappplugin +classname QtQmlAndroidAppPlugin diff --git a/src/imports/android/app/qtqmlandroidappplugin.cpp b/src/imports/android/app/qtqmlandroidappplugin.cpp new file mode 100644 index 0000000..a430188 --- /dev/null +++ b/src/imports/android/app/qtqmlandroidappplugin.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidactionbar_p.h> +#include <QtNativeAndroid/private/qnativeandroidactivity_p.h> +#include <QtNativeAndroid/private/qnativeandroidalertdialog_p.h> +#include <QtNativeAndroid/private/qnativeandroiddialog_p.h> +#include <QtNativeAndroid/private/qnativeandroidservice_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidAppPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidAppPlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidActionBar>(uri, 0, 21, "ActionBar"); + qmlRegisterType<QNativeAndroidActivity>(uri, 0, 21, "Activity"); + qmlRegisterType<QNativeAndroidAlertDialog>(uri, 0, 21, "AlertDialog"); + qmlRegisterType<QNativeAndroidDialog>(uri, 0, 21, "Dialog"); + qmlRegisterType<QNativeAndroidService>(uri, 0, 21, "Service"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidappplugin.moc" diff --git a/src/imports/android/content/content.pro b/src/imports/android/content/content.pro new file mode 100644 index 0000000..cb83204 --- /dev/null +++ b/src/imports/android/content/content.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidcontentplugin +TARGETPATH = android/content +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidcontentplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/content/qmldir b/src/imports/android/content/qmldir new file mode 100644 index 0000000..bd2252d --- /dev/null +++ b/src/imports/android/content/qmldir @@ -0,0 +1,3 @@ +module android.content +plugin qtqmlandroidcontentplugin +classname QtQmlAndroidContentPlugin diff --git a/src/imports/android/content/qtqmlandroidcontentplugin.cpp b/src/imports/android/content/qtqmlandroidcontentplugin.cpp new file mode 100644 index 0000000..26cf3c3 --- /dev/null +++ b/src/imports/android/content/qtqmlandroidcontentplugin.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidcontext_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidContentPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidContentPlugin::registerTypes(const char *uri) +{ + qmlRegisterUncreatableType<QNativeAndroidContext>(uri, 0, 21, "Context", QStringLiteral("Cannot create Context")); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidcontentplugin.moc" diff --git a/src/imports/android/graphics/drawable/drawable.pro b/src/imports/android/graphics/drawable/drawable.pro new file mode 100644 index 0000000..5a20bc2 --- /dev/null +++ b/src/imports/android/graphics/drawable/drawable.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroiddrawableplugin +TARGETPATH = android/graphics/drawable +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroiddrawableplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/graphics/drawable/qmldir b/src/imports/android/graphics/drawable/qmldir new file mode 100644 index 0000000..5a44e0a --- /dev/null +++ b/src/imports/android/graphics/drawable/qmldir @@ -0,0 +1,3 @@ +module android.graphics.drawable +plugin qtqmlandroiddrawableplugin +classname QtQmlAndroidDrawablePlugin diff --git a/src/imports/android/graphics/drawable/qtqmlandroiddrawableplugin.cpp b/src/imports/android/graphics/drawable/qtqmlandroiddrawableplugin.cpp new file mode 100644 index 0000000..020b048 --- /dev/null +++ b/src/imports/android/graphics/drawable/qtqmlandroiddrawableplugin.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidcolordrawable_p.h> +#include <QtNativeAndroid/private/qnativeandroiddrawable_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidDrawablePlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidDrawablePlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidColorDrawable>(uri, 0, 21, "ColorDrawable"); + qmlRegisterType<QNativeAndroidDrawable>(uri, 0, 21, "Drawable"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroiddrawableplugin.moc" diff --git a/src/imports/android/graphics/graphics.pro b/src/imports/android/graphics/graphics.pro new file mode 100644 index 0000000..d08a732 --- /dev/null +++ b/src/imports/android/graphics/graphics.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidgraphicsplugin +TARGETPATH = android/graphics +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidgraphicsplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/graphics/qmldir b/src/imports/android/graphics/qmldir new file mode 100644 index 0000000..5747f14 --- /dev/null +++ b/src/imports/android/graphics/qmldir @@ -0,0 +1,3 @@ +module android.graphics +plugin qtqmlandroidgraphicsplugin +classname QtQmlAndroidGraphicsPlugin diff --git a/src/imports/android/graphics/qtqmlandroidgraphicsplugin.cpp b/src/imports/android/graphics/qtqmlandroidgraphicsplugin.cpp new file mode 100644 index 0000000..4cfc6f4 --- /dev/null +++ b/src/imports/android/graphics/qtqmlandroidgraphicsplugin.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidcolor_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidGraphicsPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidGraphicsPlugin::registerTypes(const char *uri) +{ + qmlRegisterSingletonType<QNativeAndroidColor>(uri, 0, 21, "Color", QNativeAndroidColor::provider); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidgraphicsplugin.moc" diff --git a/src/imports/android/support/v4/widget/qmldir b/src/imports/android/support/v4/widget/qmldir new file mode 100644 index 0000000..d497263 --- /dev/null +++ b/src/imports/android/support/v4/widget/qmldir @@ -0,0 +1,3 @@ +module android.support.v4.widget +plugin qtqmlandroidsupportv4widgetplugin +classname QtQmlAndroidSupportV4WidgetPlugin diff --git a/src/imports/android/support/v4/widget/qtqmlandroidsupportv4widgetplugin.cpp b/src/imports/android/support/v4/widget/qtqmlandroidsupportv4widgetplugin.cpp new file mode 100644 index 0000000..9096620 --- /dev/null +++ b/src/imports/android/support/v4/widget/qtqmlandroidsupportv4widgetplugin.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroiddrawerlayout_p.h> +#include <QtNativeAndroid/private/qnativeandroidswiperefreshlayout_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidSupportV4WidgetPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidSupportV4WidgetPlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidDrawerLayout>(uri, 0, 21, "DrawerLayout"); + qmlRegisterType<QNativeAndroidSwipeRefreshLayout>(uri, 0, 21, "SwipeRefreshLayout"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidsupportv4widgetplugin.moc" diff --git a/src/imports/android/support/v4/widget/widget.pro b/src/imports/android/support/v4/widget/widget.pro new file mode 100644 index 0000000..65c9283 --- /dev/null +++ b/src/imports/android/support/v4/widget/widget.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidsupportv4widgetplugin +TARGETPATH = android/support/v4/widget +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidsupportv4widgetplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/support/v7/app/app.pro b/src/imports/android/support/v7/app/app.pro new file mode 100644 index 0000000..056346b --- /dev/null +++ b/src/imports/android/support/v7/app/app.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidsupportv7appplugin +TARGETPATH = android/support/v7/app +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidsupportv7appplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/support/v7/app/qmldir b/src/imports/android/support/v7/app/qmldir new file mode 100644 index 0000000..3849559 --- /dev/null +++ b/src/imports/android/support/v7/app/qmldir @@ -0,0 +1,3 @@ +module android.support.v7.app +plugin qtqmlandroidsupportv7appplugin +classname QtQmlAndroidSupportV7AppPlugin diff --git a/src/imports/android/support/v7/app/qtqmlandroidsupportv7appplugin.cpp b/src/imports/android/support/v7/app/qtqmlandroidsupportv7appplugin.cpp new file mode 100644 index 0000000..c5aafbc --- /dev/null +++ b/src/imports/android/support/v7/app/qtqmlandroidsupportv7appplugin.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidactionbardrawertoggle_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidSupportV7AppPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidSupportV7AppPlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidActionBarDrawerToggle>(uri, 0, 21, "ActionBarDrawerToggle"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidsupportv7appplugin.moc" diff --git a/src/imports/android/support/v7/widget/qmldir b/src/imports/android/support/v7/widget/qmldir new file mode 100644 index 0000000..9c5e173 --- /dev/null +++ b/src/imports/android/support/v7/widget/qmldir @@ -0,0 +1,3 @@ +module android.support.v7.widget +plugin qtqmlandroidsupportv7widgetplugin +classname QtQmlAndroidSupportV7WidgetPlugin diff --git a/src/imports/android/support/v7/widget/qtqmlandroidsupportv7widgetplugin.cpp b/src/imports/android/support/v7/widget/qtqmlandroidsupportv7widgetplugin.cpp new file mode 100644 index 0000000..63e988c --- /dev/null +++ b/src/imports/android/support/v7/widget/qtqmlandroidsupportv7widgetplugin.cpp @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidcardview_p.h> +#include <QtNativeAndroid/private/qnativeandroidrecycleradapter_p.h> +#include <QtNativeAndroid/private/qnativeandroidrecyclerview_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidSupportV7WidgetPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidSupportV7WidgetPlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidCardView>(uri, 0, 21, "CardView"); + qmlRegisterType<QNativeAndroidRecyclerAdapter>(uri, 0, 21, "RecyclerAdapter"); + qmlRegisterType<QNativeAndroidRecyclerView>(uri, 0, 21, "RecyclerView"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidsupportv7widgetplugin.moc" diff --git a/src/imports/android/support/v7/widget/widget.pro b/src/imports/android/support/v7/widget/widget.pro new file mode 100644 index 0000000..a150e0e --- /dev/null +++ b/src/imports/android/support/v7/widget/widget.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidsupportv7widgetplugin +TARGETPATH = android/support/v7/widget +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidsupportv7widgetplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/view/animation/animation.pro b/src/imports/android/view/animation/animation.pro new file mode 100644 index 0000000..ab5252f --- /dev/null +++ b/src/imports/android/view/animation/animation.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidanimationplugin +TARGETPATH = android/view/animation +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidanimationplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/view/animation/qmldir b/src/imports/android/view/animation/qmldir new file mode 100644 index 0000000..22e1c3b --- /dev/null +++ b/src/imports/android/view/animation/qmldir @@ -0,0 +1,3 @@ +module android.view.animation +plugin qtqmlandroidanimationplugin +classname QtQmlAndroidAnimationPlugin diff --git a/src/imports/android/view/animation/qtqmlandroidanimationplugin.cpp b/src/imports/android/view/animation/qtqmlandroidanimationplugin.cpp new file mode 100644 index 0000000..747be40 --- /dev/null +++ b/src/imports/android/view/animation/qtqmlandroidanimationplugin.cpp @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidacceleratedecelerateinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidaccelerateinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidalphaanimation_p.h> +#include <QtNativeAndroid/private/qnativeandroidanimation_p.h> +#include <QtNativeAndroid/private/qnativeandroidanimationset_p.h> +#include <QtNativeAndroid/private/qnativeandroidanticipateinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidanticipateovershootinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidbounceinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidcycleinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroiddecelerateinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidlinearinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidovershootinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidpathinterpolator_p.h> +#include <QtNativeAndroid/private/qnativeandroidrotateanimation_p.h> +#include <QtNativeAndroid/private/qnativeandroidscaleanimation_p.h> +#include <QtNativeAndroid/private/qnativeandroidtranslateanimation_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidAnimationPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidAnimationPlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidAccelerateDecelerateInterpolator>(uri, 0, 21, "AccelerateDecelerateInterpolator"); + qmlRegisterType<QNativeAndroidAccelerateInterpolator>(uri, 0, 21, "AccelerateInterpolator"); + qmlRegisterType<QNativeAndroidAlphaAnimation>(uri, 0, 21, "AlphaAnimation"); + qmlRegisterType<QNativeAndroidAnimation>(uri, 0, 21, "Animation"); + qmlRegisterType<QNativeAndroidAnimationSet>(uri, 0, 21, "AnimationSet"); + qmlRegisterType<QNativeAndroidAnticipateInterpolator>(uri, 0, 21, "AnticipateInterpolator"); + qmlRegisterType<QNativeAndroidAnticipateOvershootInterpolator>(uri, 0, 21, "AnticipateOvershootInterpolator"); + qmlRegisterType<QNativeAndroidBounceInterpolator>(uri, 0, 21, "BounceInterpolator"); + qmlRegisterType<QNativeAndroidCycleInterpolator>(uri, 0, 21, "CycleInterpolator"); + qmlRegisterType<QNativeAndroidDecelerateInterpolator>(uri, 0, 21, "DecelerateInterpolator"); + qmlRegisterUncreatableType<QNativeAndroidInterpolator>(uri, 0, 21, "Interpolator", QStringLiteral("Interpolator is abstract")); + qmlRegisterType<QNativeAndroidLinearInterpolator>(uri, 0, 21, "LinearInterpolator"); + qmlRegisterType<QNativeAndroidOvershootInterpolator>(uri, 0, 21, "OvershootInterpolator"); + qmlRegisterType<QNativeAndroidPathInterpolator>(uri, 0, 21, "PathInterpolator"); + qmlRegisterType<QNativeAndroidRotateAnimation>(uri, 0, 21, "RotateAnimation"); + qmlRegisterType<QNativeAndroidScaleAnimation>(uri, 0, 21, "ScaleAnimation"); + qmlRegisterType<QNativeAndroidTranslateAnimation>(uri, 0, 21, "TranslateAnimation"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidanimationplugin.moc" diff --git a/src/imports/android/view/qmldir b/src/imports/android/view/qmldir new file mode 100644 index 0000000..b75619f --- /dev/null +++ b/src/imports/android/view/qmldir @@ -0,0 +1,3 @@ +module android.view +plugin qtqmlandroidviewplugin +classname QtQmlAndroidViewPlugin diff --git a/src/imports/android/view/qtqmlandroidviewplugin.cpp b/src/imports/android/view/qtqmlandroidviewplugin.cpp new file mode 100644 index 0000000..17851de --- /dev/null +++ b/src/imports/android/view/qtqmlandroidviewplugin.cpp @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidgravity_p.h> +#include <QtNativeAndroid/private/qnativeandroidlayoutparams_p.h> +#include <QtNativeAndroid/private/qnativeandroidmenu_p.h> +#include <QtNativeAndroid/private/qnativeandroidmenuitem_p.h> +#include <QtNativeAndroid/private/qnativeandroidview_p.h> +#include <QtNativeAndroid/private/qnativeandroidviewgroup_p.h> +#include <QtNativeAndroid/private/qnativeandroidwindow_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidViewPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidViewPlugin::registerTypes(const char *uri) +{ + qmlRegisterUncreatableType<QNativeAndroidGravity>(uri, 0, 21, "Gravity", QStringLiteral("Gravity is an enum")); + qmlRegisterUncreatableType<QNativeAndroidLayoutParams>(uri, 0, 21, "Layout", QStringLiteral("Layout is an attached property")); + qmlRegisterType<QNativeAndroidMenu>(uri, 0, 21, "Menu"); + qmlRegisterType<QNativeAndroidMenuItem>(uri, 0, 21, "MenuItem"); + qmlRegisterType<QNativeAndroidView>(uri, 0, 21, "View"); + qmlRegisterType<QNativeAndroidViewGroup>(uri, 0, 21, "ViewGroup"); + qmlRegisterType<QNativeAndroidWindow>(); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidviewplugin.moc" diff --git a/src/imports/android/view/view.pro b/src/imports/android/view/view.pro new file mode 100644 index 0000000..1cbddf2 --- /dev/null +++ b/src/imports/android/view/view.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidviewplugin +TARGETPATH = android/view +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidviewplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) diff --git a/src/imports/android/widget/qmldir b/src/imports/android/widget/qmldir new file mode 100644 index 0000000..e360e78 --- /dev/null +++ b/src/imports/android/widget/qmldir @@ -0,0 +1,3 @@ +module android.widget +plugin qtqmlandroidwidgetplugin +classname QtQmlAndroidWidgetPlugin diff --git a/src/imports/android/widget/qtqmlandroidwidgetplugin.cpp b/src/imports/android/widget/qtqmlandroidwidgetplugin.cpp new file mode 100644 index 0000000..0d31fc0 --- /dev/null +++ b/src/imports/android/widget/qtqmlandroidwidgetplugin.cpp @@ -0,0 +1,131 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt QML Android 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 <QtQml/qqml.h> + +#include <QtNativeAndroid/private/qnativeandroidarrayadapter_p.h> +#include <QtNativeAndroid/private/qnativeandroidbutton_p.h> +#include <QtNativeAndroid/private/qnativeandroidcalendarview_p.h> +#include <QtNativeAndroid/private/qnativeandroidcheckbox_p.h> +#include <QtNativeAndroid/private/qnativeandroiddatepicker_p.h> +#include <QtNativeAndroid/private/qnativeandroidedittext_p.h> +#include <QtNativeAndroid/private/qnativeandroidframelayout_p.h> +#include <QtNativeAndroid/private/qnativeandroidframelayoutparams_p.h> +#include <QtNativeAndroid/private/qnativeandroidimageview_p.h> +#include <QtNativeAndroid/private/qnativeandroidlinearlayout_p.h> +#include <QtNativeAndroid/private/qnativeandroidlinearlayoutparams_p.h> +#include <QtNativeAndroid/private/qnativeandroidlistview_p.h> +#include <QtNativeAndroid/private/qnativeandroidnumberpicker_p.h> +#include <QtNativeAndroid/private/qnativeandroidpopupmenu_p.h> +#include <QtNativeAndroid/private/qnativeandroidprogressbar_p.h> +#include <QtNativeAndroid/private/qnativeandroidradiobutton_p.h> +#include <QtNativeAndroid/private/qnativeandroidradiogroup_p.h> +#include <QtNativeAndroid/private/qnativeandroidratingbar_p.h> +#include <QtNativeAndroid/private/qnativeandroidrelativelayout_p.h> +#include <QtNativeAndroid/private/qnativeandroidrelativelayoutparams_p.h> +#include <QtNativeAndroid/private/qnativeandroidscrollview_p.h> +#include <QtNativeAndroid/private/qnativeandroidsearchview_p.h> +#include <QtNativeAndroid/private/qnativeandroidseekbar_p.h> +#include <QtNativeAndroid/private/qnativeandroidspace_p.h> +#include <QtNativeAndroid/private/qnativeandroidspinner_p.h> +#include <QtNativeAndroid/private/qnativeandroidswitch_p.h> +#include <QtNativeAndroid/private/qnativeandroidtabhost_p.h> +#include <QtNativeAndroid/private/qnativeandroidtabspec_p.h> +#include <QtNativeAndroid/private/qnativeandroidtabwidget_p.h> +#include <QtNativeAndroid/private/qnativeandroidtextview_p.h> +#include <QtNativeAndroid/private/qnativeandroidtimepicker_p.h> +#include <QtNativeAndroid/private/qnativeandroidtoast_p.h> +#include <QtNativeAndroid/private/qnativeandroidtogglebutton_p.h> +#include <QtNativeAndroid/private/qnativeandroidviewanimator_p.h> +#include <QtNativeAndroid/private/qnativeandroidviewflipper_p.h> +#include <QtNativeAndroid/private/qnativeandroidviewswitcher_p.h> + +QT_BEGIN_NAMESPACE + +class QtQmlAndroidWidgetPlugin: public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") + +public: + void registerTypes(const char *uri) override; +}; + +void QtQmlAndroidWidgetPlugin::registerTypes(const char *uri) +{ + qmlRegisterType<QNativeAndroidArrayAdapter>(uri, 0, 21, "ArrayAdapter"); + qmlRegisterType<QNativeAndroidBaseAdapter>(); + qmlRegisterType<QNativeAndroidButton>(uri, 0, 21, "Button"); + qmlRegisterType<QNativeAndroidCalendarView>(uri, 0, 21, "CalendarView"); + qmlRegisterType<QNativeAndroidCheckBox>(uri, 0, 21, "CheckBox"); + qmlRegisterType<QNativeAndroidDatePicker>(uri, 0, 21, "DatePicker"); + qmlRegisterType<QNativeAndroidEditText>(uri, 0, 21, "EditText"); + qmlRegisterType<QNativeAndroidFrameLayout>(uri, 0, 21, "FrameLayout"); + qmlRegisterType<QNativeAndroidFrameLayoutParams>(); + qmlRegisterType<QNativeAndroidImageView>(uri, 0, 21, "ImageView"); + qmlRegisterType<QNativeAndroidLinearLayout>(uri, 0, 21, "LinearLayout"); + qmlRegisterType<QNativeAndroidLinearLayoutParams>(); + qmlRegisterType<QNativeAndroidListView>(uri, 0, 21, "ListView"); + qmlRegisterType<QNativeAndroidNumberPicker>(uri, 0, 21, "NumberPicker"); + qmlRegisterType<QNativeAndroidPopupMenu>(uri, 0, 21, "PopupMenu"); + qmlRegisterType<QNativeAndroidProgressBar>(uri, 0, 21, "ProgressBar"); + qmlRegisterType<QNativeAndroidRadioButton>(uri, 0, 21, "RadioButton"); + qmlRegisterType<QNativeAndroidRadioGroup>(uri, 0, 21, "RadioGroup"); + qmlRegisterType<QNativeAndroidRatingBar>(uri, 0, 21, "RatingBar"); + qmlRegisterType<QNativeAndroidRelativeLayout>(uri, 0, 21, "RelativeLayout"); + qmlRegisterType<QNativeAndroidRelativeLayoutParams>(); + qmlRegisterType<QNativeAndroidScrollView>(uri, 0, 21, "ScrollView"); + qmlRegisterType<QNativeAndroidSearchView>(uri, 0, 21, "SearchView"); + qmlRegisterType<QNativeAndroidSeekBar>(uri, 0, 21, "SeekBar"); + qmlRegisterType<QNativeAndroidSpace>(uri, 0, 21, "Space"); + qmlRegisterType<QNativeAndroidSpinner>(uri, 0, 21, "Spinner"); + qmlRegisterType<QNativeAndroidSwitch>(uri, 0, 21, "Switch"); + qmlRegisterType<QNativeAndroidTabHost>(uri, 0, 21, "TabHost"); + qmlRegisterUncreatableType<QNativeAndroidTabSpec>(uri, 0, 21, "TabSpec", QStringLiteral("TabSpec is an attached property")); + qmlRegisterType<QNativeAndroidTabWidget>(uri, 0, 21, "TabWidget"); + qmlRegisterType<QNativeAndroidTextView>(uri, 0, 21, "TextView"); + qmlRegisterType<QNativeAndroidTimePicker>(uri, 0, 21, "TimePicker"); + qmlRegisterType<QNativeAndroidToast>(uri, 0, 21, "Toast"); + qmlRegisterType<QNativeAndroidToggleButton>(uri, 0, 21, "ToggleButton"); + qmlRegisterType<QNativeAndroidViewAnimator>(uri, 0, 21, "ViewAnimator"); + qmlRegisterType<QNativeAndroidViewFlipper>(uri, 0, 21, "ViewFlipper"); + qmlRegisterType<QNativeAndroidViewSwitcher>(uri, 0, 21, "ViewSwitcher"); +} + +QT_END_NAMESPACE + +#include "qtqmlandroidwidgetplugin.moc" diff --git a/src/imports/android/widget/widget.pro b/src/imports/android/widget/widget.pro new file mode 100644 index 0000000..25dec8d --- /dev/null +++ b/src/imports/android/widget/widget.pro @@ -0,0 +1,11 @@ +TARGET = qtqmlandroidwidgetplugin +TARGETPATH = android/widget +IMPORT_VERSION = 0.21 + +QT += nativeandroid-private + +SOURCES += \ + $$PWD/qtqmlandroidwidgetplugin.cpp + +CONFIG += no_cxx_module +load(qml_plugin) |