diff options
author | Janne Virranmäki <janne.virranmaki@siili.com> | 2017-12-04 11:14:38 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2017-12-12 10:04:14 +0000 |
commit | d3e5e853b4c1d05f9b2c16fef959ff1fdad9eff5 (patch) | |
tree | dff64f6f0579d84ce66d2271ee9bc2fe7dbdac82 | |
parent | 737e167f0cd9012ed88246a7e3a85458dad47388 (diff) |
Change-Id: I9d01217933c28c334193c5b8ec1d00f89ac4d3da
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
107 files changed, 5099 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..26d2961 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +*/3rdparty/*/ +build-* +*.pro.user* +*/Viewer/Shared/UICEmbeddedWatermark.cpp +.qmake.stash +fontcache +mocinclude.opt +internal/licensehandler/Makefile* +internal/licensehandler/debug +internal/licensehandler/release +installerextras/*/ +src/3rdparty +*.o +Makefile +Makefile.* +.moc +.uic +.rcc +moc_*.cpp +.DS_Store +*.qmlc diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml new file mode 100644 index 0000000..11a9e7c --- /dev/null +++ b/android/AndroidManifest.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<manifest package="org.qtproject.kria_cluster_2d_demo" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto"> + <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Kria Cluster 2D Demo" android:icon="@drawable/icon"> + <activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Kria Cluster 2D Demo" android:screenOrientation="unspecified" android:launchMode="singleTop"> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + + <!-- Application arguments --> + <!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ --> + <!-- Application arguments --> + + <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/> + <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/> + <meta-data android:name="android.app.repository" android:value="default"/> + <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/> + <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/> + <!-- Deploy Qt libs as part of package --> + <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/> + <meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/> + <meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/> + <!-- Run with local libs --> + <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/> + <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/> + <meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/> + <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/> + <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/> + <!-- Messages maps --> + <meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/> + <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/> + <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/> + <!-- Messages maps --> + + <!-- Splash screen --> + <!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ --> + <!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ --> + <!-- Splash screen --> + + <!-- Background running --> + <!-- Warning: changing this value to true may cause unexpected crashes if the + application still try to draw after + "applicationStateChanged(Qt::ApplicationSuspended)" + signal is sent! --> + <meta-data android:name="android.app.background_running" android:value="false"/> + <!-- Background running --> + + <!-- auto screen scale factor --> + <meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/> + <!-- auto screen scale factor --> + + <!-- extract android style --> + <!-- available android:values : + * full - useful QWidget & Quick Controls 1 apps + * minimal - useful for Quick Controls 2 apps, it is much faster than "full" + * none - useful for apps that don't use any of the above Qt modules + --> + <meta-data android:name="android.app.extract_android_style" android:value="full"/> + <!-- extract android style --> + </activity> + + <!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices --> + + </application> + + <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/> + <supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/> + + <!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application. + Remove the comment if you do not require these default permissions. --> + <!-- %%INSERT_PERMISSIONS --> + + <!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application. + Remove the comment if you do not require these default features. --> + <!-- %%INSERT_FEATURES --> + +</manifest> diff --git a/android/res/drawable-hdpi/icon.png b/android/res/drawable-hdpi/icon.png Binary files differnew file mode 100644 index 0000000..01393cf --- /dev/null +++ b/android/res/drawable-hdpi/icon.png diff --git a/android/res/drawable-ldpi/icon.png b/android/res/drawable-ldpi/icon.png Binary files differnew file mode 100644 index 0000000..01393cf --- /dev/null +++ b/android/res/drawable-ldpi/icon.png diff --git a/android/res/drawable-mdpi/icon.png b/android/res/drawable-mdpi/icon.png Binary files differnew file mode 100644 index 0000000..01393cf --- /dev/null +++ b/android/res/drawable-mdpi/icon.png diff --git a/android/res/values/libs.xml b/android/res/values/libs.xml new file mode 100644 index 0000000..4009a77 --- /dev/null +++ b/android/res/values/libs.xml @@ -0,0 +1,25 @@ +<?xml version='1.0' encoding='utf-8'?> +<resources> + <array name="qt_sources"> + <item>https://download.qt.io/ministro/android/qt5/qt-5.9</item> + </array> + + <!-- The following is handled automatically by the deployment tool. It should + not be edited manually. --> + + <array name="bundled_libs"> + <!-- %%INSERT_EXTRA_LIBS%% --> + </array> + + <array name="qt_libs"> + <!-- %%INSERT_QT_LIBS%% --> + </array> + + <array name="bundled_in_lib"> + <!-- %%INSERT_BUNDLED_IN_LIB%% --> + </array> + <array name="bundled_in_assets"> + <!-- %%INSERT_BUNDLED_IN_ASSETS%% --> + </array> + +</resources> diff --git a/example.ico b/example.ico Binary files differnew file mode 100644 index 0000000..a671863 --- /dev/null +++ b/example.ico @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "fps.h" + +#include <QtCore/qdatetime.h> +#include <QtGui/qbrush.h> +#include <QtGui/qpainter.h> + +FPS::FPS(QQuickItem *parent): QQuickPaintedItem(parent), m_currentFPS(0), m_cachedFPS(0) +{ + m_paintPasses.clear(); + setFlag(QQuickItem::ItemHasContents); +} + +FPS::~FPS() +{ +} + +void FPS::updateFPS() +{ + qint64 currentTime = QDateTime::currentDateTime().toMSecsSinceEpoch(); + m_paintPasses.push_back(currentTime); + + while (m_paintPasses[0] < currentTime - 1000) + m_paintPasses.pop_front(); + + int currentCount = m_paintPasses.length(); + m_currentFPS = (currentCount + m_cachedFPS) / 2; + + if (currentCount != m_cachedFPS) + fpsChanged(m_currentFPS); + + m_cachedFPS = currentCount; +} + +int FPS::fps()const +{ + return m_currentFPS; +} + +void FPS::paint(QPainter *painter) +{ + updateFPS(); + painter->setPen(Qt::NoPen); + painter->setRenderHint(QPainter::Antialiasing); + painter->drawRoundedRect(0, 0, boundingRect().width(), boundingRect().height(), 0, 0); + + update(); +} @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef FPSTEXT_H +#define FPSTEXT_H + +#include <QtQuick/qquickpainteditem.h> + +class FPS: public QQuickPaintedItem +{ + Q_OBJECT + Q_PROPERTY(int fps READ fps NOTIFY fpsChanged) +public: + FPS(QQuickItem *parent = 0); + ~FPS(); + + void paint(QPainter *); + + // Get FPS + Q_INVOKABLE int fps() const; + +signals: + void fpsChanged(int); + +private: + void updateFPS(); + + int m_currentFPS; + int m_cachedFPS; + QVector<qint64> m_paintPasses; +}; + +#endif // FPSTEXT_H diff --git a/iconqt.png b/iconqt.png Binary files differnew file mode 100644 index 0000000..01393cf --- /dev/null +++ b/iconqt.png diff --git a/kria-cluster-2d-demo.pro b/kria-cluster-2d-demo.pro new file mode 100644 index 0000000..706a369 --- /dev/null +++ b/kria-cluster-2d-demo.pro @@ -0,0 +1,39 @@ +TEMPLATE = app + +QT += qml quick + +target.path = $$[QT_INSTALL_EXAMPLES]/studio3d/$$TARGET +INSTALLS += target + +SOURCES += main.cpp \ + fps.cpp + +CONFIG += resources_big + +RESOURCES += \ + kria-cluster-2d-demo.qrc \ + qml/telltales.qrc \ + qml/settings.qrc \ + qml/contacts.qrc \ + qml/music.qrc \ + qml/menu.qrc \ + qml/2d.qrc + +OTHER_FILES += qml/* + +RC_ICONS = example.ico + +DISTFILES += \ + android/AndroidManifest.xml \ + android/gradle/wrapper/gradle-wrapper.jar \ + android/gradlew \ + android/res/values/libs.xml \ + android/build.gradle \ + android/gradle/wrapper/gradle-wrapper.properties \ + android/gradlew.bat \ + qmldir + +ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android + +HEADERS += \ + fps.h diff --git a/kria-cluster-2d-demo.qrc b/kria-cluster-2d-demo.qrc new file mode 100644 index 0000000..f52d264 --- /dev/null +++ b/kria-cluster-2d-demo.qrc @@ -0,0 +1,9 @@ +<RCC> + <qresource prefix="/"> + <file alias="main2D.qml">qml/main2D.qml</file> + <file alias="SimuData.qml">qml/SimuData.qml</file> + <file alias="FpsDisplay.qml">qml/FpsDisplay.qml</file> + <file>qml/fonts/TitilliumWeb-SemiBold.ttf</file> + <file>qml/fonts/TitilliumWeb-Regular.ttf</file> + </qresource> +</RCC> diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..dc810fb --- /dev/null +++ b/main.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui/qguiapplication.h> +#include <QtCore/qdir.h> +#include <QtQuick/qquickview.h> +#include <QtQml/qqmlengine.h> +#include <QtGui/qfontdatabase.h> + +#include "fps.h" + +int main(int argc, char *argv[]) +{ + qputenv("QT_QPA_EGLFS_WIDTH", "1920"); + qputenv("QT_QPA_EGLFS_HEIGHT", "720"); + qputenv("QT_QPA_EGLFS_PHYSICAL_WIDTH", "1920"); + qputenv("QT_QPA_EGLFS_PHYSICAL_HEIGHT", "720"); + + QGuiApplication app(argc, argv); + + qmlRegisterType<FPS>("FPS", 1, 0, "FPS"); + + QQuickView viewer; + + QFontDatabase::addApplicationFont("qrc:/qml/fonts/TitilliumWeb-SemiBold.ttf"); + QFont defaultFont; + defaultFont.setFamily("Titillium Web"); + QGuiApplication::setFont(defaultFont); + + viewer.setSource(QUrl("qrc:/main2D.qml")); + + viewer.setTitle(QStringLiteral("Kria Cluster 2D Demo")); + viewer.setResizeMode(QQuickView::SizeRootObjectToView); + viewer.setWidth(1920); + viewer.setHeight(720); + viewer.setColor(QColor("black")); + viewer.show(); + + return app.exec(); +} diff --git a/qml/2D/CarContainer.qml b/qml/2D/CarContainer.qml new file mode 100644 index 0000000..d3f1130 --- /dev/null +++ b/qml/2D/CarContainer.qml @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtMultimedia 5.9 + +Item { + id: carContainer + width: 680 + height: width + + property string videoSrc: redTheme ? "qrc:/videos/car.avi" : "qrc:/videos/carblue.avi" + property string imageSrc: redTheme ? "qrc:/icons/2D/CarOverview.png" : + "qrc:/icons/2D/CarOverviewBlue.png" + + Component.onCompleted: { + videOutput.start(); + } + + Image { + id: carImage + width: 700; + height: width + anchors.centerIn: parent + fillMode: Image.PreserveAspectFit + source: imageSrc + opacity: 0.0 + + Behavior on opacity { + NumberAnimation { duration: 200 } + } + } + + VideoOutput { + id: videOutput + anchors.fill: parent + source: mediaPlayer + + MediaPlayer { + id: mediaPlayer + source: videoSrc + autoLoad: false + loops: 1 + + property int passess: 0 + + onStopped: carImage.opacity = 1.0; + onPositionChanged: { + if (passess === 4) { + curtain.opacity = 0.0; + } else { + passess++; + } + } + } + + function start() { mediaPlayer.play() } + function stop() { mediaPlayer.stop() } + function seek(position) { mediaPlayer.seek(position); } + } + + Rectangle { + id: curtain + anchors.fill: parent + color: "black" + opacity: 1.0 + + Behavior on opacity { + NumberAnimation { duration: 1000 } + } + } + +} diff --git a/qml/2D/ClusterGradient.qml b/qml/2D/ClusterGradient.qml new file mode 100644 index 0000000..0e3d209 --- /dev/null +++ b/qml/2D/ClusterGradient.qml @@ -0,0 +1,207 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtGraphicalEffects 1.0 + +Item { + id: root + + width: 100 + height: 100 + + property double topAndBottomCurtainHeight: 100 + property double leftAndRightCurtainWidth: 100 + + property double topGradientHeight: 200 + property double leftGradientWidth: 700 + property double rightGradientWidth: 300 + property double bottomGradientHeight: 100 + + property string curtainColor: "black" + property string gradientStartColor: "black" + property string gradientStopColor: "transparent" + + property double gradientTopStopPoint: 0.5 + property double gradientLeftStopPoint: 0.6 + property double gradientRightStopPoint: 0.8 + property double gradientBottomStopPoint: 0.8 + + function fadeIn() { + fadeInAnimation.start(); + } + function fadeOut() { + fadeOutAnimation.start(); + } + + // Top gradient + Rectangle { + id: top + anchors.top: parent.top + width: parent.width + height: topAndBottomCurtainHeight + color: curtainColor + + LinearGradient { + width: parent.width + height: topGradientHeight + anchors.top: parent.bottom + start: Qt.point(0, 0) + end: Qt.point(0, height) + gradient: Gradient { + GradientStop { position: 0.0; color: gradientStartColor } + GradientStop { position: gradientTopStopPoint; color: gradientStopColor } + } + } + } + + // Left gradient + Rectangle { + id: left + width: leftAndRightCurtainWidth + height: parent.height + anchors.left: parent.left + color: curtainColor + + LinearGradient { + width: leftGradientWidth + height: parent.height + anchors.left: parent.right + start: Qt.point(0, 0) + end: Qt.point(width, 0) + gradient: Gradient { + GradientStop { position: 0.0; color: gradientStartColor } + GradientStop { position: gradientLeftStopPoint; color: gradientStopColor } + } + } + } + + // Right gradient + Rectangle { + id: right + width: leftAndRightCurtainWidth + height: parent.height + anchors.right: parent.right + color: curtainColor + + LinearGradient { + width: rightGradientWidth + height: parent.height + anchors.right: parent.left + start: Qt.point(0, 0) + end: Qt.point(width, 0) + gradient: Gradient { + GradientStop { position: 0.0; color: gradientStopColor } + GradientStop { position: gradientRightStopPoint; color: gradientStartColor } + } + } + } + + // Bottom gradient + Rectangle { + id: bottom + width: parent.width + height: topAndBottomCurtainHeight + anchors.bottom: parent.bottom + color: curtainColor + + LinearGradient { + width: parent.width + height: bottomGradientHeight + anchors.bottom: parent.top + start: Qt.point(0, 0) + end: Qt.point(0, height) + gradient: Gradient { + GradientStop { position: 0.0; color: gradientStopColor } + GradientStop { position: gradientBottomStopPoint; color: gradientStartColor } + } + } + } + + Rectangle { + id: viewFiller + anchors.fill: parent + opacity: 1.0 + color: "black" + } + + SequentialAnimation { + id: fadeInAnimation + running: false + loops: 1 + + PauseAnimation { duration: 300 } + ParallelAnimation { + PropertyAnimation { + target: viewFiller + properties: "opacity" + from: 1.0 + to: 0.0 + duration: 300 + } + } + } + SequentialAnimation { + id: fadeOutAnimation + running: false + loops: 1 + + PauseAnimation { duration: 300 } + ParallelAnimation { + PropertyAnimation { + target: viewFiller + properties: "opacity" + from: 0.0 + to: 1.0 + duration: 300 + } + } + } +} diff --git a/qml/2D/Gauges.qml b/qml/2D/Gauges.qml new file mode 100644 index 0000000..4000ef3 --- /dev/null +++ b/qml/2D/Gauges.qml @@ -0,0 +1,444 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtGraphicalEffects 1.0 + +GaugesForm { + id: root + + property string tachoUnit: "rpm" + property string tachoUnitSpec: " x 1000" + property string speedUnit: useMetric ? "kph" : "mph" + property string needleSrc: "qrc:/icons/2D/NeedleBg.png" + property string tachoImageSrc: redTheme ? "qrc:/icons/2D/TachoMeterBg.png" : + "qrc:/icons/2D/TachoMeterBgBlue.png" + property string kphSpeedImageSrc: redTheme ? "qrc:/icons/2D/SpeedMeterBg.png" : + "qrc:/icons/2D/SpeedMeterBgBlue.png" + property string mphSpeedImageSrc: redTheme ? "qrc:/icons/2D/MphSpeedMeterBg.png" : + "qrc:/icons/2D/MphSpeedMeterBgBlue.png" + property string speedImageSrc: useMetric ? kphSpeedImageSrc : mphSpeedImageSrc + + property int vehicleSpeed: 0 + property int vehicleRpm: 0 + + property int slowDuration: 500 + property int fastDuration: 100 + + signal gaugeClicked() + + Component.onCompleted: { + speedNeedleSpeed = vehicleSpeed; + tachoText = vehicleSpeed; + speedText = vehicleSpeed; + } + + Behavior on speedUnit { + SequentialAnimation { + NumberAnimation { + target: speedImage + properties: "scale" + to: 0.3 + duration: fastDuration + } + NumberAnimation { + target: speedImage + properties: "scale" + to: 1.0 + duration: slowDuration + } + } + } + + MouseArea { + id: tachoMouse + anchors.fill: tachoNumRect + onClicked: { root.gaugeClicked(); } + } + + MouseArea { + id: speedMouse + anchors.fill: speedNumRect + onClicked: { root.gaugeClicked(); } + } + + states: [ + State { + name: "Driving"; + + AnchorChanges { + target: tachoMeter + anchors.left: root.left + anchors.verticalCenter: root.verticalCenter + } + PropertyChanges { + target: tachoMeter + anchors.verticalCenterOffset: 0 + anchors.rightMargin: 0 + } + AnchorChanges { + target: speedMeter + anchors.right: root.right + anchors.verticalCenter: root.verticalCenter + } + PropertyChanges { + target: speedMeter + anchors.verticalCenterOffset: 0 + anchors.leftMargin: 0 + } + }, + State { + name: "Navigation"; + + AnchorChanges { + target: tachoMeter + anchors.left: root.left + anchors.verticalCenter: root.verticalCenter + } + PropertyChanges { + target: tachoMeter + anchors.verticalCenterOffset: 253 + anchors.leftMargin: -100 + } + AnchorChanges { + target: speedMeter + anchors.right: root.right + anchors.verticalCenter: root.verticalCenter + } + PropertyChanges { + target: speedMeter + anchors.verticalCenterOffset: 253 + anchors.rightMargin: -100 + } + } + ] + + transitions: [ + Transition { + from:"Driving" + to: "Navigation" + SequentialAnimation { + ParallelAnimation { + PropertyAnimation { + target: tachoNeedle + properties: "opacity" + from: 1.0 + to: 0.0 + duration: fastDuration + } + PropertyAnimation { + target: speedNeedle + properties: "opacity" + from: 1.0 + to: 0.0 + duration: fastDuration + } + } + ParallelAnimation { + PropertyAnimation { + target: tachoCorner + properties: "opacity" + from: 0.0 + to: 1.0 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "opacity" + from: 0.0 + to: 1.0 + duration: slowDuration + } + PropertyAnimation { + target: tachoMeter + properties: "scale" + from: 1.0 + to: 0.3 + duration: slowDuration + } + PropertyAnimation { + target: speedMeter + properties: "scale" + from: 1.0 + to: 0.3 + duration: slowDuration + } + PropertyAnimation { + target: tachoCorner + properties: "scale" + from: 3.0 + to: 1.0 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "scale" + from: 3.0 + to: 1.0 + duration: slowDuration + } + } + ParallelAnimation { + PropertyAnimation { + target: tachoNumRect + properties: "x" + from: 216 + to: 116 + duration: slowDuration + } + PropertyAnimation { + target: tachoNumRect + properties: "y" + from: 270 + to: 520 + duration: slowDuration + } + PropertyAnimation { + target: speedNumRect + properties: "x" + from: 1524 + to: 1624 + duration: slowDuration + } + PropertyAnimation { + target: speedNumRect + properties: "y" + from: 270 + to: 520 + duration: slowDuration + } + // Corners + PropertyAnimation { + target: tachoCorner + properties: "x" + from: 212 + to: 112 + duration: slowDuration + } + PropertyAnimation { + target: tachoCorner + properties: "y" + from: 266 + to: 516 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "x" + from: 1520 + to: 1620 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "y" + from: 266 + to: 516 + duration: slowDuration + } + AnchorAnimation { duration: slowDuration } + PropertyAnimation { + target: tachoMeter + properties: "scale" + from: 0.3 + to: 0.0 + duration: 2*slowDuration + } + PropertyAnimation { + target: speedMeter + properties: "scale" + from: 0.3 + to: 0.0 + duration: 2*slowDuration + } + } + } + }, + Transition { + from: "Navigation" + to: "Driving" + SequentialAnimation { + ParallelAnimation { + PropertyAnimation { + target: tachoNumRect + properties: "x" + from: 116 + to: 216 + duration: slowDuration + } + PropertyAnimation { + target: tachoNumRect + properties: "y" + from: 520 + to: 270 + duration: slowDuration + } + PropertyAnimation { + target: speedNumRect + properties: "x" + from: 1624 + to: 1524 + duration: slowDuration + } + PropertyAnimation { + target: speedNumRect + properties: "y" + from: 520 + to: 270 + duration:slowDuration + } + // Corners + PropertyAnimation { + target: tachoCorner + properties: "x" + from: 112 + to: 212 + duration: slowDuration + } + PropertyAnimation { + target: tachoCorner + properties: "y" + from: 516 + to: 266 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "x" + from: 1620 + to: 1520 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "y" + from: 516 + to: 266 + duration: slowDuration + } + AnchorAnimation { duration: slowDuration } + PropertyAnimation { + target: tachoMeter + properties: "scale" + from: 0.0 + to:0.3 + duration: slowDuration + } + PropertyAnimation { + target: speedMeter + properties: "scale" + from: 0.0 + to: 0.3 + duration: slowDuration + } + } + ParallelAnimation { + PropertyAnimation { + target: tachoMeter + properties: "scale" + from: 0.3 + to: 1.0 + duration: slowDuration + } + PropertyAnimation { + target: speedMeter + properties: "scale" + from: 0.3 + to: 1.0 + duration: slowDuration + } + PropertyAnimation { + target: tachoCorner + properties: "scale" + from: 1.0 + to: 3.0 + duration: slowDuration + } + PropertyAnimation { + target: speedCorner + properties: "scale" + from: 1.0 + to: 3.0 + duration: slowDuration + } + } + ParallelAnimation { + PropertyAnimation { + target: tachoNeedle + properties: "opacity" + from: 0.0 + to: 1.0 + duration: fastDuration + } + PropertyAnimation { target: speedNeedle + properties: "opacity" + from: 0.0 + to: 1.0 + duration: fastDuration + } + PropertyAnimation { + target: tachoCorner + properties: "opacity" + from: 1.0 + to: 0.0 + duration: fastDuration + } + PropertyAnimation { + target: speedCorner + properties: "opacity" + from: 1.0 + to: 0.0 + duration: fastDuration + } + } + } + } + ] +} diff --git a/qml/2D/GaugesForm.ui.qml b/qml/2D/GaugesForm.ui.qml new file mode 100644 index 0000000..fe9727f --- /dev/null +++ b/qml/2D/GaugesForm.ui.qml @@ -0,0 +1,237 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.7 + +Item { + id: root + + property alias tachoMeter: tachoMeter + property alias speedMeter: speedMeter + + property alias tachoText: tachoText.text + property alias speedText: speedText.text + + property alias tachoNeedleRpm: tachoNeedle.vehicleRpm + property alias speedNeedleSpeed: speedNeedle.vehicleSpeed + + property alias tachoNumRect: tachoNumRect + property alias speedNumRect: speedNumRect + property alias tachoCorner: tachoCorner + property alias speedCorner: speedCorner + property alias tachoNeedle: tachoNeedle + property alias speedNeedle: speedNeedle + property alias speedImage: speedImage + + width: 1920 + height: 720 + + Item { + id: tachoMeter + width: 612 + height: width + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + + Image { + id: tachoImage + x: 0 + y: 0 + width: parent.width + height: width + source: tachoImageSrc + visible: true + } + } // tachoMeter + + Rectangle { + id: tachoNumRect + x: 216 + y: 270 + width: 180 + height: width + color: "#000000" + radius: width + + Text { + id: tachoText + color: "#ffffff" + anchors.horizontalCenterOffset: 0 + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: parent.top + anchors.topMargin: 40 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 60 + } + Text { + id: tachoUnitText + color: "#ffffff" + text: root.tachoUnit + anchors.horizontalCenterOffset: -35 + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: tachoText.bottom + anchors.topMargin: -5 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 20 + } + Text { + id: tachoUnitSpecText + color: "#ffffff" + text: root.tachoUnitSpec + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.verticalCenter: tachoUnitText.verticalCenter + anchors.left: tachoUnitText.right + anchors.rightMargin: 2 + font.pixelSize: 20 + } + z: 1000 + } + TachoNeedle { + id: tachoNeedle + x: 0 + y: 25 + width: 612 + height: width + z: tachoNumRect.z - 1 + } + Rectangle { + id: tachoCorner + scale: 3.0 + opacity: 0.0 + x: 212 + y: 266 + width: tachoNumRect.width + 8 + height: width + radius: width + color: "transparent" + border.color: "white" + border.width: 7 + } + + Item { + id: speedMeter + x: 1440 + width: 612 + height: width + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + Image { + id: speedImage + x: 0 + y: 0 + width: parent.width + height: width + source: speedImageSrc + visible: true + } + } // speedMeter + + Rectangle { + id: speedNumRect + x: 1524 + y: 270 + width: 180 + height: width + radius: width + color: "#000000" + + Text { + id: speedText + x: 150 + color: "#ffffff" + anchors.horizontalCenterOffset: 0 + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: parent.top + anchors.topMargin: 40 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 60 + } + Text { + id: speedUnitText + x: 150 + color: "#ffffff" + text: root.speedUnit + anchors.horizontalCenterOffset: 0 + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: speedText.bottom + anchors.topMargin: -5 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 20 + } + + z: 1000 + } + SpeedNeedle { + id: speedNeedle + x: 654 + y: 25 + width: 612 + height: width + z: speedNumRect.z - 1 + } + Rectangle { + id: speedCorner + scale: 3.0 + opacity: 0.0 + x: 1520 + y: 266 + width: speedNumRect.width + 8 + height: width + radius: width + color: "transparent" + border.color: "white" + border.width: 7 + } +} diff --git a/qml/2D/Navigation.qml b/qml/2D/Navigation.qml new file mode 100644 index 0000000..c1a9edb --- /dev/null +++ b/qml/2D/Navigation.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +Item { + id: root + + width: 2560; height: 960 + + function fadeIn() { + clusterGradient.fadeIn(); + } + function fadeOut() { + clusterGradient.fadeOut(); + } + + Image { + id: fakeMap + source: "qrc:/icons/Map.png" + y: -580 + width: 2560 + height: 1540 + } + ClusterGradient { + id: clusterGradient + y: -580 + width: fakeMap.width + height: fakeMap.height + 580 + topAndBottomCurtainHeight: 680 + } + + PropertyAnimation { + target: fakeMap + property: "y" + loops: Animation.Infinite + duration: 60000 + running: startupAnimation + from: -580 + to: 0 + } +} diff --git a/qml/2D/SpeedNeedle.qml b/qml/2D/SpeedNeedle.qml new file mode 100644 index 0000000..88b31f3 --- /dev/null +++ b/qml/2D/SpeedNeedle.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +Item { + id: root + + property alias speedNeedle: speedNeedle + property int vehicleSpeed: 0 + property int offset: -135 + + x: 0 + y: 0 + width: 5 + height: 188 + + Image { + id: speedNeedle + x: parent.x + y: parent.y + width: parent.width + height: parent.height + source: needleSrc + transformOrigin: Item.Center + rotation: offset + } +} diff --git a/qml/2D/TachoNeedle.qml b/qml/2D/TachoNeedle.qml new file mode 100644 index 0000000..db58851 --- /dev/null +++ b/qml/2D/TachoNeedle.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +Item { + id: root + + property alias tachoNeedle: tachoNeedle + property int vehicleRpm: 0 + property int offset: -135 + + x: 0 + y: 0 + width: 5 + height: 188 + + Image { + id: tachoNeedle + x: parent.x + y: parent.y + width: parent.width + height: parent.height + source: needleSrc + transformOrigin: Item.Center + rotation: offset + } +} diff --git a/qml/2d.qrc b/qml/2d.qrc new file mode 100644 index 0000000..7738a84 --- /dev/null +++ b/qml/2d.qrc @@ -0,0 +1,26 @@ +<RCC> + <qresource prefix="/"> + <file>2D/Gauges.qml</file> + <file>2D/GaugesForm.ui.qml</file> + <file>2D/TachoNeedle.qml</file> + <file>2D/SpeedNeedle.qml</file> + <file>2D/CarContainer.qml</file> + <file>2D/ClusterGradient.qml</file> + <file>icons/2D/MenuBottomLineCrop.png</file> + <file>icons/2D/MenuTopLineCrop.png</file> + <file>icons/2D/CarOverview.jpg</file> + <file>2D/Navigation.qml</file> + <file>icons/2D/SpeedMeterBg.png</file> + <file>icons/2D/TachoMeterBg.png</file> + <file>icons/2D/NeedleBg.png</file> + <file>icons/2D/SpeedMeterBgBlue.png</file> + <file>icons/2D/TachoMeterBgBlue.png</file> + <file>icons/2D/CarOverview.png</file> + <file>icons/2D/CarOverviewBlue.png</file> + <file>icons/2D/MphSpeedMeterBg.png</file> + <file>icons/2D/MphSpeedMeterBgBlue.png</file> + <file>icons/Map.png</file> + <file>videos/car.avi</file> + <file>videos/carblue.avi</file> + </qresource> +</RCC> diff --git a/qml/ContactsContainer.qml b/qml/ContactsContainer.qml new file mode 100644 index 0000000..6353ffd --- /dev/null +++ b/qml/ContactsContainer.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ContactsContainerForm { + id: contactsContainer + + property string imageBgSrc: redTheme ? "qrc:/icons/RedHighlight.png" : + "qrc:/icons/BlueHighlight.png" +} diff --git a/qml/ContactsContainerForm.ui.qml b/qml/ContactsContainerForm.ui.qml new file mode 100644 index 0000000..a22a8f2 --- /dev/null +++ b/qml/ContactsContainerForm.ui.qml @@ -0,0 +1,166 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.0 + +Item { + id: contacts + width: 680 + height: 680 + + Image { + id: image + height: 680 + anchors.top: title.bottom + anchors.topMargin: 0 + anchors.right: listView.right + anchors.rightMargin: 0 + anchors.left: listView.left + anchors.leftMargin: 0 + source: imageBgSrc + } + + ListView { + id: listView + interactive: false + contentHeight: 160 + anchors.top: title.bottom + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.rightMargin: 0 + anchors.bottomMargin: 0 + anchors.leftMargin: 0 + anchors.topMargin: 3 + highlight: Image { + source: "qrc:/icons/selectionBox.png" + } + currentIndex: selectedMenuIndex + delegate: Item { + width: listView.width + height: 100 + Row { + anchors.fill: parent + anchors.leftMargin: 100 + spacing: 20 + + Image { + source: face + anchors.verticalCenter: parent.verticalCenter + } + Text { + text: name + color: "#ffffff" + opacity: itemOpacity + font.pixelSize: 50 + anchors.verticalCenter: parent.verticalCenter + } + } + MouseArea { + anchors.fill: parent + onClicked: selectedMenuIndex = index + } + } + model: ListModel { + ListElement { + face: "qrc:/icons/simonedoe.png" + name: "Simone Brown" + itemOpacity: 1.0 + } + + ListElement { + face: "qrc:/icons/timdoe.png" + name: "Tim Davis" + itemOpacity: 1.0 + } + + ListElement { + face: "qrc:/icons/jimdoe.png" + name: "Jim Johnson" + itemOpacity: 1.0 + } + + ListElement { + face: "qrc:/icons/lauradoe.png" + name: "Laura Jones" + itemOpacity: 1.0 + } + + ListElement { + face: "qrc:/icons/janedoe.png" + name: "Jane Smith" + itemOpacity: 0.75 + } + + ListElement { + face: "qrc:/icons/johndoe.png" + name: "John Williams" + itemOpacity: 0.5 + } + } + } + + Text { + id: title + x: 150 + width: 184 + height: 57 + color: "#ffffff" + text: qsTr("Contacts") + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: parent.top + anchors.topMargin: 0 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 60 + } +} diff --git a/qml/FpsDisplay.qml b/qml/FpsDisplay.qml new file mode 100644 index 0000000..17d4c0b --- /dev/null +++ b/qml/FpsDisplay.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import FPS 1.0 + +Item { + id:root + + property bool hidden: false + + width: 30 + height: 30 + + Rectangle { + id: fpsRect + width: parent.width + height: parent.height + anchors.centerIn: parent + color: "transparent" + FPS { + id: fpsText + width: 0.7*parent.width + height: 0.7*parent.height + anchors.centerIn: parent + Text { + color: "white" + anchors.centerIn: parent + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + font.pixelSize: 0.5*root.height + font.bold: false + text: fpsText.fps.toFixed(0) + } + visible: !root.hidden + } + MouseArea { + anchors.fill: parent + onClicked: { + root.hidden = !root.hidden + } + } + } +} diff --git a/qml/Help.qml b/qml/Help.qml new file mode 100644 index 0000000..6e449b4 --- /dev/null +++ b/qml/Help.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +Item { + id: root + width: 680 + height: 680 + Rectangle { + id: helpItem + width: parent.width + height: parent.height + color: "black" + Text { + id: helpText + width: parent.width + anchors.centerIn: parent + text: "Copyright (C) 2017 The Qt Company Ltd." + color: "#ffffff" + anchors.horizontalCenterOffset: 0 + wrapMode: Text.WordWrap + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 30 + } + } +} diff --git a/qml/MusicContainer.qml b/qml/MusicContainer.qml new file mode 100644 index 0000000..5e40738 --- /dev/null +++ b/qml/MusicContainer.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +MusicContainerForm { + id: musicContainer + + property int album: selectedMenuIndex + property string imageBgSrc: redTheme ? "qrc:/icons/musicBackground.png" : + "qrc:/icons/musicBackgroundBlue.png" + + PropertyAnimation { + id: progressAnimation + duration: 60000 + running: true + target: progressBar + property: "value" + from: 0. + to: 1. + } + + onAlbumChanged: { + progressAnimation.restart(); + switch (album) { + case 0: + artistText = "Arch Enemy"; + albumText = "Will To Power"; + albumCoverSource = "qrc:/icons/album1.png"; + break; + case 1: + artistText = "Battle Beast"; + albumText = "Unholy Savior"; + albumCoverSource = "qrc:/icons/album2.png"; + break; + case 2: + artistText = "Machine Head"; + albumText = "Bloodstone & Diamonds"; + albumCoverSource = "qrc:/icons/album3.png"; + break; + case 3: + artistText = "Metallica"; + albumText = "Master of Puppets"; + albumCoverSource = "qrc:/icons/album4.png"; + break; + case 4: + artistText = "Sabaton"; + albumText = "Primo Victoria"; + albumCoverSource = "qrc:/icons/album5.png"; + break; + case 5: + artistText = "Sabaton"; + albumText = "The Last Stand"; + albumCoverSource = "qrc:/icons/album6.png"; + break; + } + } + + MouseArea { + anchors.fill: parent + onClicked: { + selectedMenuIndex++; + if (selectedMenuIndex > maxMenuIndex) + selectedMenuIndex = 0; + } + } +} diff --git a/qml/MusicContainerForm.ui.qml b/qml/MusicContainerForm.ui.qml new file mode 100644 index 0000000..c9303ea --- /dev/null +++ b/qml/MusicContainerForm.ui.qml @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.0 + +Item { + id: music + width: 680 + height: 680 + property alias albumText: album.text + property alias artistText: artist.text + property alias albumCoverSource: albumCover.source + property alias progressBar: progressBar + + Image { + id: image + anchors.fill: parent + source: imageBgSrc + } + + Text { + id: title + x: 150 + width: 184 + height: 57 + color: "#ffffff" + text: qsTr("Music") + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: parent.top + anchors.topMargin: 0 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 60 + } + + ProgressBar { + id: progressBar + y: 484 + opacity: 0.5 + to: 1 + anchors.left: albumContainer.left + anchors.leftMargin: 0 + anchors.right: albumContainer.right + anchors.rightMargin: 0 + value: 0 + } + + Text { + id: album + x: 329 + y: 148 + color: "#ffffff" + text: qsTr("Will To Power") + verticalAlignment: Text.AlignTop + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenterOffset: 2 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 40 + } + + Text { + id: artist + x: 329 + y: 94 + color: "#ffffff" + text: qsTr("Arch Enemy") + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenterOffset: 2 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 40 + } + + Rectangle { + id: albumContainer + x: 212 + y: 212 + width: 276 + height: 276 + color: "#00000000" + radius: 15 + border.color: "#00000000" + border.width: 10 + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + + Image { + id: albumCover + x: 0 + y: 0 + width: 256 + height: 256 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + source: "qrc:/icons/album1.png" + } + } +} diff --git a/qml/OverlayContainer.qml b/qml/OverlayContainer.qml new file mode 100644 index 0000000..524ecc0 --- /dev/null +++ b/qml/OverlayContainer.qml @@ -0,0 +1,200 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +OverlayContainerForm { + id: indicatorContainer + + // Safety critical icons + property bool parkBrake: startupAnimation ? true : false + property bool flatTire: startupAnimation ? true : false + property bool fuelLevel: startupAnimation ? true : false + property bool seatbelt: startupAnimation ? true : false + property bool oilLevel: startupAnimation ? true : false + property bool brakeFailure: startupAnimation ? true : false + + onParkBrakeChanged: { + parkingBrakeColor = parkBrake ? "#e41e25" : "#222324"; + } + + onFlatTireChanged: { + tyreFailureColor = flatTire ? "#e6bd32" : "#222324"; + } + + onFuelLevelChanged: { + fuelLowColor = fuelLevel ? "#e41e25" : "#222324"; + } + + onOilLevelChanged: { + oilLowColor = oilLevel ? "#e41e25" : "#222324"; + } + + onSeatbeltChanged: { + seatbeltOffColor = seatbelt ? "#e41e25" : "#222324"; + } + + onBrakeFailureChanged: { + brakeFailureColor = brakeFailure ? "#e41e25" : "#222324"; + } + + // Non-safety critical indicators + property int turnSignal: startupAnimation ? Qt.LeftArrow | Qt.RightArrow : simuData.turnSignal + + onTurnSignalChanged: { + if (turnSignal !== Qt.NoArrow) + signalTimer.restart(); + else + signalTimer.stop(); + var turnLeft = (turnSignal & Qt.LeftArrow); + var turnRight = (turnSignal & Qt.RightArrow); + leftTurnSignalSource = turnLeft ? "qrc:/icons/icon_turnsignal_on.png" + : "qrc:/icons/icon_turnsignal_off.png"; + rightTurnSignalSource = turnRight ? "qrc:/icons/icon_turnsignal_on.png" + : "qrc:/icons/icon_turnsignal_off.png"; + } + + Timer { + id: signalTimer + interval: 500 + running: false + repeat: true + property bool flashing: false + onTriggered: { + flashing = !flashing + var turnLeft = (flashing && (turnSignal & Qt.LeftArrow)); + var turnRight = (flashing && (turnSignal & Qt.RightArrow)); + leftTurnSignalSource = turnLeft ? "qrc:/icons/icon_turnsignal_on.png" + : "qrc:/icons/icon_turnsignal_off.png"; + rightTurnSignalSource = turnRight ? "qrc:/icons/icon_turnsignal_on.png" + : "qrc:/icons/icon_turnsignal_off.png"; + } + } + + Component.onCompleted: { + overlayBackground.visible = false; + menuCar.scale = 0.75; + menuCar.opacity = 0.5; + menuNavigation.scale = 0.75; + menuNavigation.opacity = 0.5; + menuMusic.scale = 0.75; + menuMusic.opacity = 0.5; + menuCall.scale = 0.75; + menuCall.opacity = 0.5; + } + + function select(menuIndex) { + // settings - navigation - music - call - car + menuSettings.scale = 0.75; + menuSettings.opacity = 0.5; + menuCar.scale = 0.75; + menuCar.opacity = 0.5; + menuNavigation.scale = 0.75; + menuNavigation.opacity = 0.5; + menuMusic.scale = 0.75; + menuMusic.opacity = 0.5; + menuCall.scale = 0.75; + menuCall.opacity = 0.5; + + switch (menuIndex) { + case 1: + menuSettings.scale = 1.0; + menuSettings.opacity = 1.0; + break; + case 2: + menuNavigation.scale = 1.0; + menuNavigation.opacity = 1.0; + break; + case 3: + menuMusic.scale = 1.0; + menuMusic.opacity = 1.0; + break; + case 4: + menuCall.scale = 1.0; + menuCall.opacity = 1.0; + break; + case 5: + menuCar.scale = 1.0; + menuCar.opacity = 1.0; + break; + } + } + + // Handle content button clicks + mouseAreaSettings.onClicked: { + previousContentIndex = contentIndex; + contentIndex = 1; + selectContent(1); + } + + mouseAreaNavigation.onClicked: { + previousContentIndex = contentIndex; + contentIndex = 2; + selectContent(2); + } + + mouseAreaMusic.onClicked: { + previousContentIndex = contentIndex; + contentIndex = 3; + selectContent(3); + } + + mouseAreaCall.onClicked: { + previousContentIndex = contentIndex; + contentIndex = 4; + selectContent(4); + } + + mouseAreaCar.onClicked: { + previousContentIndex = contentIndex; + contentIndex = 5; + selectContent(5); + } +} diff --git a/qml/OverlayContainerForm.ui.qml b/qml/OverlayContainerForm.ui.qml new file mode 100644 index 0000000..b6ef963 --- /dev/null +++ b/qml/OverlayContainerForm.ui.qml @@ -0,0 +1,254 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Extras 1.4 + +Item { + id: overlay + width: 2560 + height: 960 + property alias mouseAreaSettings: mouseAreaSettings + property alias mouseAreaNavigation: mouseAreaNavigation + property alias mouseAreaMusic: mouseAreaMusic + property alias mouseAreaCall: mouseAreaCall + property alias mouseAreaCar: mouseAreaCar + property alias time: time + property alias menuCall: menuCall + property alias menuMusic: menuMusic + property alias menuNavigation: menuNavigation + property alias menuCar: menuCar + property alias menuSettings: menuSettings + property alias rightTurnSignalSource: rightTurnSignal.source + property alias oilLowColor: oilLow.color + property alias fuelLowColor: fuelLow.color + property alias tyreFailureColor: tyreFailure.color + property alias brakeFailureColor: brakeFailure.color + property alias parkingBrakeColor: parkingBrake.color + property alias seatbeltOffColor: seatbeltOff.color + property alias leftTurnSignalSource: leftTurnSignal.source + property alias overlayBackground: overlayBackground + property alias menuBottom: menu.bottom + property alias tellTalesTop: telltalesRight.top + + Image { + id: overlayBackground + anchors.fill: parent + source: "icons/QML_mask.jpg" + } + + Row { + id: telltalesLeft + x: 649 + y: 872 + width: 500 + height: 80 + spacing: 62 + + Image { + id: leftTurnSignal + width: 78 + height: 78 + fillMode: Image.Stretch + source: "icons/icon_turnsignal_off.png" + } + + Picture { + id: seatbeltOff + width: 78 + height: 78 + source: "qrc:/iso-icons/iso_grs_7000_4_0249.dat" + } + + Picture { + id: parkingBrake + width: 78 + height: 78 + source: "qrc:/iso-icons/iso_grs_7000_4_0238.dat" + } + + Picture { + id: brakeFailure + x: 280 + width: 78 + height: 78 + source: "qrc:/iso-icons/iso_grs_7000_4_0239.dat" + } + } + + Row { + id: menu + x: 907 + y: 19 + width: 747 + height: 95 + spacing: 68 + + Image { + id: menuSettings + width: 95 + height: 95 + fillMode: Image.PreserveAspectFit + source: "icons/settingsIcon.png" + + MouseArea { + id: mouseAreaSettings + anchors.fill: parent + enabled: allowSelection + } + } + + Image { + id: menuNavigation + width: 95 + height: 95 + fillMode: Image.PreserveAspectFit + source: "icons/navigationIcon.png" + + MouseArea { + id: mouseAreaNavigation + width: 95 + height: 95 + anchors.fill: parent + enabled: allowSelection + } + } + + Image { + id: menuMusic + width: 95 + height: 95 + fillMode: Image.PreserveAspectFit + source: "icons/musicIcon.png" + + MouseArea { + id: mouseAreaMusic + anchors.fill: parent + enabled: allowSelection + } + } + + Image { + id: menuCall + width: 95 + height: 95 + fillMode: Image.PreserveAspectFit + source: "icons/callIcon.png" + + MouseArea { + id: mouseAreaCall + anchors.fill: parent + enabled: allowSelection + } + } + Image { + id: menuCar + width: 95 + height: 95 + fillMode: Image.PreserveAspectFit + source: "icons/carIcon.png" + + MouseArea { + id: mouseAreaCar + anchors.fill: parent + enabled: allowSelection + } + } + } + + Row { + id: telltalesRight + x: 1436 + y: 872 + width: 500 + height: 80 + spacing: 62 + + Picture { + id: tyreFailure + width: 78 + height: 78 + source: "qrc:/iso-icons/iso_grs_7000_4_1434A.dat" + } + + Picture { + id: fuelLow + width: 78 + height: 78 + source: "qrc:/iso-icons/iso_grs_7000_4_0245.dat" + } + + Picture { + id: oilLow + width: 78 + height: 78 + source: "qrc:/iso-icons/iso_grs_7000_4_0248.dat" + } + + Image { + id: rightTurnSignal + width: 78 + height: 78 + source: "icons/icon_turnsignal_off.png" + rotation: 180 + } + } + + Text { + id: time + x: 1220 + y: 883 + color: "#ffffff" + text: qsTr("00:00") + font.family: "Tahoma" + horizontalAlignment: Text.AlignHCenter + font.pixelSize: 48 + } +} diff --git a/qml/SettingsContainer.qml b/qml/SettingsContainer.qml new file mode 100644 index 0000000..216da60 --- /dev/null +++ b/qml/SettingsContainer.qml @@ -0,0 +1,338 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import "./listmodels" + +SettingsContainerForm { + id: settingsContainer + + property string imageBgSrc: redTheme ? "qrc:/icons/RedHighlight.png" : + "qrc:/icons/BlueHighlight.png" + property string menuBackSrc: redTheme ? "qrc:/icons/MenuBack.png" : + "qrc:/icons/MenuBackBlue.png" + property var modelMap: ({ 0:displayModel, 1: daModel, 2: lightningModel, + 3: chimesModel, 4: convenienceModel }) + property var previousModel: mainModel + property int subMenuLevel: 0 + property string currentSetting: "" + property string currentSubSetting: "" + + onSubMenuLevelChanged: { + if (subMenuLevel === 0) { + setMainMenu(); + highlightSpeed = 600; + } else if (subMenuLevel === 1) { + currentSubSetting = ""; + listview.model = previousModel; + titleText = currentSetting; + highlightSpeed = 200; + } + } + onCurrentSettingChanged: { + titleText = currentSetting; + } + onCurrentSubSettingChanged: { + titleText = currentSubSetting; + } + + function handleMenu() { + if (subMenuLevel === 0) { + setMenu(selectedMenuIndex); + // Reset selectedMenuIndex + selectedMenuIndex = 0; + } else if (subMenuLevel === 1) { + handleSubMenu(selectedMenuIndex); + // Reset selectedMenuIndex + selectedMenuIndex = 0; + } else { + handleAction(selectedMenuIndex); + } + } + function setMainMenu() { + listview.model = mainModel; + titleText = qsTr("Settings"); + } + function setMenu(selectedIndex) { + if (selectedIndex === listview.count - 1) { + helpItem.visible = true; + } else { + currentSetting = listview.model.get(selectedIndex).name; + previousModel = modelMap[selectedMenuIndex]; + subMenuLevel++; + } + } + function handleSubMenu(selectedIndex) { + if (selectedIndex === listview.count - 1) { + subMenuLevel--; + } else { + appendMenuActions(selectedIndex); + subMenuLevel++; + } + } + function appendMenuActions(selectedIndex) { + if (listview.model === displayModel) { + if (selectedIndex === 0) { + listview.model = displayColorModel + } else { + listview.model = displayUnitModel + } + } else if (listview.model === daModel) { + currentSubSetting = listview.model.get(selectedIndex).name; + if (selectedIndex === 0) { + listview.model = daESCModel; + } else { + listview.model = daTrafficModel;} + } else if (listview.model === lightningModel) { + currentSubSetting = listview.model.get(selectedIndex).name; + if (selectedIndex === 0) { + listview.model = lightningAutoModel; + } else { + listview.model = lightningHdlampModel; + } + } else if (listview.model === chimesModel) { + currentSubSetting = listview.model.get(selectedIndex).name; + if (selectedIndex === 0) { + listview.model = chimesParkModel; + } else if (selectedIndex === 1) { + listview.model = chimesInfoModel; + } else { + listview.model = chimesWarningModel; + } + } else if (listview.model === convenienceModel) { + currentSubSetting = listview.model.get(selectedIndex).name; + if (selectedIndex === 0) { + listview.model = convenienceAuxModel; + } else { + listview.model = convenienceParkHeaterModel + } + } + } + function handleAction(selectedIndex) { + if (selectedIndex === listview.count -1) { + subMenuLevel--; + } else { + var selectedOption = listview.model.get(selectedIndex).name; + if (listview.model === displayColorModel) { + redTheme = selectedOption === qsTr("Red") ? true : false + } else if (listview.model === displayUnitModel) { + useMetric = selectedOption === qsTr("Kph") ? true : false + } else if (listview.model === daESCModel) { + esc = selectedOption; + } else if (listview.model === daTrafficModel) { + trafficSigns = selectedOption; + } else if (listview.model === lightningAutoModel) { + autoHighBeam = selectedOption; + } else if (listview.model === lightningHdlampModel) { + hdLampDelay = selectedOption; + } else if (listview.model === chimesParkModel) { + chimesPark = selectedOption; + } else if (listview.model === chimesInfoModel) { + chimesInfo = selectedOption; + } else if (listview.model === chimesWarningModel) { + chimesWarning = selectedOption; + } else if (listview.model === convenienceAuxModel) { + auxHeater = selectedOption; + } else if (listview.model === convenienceParkHeaterModel) { + parkHeater = selectedOption; + } + } + } + function getCheckVisibility(itemName) { + var result = false; + if (listview.model === displayColorModel) { + if (itemName === qsTr("Red") && redTheme) { + result = true; + } else if (itemName === qsTr("Blue") && !redTheme) { + result = true; + } + } else if (listview.model === displayUnitModel) { + if (itemName === qsTr("Kph") && useMetric) { + result = true; + } else if (itemName === qsTr("Mph") && !useMetric) { + result = true; + } + } else if (listview.model === daESCModel) { + return itemName === esc ? true : false; + } else if (listview.model === daTrafficModel) { + return itemName === trafficSigns ? true : false; + } else if (listview.model === lightningAutoModel) { + return itemName === autoHighBeam ? true : false; + } else if (listview.model === lightningHdlampModel) { + return itemName === hdLampDelay ? true : false; + } else if (listview.model === chimesParkModel) { + return itemName === chimesPark ? true : false; + } else if (listview.model === chimesInfoModel) { + return itemName === chimesInfo ? true : false; + } else if (listview.model === chimesWarningModel) { + return itemName === chimesWarning ? true : false; + } else if (listview.model === convenienceAuxModel) { + return itemName === auxHeater ? true : false; + } else if (listview.model === convenienceParkHeaterModel) { + return itemName === parkHeater ? true : false; + } + return result; + } + + Component { + id: settingsListDelegate + Item { + width: listview.width + height: 100 + Text { + id: itemText + text: name + visible: name !== qsTr("Back") + color: "#ffffff" + opacity: itemOpacity + font.pixelSize: 50 + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + } + Image { + id: backIcon + source: menuBackSrc + visible: name === qsTr("Back") + fillMode: Image.PreserveAspectFit + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + } + Text { + id: checkMark + text: "\u2713" + visible: getCheckVisibility(itemText.text) + color: "#ffffff" + opacity: itemOpacity + font.pixelSize: 50 + anchors.verticalCenter: parent.verticalCenter + anchors.right: itemText.left + anchors.rightMargin: 20 + } + MouseArea { + anchors.fill: parent + onClicked: { + if (selectedMenuIndex !== index) { + selectedMenuIndex = index; + highlightTimer.start(); + } else { + selectedMenuIndex = index; + handleMenu(); + } + } + } + } + } + + Timer { + id: highlightTimer + interval: highlightSpeed === 200 ? 500 : 1000 + onTriggered: { handleMenu(); } + } + + SettingsMainModel { + id: mainModel + } + + SettingsDisplayModel { + id: displayModel + } + DisplayColorModel { + id: displayColorModel + } + DisplayUnitsModel { + id: displayUnitModel + } + + SettingsDriverAssistModel { + id: daModel + } + DriverAssistESCModel { + id: daESCModel + } + DriverAssistTrafficSignsModel { + id: daTrafficModel + } + + SettingsLightningModel { + id: lightningModel + } + LightningAutoHighbeamModel { + id: lightningAutoModel + } + LightningHdlampModel { + id: lightningHdlampModel + } + + SettingsChimesModel { + id: chimesModel + } + ChimesParkSlotModel { + id: chimesParkModel + } + ChimesInformationModel { + id: chimesInfoModel + } + ChimesWarningModel { + id: chimesWarningModel + } + OnOffModel { + id: onOffModel + } + + SettingsConvenienceModel { + id: convenienceModel + } + ConvenienceAuxModel { + id: convenienceAuxModel + } + ConvenienceParkHeaterModel { + id: convenienceParkHeaterModel + } +} diff --git a/qml/SettingsContainerForm.ui.qml b/qml/SettingsContainerForm.ui.qml new file mode 100644 index 0000000..01ce159 --- /dev/null +++ b/qml/SettingsContainerForm.ui.qml @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.7 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.0 + +Item { + id: settings + + property alias listview: listView + property alias helpItem: helpItem + property alias titleText: title.text + property alias highlightSpeed: listView.highlightMoveDuration + + width: 680 + height: 680 + + Image { + id: image + height: 680 + anchors.top: title.bottom + anchors.topMargin: 0 + anchors.right: listView.right + anchors.rightMargin: 0 + anchors.left: listView.left + anchors.leftMargin: 0 + source: imageBgSrc + } + + ListView { + id: listView + interactive: false + contentHeight: 160 + anchors.top: title.bottom + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.rightMargin: 0 + anchors.bottomMargin: 0 + anchors.leftMargin: 0 + anchors.topMargin: 3 + highlight: Image { + source: "qrc:/icons/selectionBox.png" + } + currentIndex: selectedMenuIndex + delegate: settingsListDelegate + model: mainModel + } + + Text { + id: title + x: 150 + width: 184 + height: 57 + color: "#ffffff" + text: qsTr("Settings") + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + anchors.top: parent.top + anchors.topMargin: 0 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 60 + } + Help { + id: helpItem + x: 0 + y: -16 + visible: false + width: 680 + height: 753 + MouseArea { + anchors.fill: parent + onClicked: helpItem.visible = false + } + } +} diff --git a/qml/SimuData.qml b/qml/SimuData.qml new file mode 100644 index 0000000..6f0c429 --- /dev/null +++ b/qml/SimuData.qml @@ -0,0 +1,262 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.9 + +Item { + id: simulation + property int speed: 0 + property int rpm: 0 + + property int turnSignal: Qt.NoArrow + + property var currentDate: new Date() + property string time: currentDate.toLocaleTimeString(Qt.locale("en_EN"), "hh:mm") + + property bool startupAnimation: true + + property int angleOffset: -135 + property double speedAngle: -135 + property double tachoAngle: -135 + + SequentialAnimation { + id: animation + running: startupAnimation + loops: Animation.Infinite + + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "speed" + from: 0 + to: useMetric ? 260: 140 + duration: 15000 + easing.type: Easing.InBounce + } + PropertyAnimation { + target: simulation + property: "speedAngle" + from: angleOffset + to: 100 + duration: 15000 + easing.type: Easing.InBounce + } + SequentialAnimation { + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "rpm" + from: 0 + to: 3000 + duration: 5000 + easing.type: Easing.InOutSine + } + PropertyAnimation { + target: simulation + property: "tachoAngle" + from: angleOffset + to: -40 + duration: 5000 + easing.type: Easing.InOutSine + } + } + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "rpm" + from: 3000 + to: 5000 + duration: 5000 + easing.type: Easing.InOutSine + } + PropertyAnimation { + target: simulation + property: "tachoAngle" + from: -40 + to: 26 + duration: 5000 + easing.type: Easing.InOutSine + } + } + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "rpm" + from: 5000 + to: 7000 + duration: 5000 + easing.type: Easing.InOutSine + } + PropertyAnimation { + target: simulation + property: "tachoAngle" + from: 26 + to: 91 + duration: 5000 + easing.type: Easing.InOutSine + } + } + } + } + + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "speed" + from: useMetric ? 260: 140 + to: 0 + duration: 10000 + easing.type: Easing.OutBounce + } + PropertyAnimation { + target: simulation + property: "speedAngle" + from: 100 + to: -135 + duration: 10000 + easing.type: Easing.OutBounce + } + SequentialAnimation { + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "rpm" + from: 7000 + to: 5000 + duration: 3000 + easing.type: Easing.InOutSine + } + PropertyAnimation { + target: simulation + property: "tachoAngle" + from: 91 + to: 26 + duration: 3000 + easing.type: Easing.InOutSine + } + } + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "rpm" + from: 5000 + to: 3000 + duration: 3000 + easing.type: Easing.InOutSine + } + PropertyAnimation { + target: simulation + property: "tachoAngle" + from: 26 + to: -40 + duration: 3000 + easing.type: Easing.InOutSine + } + } + ParallelAnimation { + PropertyAnimation { + target: simulation + property: "rpm" + from: 3000 + to: 0 + duration: 4000 + easing.type: Easing.InOutSine + } + PropertyAnimation { + target: simulation + property: "tachoAngle" + from: -40 + to: angleOffset + duration: 4000 + easing.type: Easing.InOutSine + } + } + } + } + } + + Timer { + running: startupAnimation + property bool turnLeft: true + repeat: true + interval: 5000 + onTriggered: { + turnLeft = !turnLeft + if (turnLeft) + turnSignal = Qt.LeftArrow + else + turnSignal = Qt.RightArrow + stopSignaling.start() + } + } + + Timer { + id: stopSignaling + running: false + interval: 2100 + onTriggered: turnSignal = Qt.NoArrow + } + + function updateTime() { + currentDate = new Date(); + time = currentDate.toLocaleTimeString(Qt.locale("en_EN"), "hh:mm"); + } + + Timer { + interval: 30000 + repeat: true + running: true + + onTriggered: { + updateTime(); + } + } +} + diff --git a/qml/contacts.qrc b/qml/contacts.qrc new file mode 100644 index 0000000..a3d9222 --- /dev/null +++ b/qml/contacts.qrc @@ -0,0 +1,12 @@ +<RCC> + <qresource prefix="/"> + <file>ContactsContainer.qml</file> + <file>ContactsContainerForm.ui.qml</file> + <file>icons/janedoe.png</file> + <file>icons/johndoe.png</file> + <file>icons/jimdoe.png</file> + <file>icons/lauradoe.png</file> + <file>icons/simonedoe.png</file> + <file>icons/timdoe.png</file> + </qresource> +</RCC> diff --git a/qml/fonts/TitilliumWeb-Regular.ttf b/qml/fonts/TitilliumWeb-Regular.ttf Binary files differnew file mode 100644 index 0000000..6da8219 --- /dev/null +++ b/qml/fonts/TitilliumWeb-Regular.ttf diff --git a/qml/fonts/TitilliumWeb-SemiBold.ttf b/qml/fonts/TitilliumWeb-SemiBold.ttf Binary files differnew file mode 100644 index 0000000..dfdcdbe --- /dev/null +++ b/qml/fonts/TitilliumWeb-SemiBold.ttf diff --git a/qml/icons/2D/CarOverview.jpg b/qml/icons/2D/CarOverview.jpg Binary files differnew file mode 100644 index 0000000..6dda999 --- /dev/null +++ b/qml/icons/2D/CarOverview.jpg diff --git a/qml/icons/2D/CarOverview.png b/qml/icons/2D/CarOverview.png Binary files differnew file mode 100644 index 0000000..70311d3 --- /dev/null +++ b/qml/icons/2D/CarOverview.png diff --git a/qml/icons/2D/CarOverviewBlue.png b/qml/icons/2D/CarOverviewBlue.png Binary files differnew file mode 100644 index 0000000..3c89de8 --- /dev/null +++ b/qml/icons/2D/CarOverviewBlue.png diff --git a/qml/icons/2D/MenuBottomLineCrop.png b/qml/icons/2D/MenuBottomLineCrop.png Binary files differnew file mode 100644 index 0000000..d1f10cc --- /dev/null +++ b/qml/icons/2D/MenuBottomLineCrop.png diff --git a/qml/icons/2D/MenuTopLineCrop.png b/qml/icons/2D/MenuTopLineCrop.png Binary files differnew file mode 100644 index 0000000..dcf118e --- /dev/null +++ b/qml/icons/2D/MenuTopLineCrop.png diff --git a/qml/icons/2D/MphSpeedMeterBg.png b/qml/icons/2D/MphSpeedMeterBg.png Binary files differnew file mode 100644 index 0000000..1101b53 --- /dev/null +++ b/qml/icons/2D/MphSpeedMeterBg.png diff --git a/qml/icons/2D/MphSpeedMeterBgBlue.png b/qml/icons/2D/MphSpeedMeterBgBlue.png Binary files differnew file mode 100644 index 0000000..7223c9a --- /dev/null +++ b/qml/icons/2D/MphSpeedMeterBgBlue.png diff --git a/qml/icons/2D/NeedleBg.png b/qml/icons/2D/NeedleBg.png Binary files differnew file mode 100644 index 0000000..24ae116 --- /dev/null +++ b/qml/icons/2D/NeedleBg.png diff --git a/qml/icons/2D/SpeedMeterBg.png b/qml/icons/2D/SpeedMeterBg.png Binary files differnew file mode 100644 index 0000000..75202ad --- /dev/null +++ b/qml/icons/2D/SpeedMeterBg.png diff --git a/qml/icons/2D/SpeedMeterBgBlue.png b/qml/icons/2D/SpeedMeterBgBlue.png Binary files differnew file mode 100644 index 0000000..5842fb7 --- /dev/null +++ b/qml/icons/2D/SpeedMeterBgBlue.png diff --git a/qml/icons/2D/TachoMeterBg.png b/qml/icons/2D/TachoMeterBg.png Binary files differnew file mode 100644 index 0000000..b444987 --- /dev/null +++ b/qml/icons/2D/TachoMeterBg.png diff --git a/qml/icons/2D/TachoMeterBgBlue.png b/qml/icons/2D/TachoMeterBgBlue.png Binary files differnew file mode 100644 index 0000000..e65df39 --- /dev/null +++ b/qml/icons/2D/TachoMeterBgBlue.png diff --git a/qml/icons/BlueHighlight.png b/qml/icons/BlueHighlight.png Binary files differnew file mode 100644 index 0000000..069a67c --- /dev/null +++ b/qml/icons/BlueHighlight.png diff --git a/qml/icons/Map.png b/qml/icons/Map.png Binary files differnew file mode 100644 index 0000000..444adbc --- /dev/null +++ b/qml/icons/Map.png diff --git a/qml/icons/MapLocation.png b/qml/icons/MapLocation.png Binary files differnew file mode 100644 index 0000000..84b7a17 --- /dev/null +++ b/qml/icons/MapLocation.png diff --git a/qml/icons/MenuBack.png b/qml/icons/MenuBack.png Binary files differnew file mode 100644 index 0000000..5cfadc5 --- /dev/null +++ b/qml/icons/MenuBack.png diff --git a/qml/icons/MenuBackBlue.png b/qml/icons/MenuBackBlue.png Binary files differnew file mode 100644 index 0000000..d71d730 --- /dev/null +++ b/qml/icons/MenuBackBlue.png diff --git a/qml/icons/QML_mask.jpg b/qml/icons/QML_mask.jpg Binary files differnew file mode 100644 index 0000000..3c54f68 --- /dev/null +++ b/qml/icons/QML_mask.jpg diff --git a/qml/icons/RedHighlight.png b/qml/icons/RedHighlight.png Binary files differnew file mode 100644 index 0000000..40fcd4c --- /dev/null +++ b/qml/icons/RedHighlight.png diff --git a/qml/icons/album1.png b/qml/icons/album1.png Binary files differnew file mode 100644 index 0000000..2caf97d --- /dev/null +++ b/qml/icons/album1.png diff --git a/qml/icons/album2.png b/qml/icons/album2.png Binary files differnew file mode 100644 index 0000000..e73ba32 --- /dev/null +++ b/qml/icons/album2.png diff --git a/qml/icons/album3.png b/qml/icons/album3.png Binary files differnew file mode 100644 index 0000000..ebb2082 --- /dev/null +++ b/qml/icons/album3.png diff --git a/qml/icons/album4.png b/qml/icons/album4.png Binary files differnew file mode 100644 index 0000000..2260aad --- /dev/null +++ b/qml/icons/album4.png diff --git a/qml/icons/album5.png b/qml/icons/album5.png Binary files differnew file mode 100644 index 0000000..1b8cc2c --- /dev/null +++ b/qml/icons/album5.png diff --git a/qml/icons/album6.png b/qml/icons/album6.png Binary files differnew file mode 100644 index 0000000..f2bd6ca --- /dev/null +++ b/qml/icons/album6.png diff --git a/qml/icons/callIcon.png b/qml/icons/callIcon.png Binary files differnew file mode 100644 index 0000000..28c6d5d --- /dev/null +++ b/qml/icons/callIcon.png diff --git a/qml/icons/carIcon.png b/qml/icons/carIcon.png Binary files differnew file mode 100644 index 0000000..c6a4f3f --- /dev/null +++ b/qml/icons/carIcon.png diff --git a/qml/icons/icon_turnsignal_off.png b/qml/icons/icon_turnsignal_off.png Binary files differnew file mode 100644 index 0000000..261284a --- /dev/null +++ b/qml/icons/icon_turnsignal_off.png diff --git a/qml/icons/icon_turnsignal_on.png b/qml/icons/icon_turnsignal_on.png Binary files differnew file mode 100644 index 0000000..00f5cac --- /dev/null +++ b/qml/icons/icon_turnsignal_on.png diff --git a/qml/icons/janedoe.png b/qml/icons/janedoe.png Binary files differnew file mode 100644 index 0000000..c2e8fdc --- /dev/null +++ b/qml/icons/janedoe.png diff --git a/qml/icons/jimdoe.png b/qml/icons/jimdoe.png Binary files differnew file mode 100644 index 0000000..ddc2b03 --- /dev/null +++ b/qml/icons/jimdoe.png diff --git a/qml/icons/johndoe.png b/qml/icons/johndoe.png Binary files differnew file mode 100644 index 0000000..3922439 --- /dev/null +++ b/qml/icons/johndoe.png diff --git a/qml/icons/lauradoe.png b/qml/icons/lauradoe.png Binary files differnew file mode 100644 index 0000000..0c61bb0 --- /dev/null +++ b/qml/icons/lauradoe.png diff --git a/qml/icons/musicBackground.png b/qml/icons/musicBackground.png Binary files differnew file mode 100644 index 0000000..d2f67c3 --- /dev/null +++ b/qml/icons/musicBackground.png diff --git a/qml/icons/musicBackgroundBlue.png b/qml/icons/musicBackgroundBlue.png Binary files differnew file mode 100644 index 0000000..5c9b1a9 --- /dev/null +++ b/qml/icons/musicBackgroundBlue.png diff --git a/qml/icons/musicIcon.png b/qml/icons/musicIcon.png Binary files differnew file mode 100644 index 0000000..a8b2501 --- /dev/null +++ b/qml/icons/musicIcon.png diff --git a/qml/icons/navigationIcon.png b/qml/icons/navigationIcon.png Binary files differnew file mode 100644 index 0000000..df488f6 --- /dev/null +++ b/qml/icons/navigationIcon.png diff --git a/qml/icons/selectionBox.png b/qml/icons/selectionBox.png Binary files differnew file mode 100644 index 0000000..ce323af --- /dev/null +++ b/qml/icons/selectionBox.png diff --git a/qml/icons/settingsIcon.png b/qml/icons/settingsIcon.png Binary files differnew file mode 100644 index 0000000..ac2b99d --- /dev/null +++ b/qml/icons/settingsIcon.png diff --git a/qml/icons/simonedoe.png b/qml/icons/simonedoe.png Binary files differnew file mode 100644 index 0000000..9de9277 --- /dev/null +++ b/qml/icons/simonedoe.png diff --git a/qml/icons/timdoe.png b/qml/icons/timdoe.png Binary files differnew file mode 100644 index 0000000..36301a8 --- /dev/null +++ b/qml/icons/timdoe.png diff --git a/qml/iso-icons/iso_grs_7000_4_0238.dat b/qml/iso-icons/iso_grs_7000_4_0238.dat Binary files differnew file mode 100644 index 0000000..f2c08ff --- /dev/null +++ b/qml/iso-icons/iso_grs_7000_4_0238.dat diff --git a/qml/iso-icons/iso_grs_7000_4_0239.dat b/qml/iso-icons/iso_grs_7000_4_0239.dat Binary files differnew file mode 100644 index 0000000..44adbb0 --- /dev/null +++ b/qml/iso-icons/iso_grs_7000_4_0239.dat diff --git a/qml/iso-icons/iso_grs_7000_4_0245.dat b/qml/iso-icons/iso_grs_7000_4_0245.dat Binary files differnew file mode 100644 index 0000000..4c990b1 --- /dev/null +++ b/qml/iso-icons/iso_grs_7000_4_0245.dat diff --git a/qml/iso-icons/iso_grs_7000_4_0248.dat b/qml/iso-icons/iso_grs_7000_4_0248.dat Binary files differnew file mode 100644 index 0000000..7dbdca8 --- /dev/null +++ b/qml/iso-icons/iso_grs_7000_4_0248.dat diff --git a/qml/iso-icons/iso_grs_7000_4_0249.dat b/qml/iso-icons/iso_grs_7000_4_0249.dat Binary files differnew file mode 100644 index 0000000..89dc2d4 --- /dev/null +++ b/qml/iso-icons/iso_grs_7000_4_0249.dat diff --git a/qml/iso-icons/iso_grs_7000_4_1434A.dat b/qml/iso-icons/iso_grs_7000_4_1434A.dat Binary files differnew file mode 100644 index 0000000..35dafff --- /dev/null +++ b/qml/iso-icons/iso_grs_7000_4_1434A.dat diff --git a/qml/listmodels/ChimesInformationModel.qml b/qml/listmodels/ChimesInformationModel.qml new file mode 100644 index 0000000..2c9a431 --- /dev/null +++ b/qml/listmodels/ChimesInformationModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/ChimesParkSlotModel.qml b/qml/listmodels/ChimesParkSlotModel.qml new file mode 100644 index 0000000..2c9a431 --- /dev/null +++ b/qml/listmodels/ChimesParkSlotModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/ChimesWarningModel.qml b/qml/listmodels/ChimesWarningModel.qml new file mode 100644 index 0000000..2c9a431 --- /dev/null +++ b/qml/listmodels/ChimesWarningModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/ConvenienceAuxModel.qml b/qml/listmodels/ConvenienceAuxModel.qml new file mode 100644 index 0000000..2c9a431 --- /dev/null +++ b/qml/listmodels/ConvenienceAuxModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/ConvenienceParkHeaterModel.qml b/qml/listmodels/ConvenienceParkHeaterModel.qml new file mode 100644 index 0000000..d7c0bdc --- /dev/null +++ b/qml/listmodels/ConvenienceParkHeaterModel.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Time 1") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Time 2") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Once") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Heat now") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/DisplayColorModel.qml b/qml/listmodels/DisplayColorModel.qml new file mode 100644 index 0000000..6e9e241 --- /dev/null +++ b/qml/listmodels/DisplayColorModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Red") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Blue") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/DisplayUnitsModel.qml b/qml/listmodels/DisplayUnitsModel.qml new file mode 100644 index 0000000..6621cf3 --- /dev/null +++ b/qml/listmodels/DisplayUnitsModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Kph") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Mph") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/DriverAssistESCModel.qml b/qml/listmodels/DriverAssistESCModel.qml new file mode 100644 index 0000000..9c62c53 --- /dev/null +++ b/qml/listmodels/DriverAssistESCModel.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Sport mode") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/DriverAssistTrafficSignsModel.qml b/qml/listmodels/DriverAssistTrafficSignsModel.qml new file mode 100644 index 0000000..b065574 --- /dev/null +++ b/qml/listmodels/DriverAssistTrafficSignsModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Recognition") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Speed warning") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/LightningAutoHighbeamModel.qml b/qml/listmodels/LightningAutoHighbeamModel.qml new file mode 100644 index 0000000..2c9a431 --- /dev/null +++ b/qml/listmodels/LightningAutoHighbeamModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/LightningHdlampModel.qml b/qml/listmodels/LightningHdlampModel.qml new file mode 100644 index 0000000..d834d1a --- /dev/null +++ b/qml/listmodels/LightningHdlampModel.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Manual") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("20 seconds") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("40 seconds") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("60 seconds") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/OnOffModel.qml b/qml/listmodels/OnOffModel.qml new file mode 100644 index 0000000..2c9a431 --- /dev/null +++ b/qml/listmodels/OnOffModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("On") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Off") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/SettingsChimesModel.qml b/qml/listmodels/SettingsChimesModel.qml new file mode 100644 index 0000000..c9b0ec0 --- /dev/null +++ b/qml/listmodels/SettingsChimesModel.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Park slot found") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Information") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Warning") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/SettingsConvenienceModel.qml b/qml/listmodels/SettingsConvenienceModel.qml new file mode 100644 index 0000000..f4524b5 --- /dev/null +++ b/qml/listmodels/SettingsConvenienceModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Aux heater") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Park heater") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/SettingsDisplayModel.qml b/qml/listmodels/SettingsDisplayModel.qml new file mode 100644 index 0000000..c9e0863 --- /dev/null +++ b/qml/listmodels/SettingsDisplayModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Color") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Units") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/SettingsDriverAssistModel.qml b/qml/listmodels/SettingsDriverAssistModel.qml new file mode 100644 index 0000000..8a8ea61 --- /dev/null +++ b/qml/listmodels/SettingsDriverAssistModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("ESC") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Traffic Signs") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/SettingsLightningModel.qml b/qml/listmodels/SettingsLightningModel.qml new file mode 100644 index 0000000..3d727a6 --- /dev/null +++ b/qml/listmodels/SettingsLightningModel.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Auto highbeam") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Hdlamp delay") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Back") + itemOpacity: 0.5 + } +} diff --git a/qml/listmodels/SettingsMainModel.qml b/qml/listmodels/SettingsMainModel.qml new file mode 100644 index 0000000..e3be6b5 --- /dev/null +++ b/qml/listmodels/SettingsMainModel.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 + +ListModel { + ListElement { + name: qsTr("Display") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Driver Assist") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Lighting") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Chimes") + itemOpacity: 1.0 + } + ListElement { + name: qsTr("Convenience") + itemOpacity: 0.75 + } + ListElement { + name: qsTr("Help") + itemOpacity: 0.5 + } +} diff --git a/qml/main2D.qml b/qml/main2D.qml new file mode 100644 index 0000000..4034c1e --- /dev/null +++ b/qml/main2D.qml @@ -0,0 +1,259 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Kria Cluster 2D Demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.7 +import QtQuick.Controls 2.1 +import "./2D" + +Item { + id: mainview + + focus: true + + property bool startupAnimation: true + property bool allowSelection: true + + property int contentIndex: 1 + property int previousContentIndex: 0 + property int maxContentIndex: 5 + + property int selectedMenuIndex: 0 + property int maxMenuIndex: 5 + + property int topZ: 1000 + // Settings + property bool useMetric: true + property bool redTheme: true + property string esc: "On" + property string trafficSigns: "Recognition" + property string autoHighBeam: "On" + property string hdLampDelay: "20 seconds" + property string auxHeater: "On" + property string parkHeater: "Time 2" + property string chimesPark: "Off" + property string chimesInfo: "Off" + property string chimesWarning: "On" + + + function resetGauges(shutdown) { + mainview.startupAnimation = shutdown ? false : !mainview.startupAnimation; + simuData.speed = 0; + simuData.rpm = 0; + simuData.speedAngle = simuData.angleOffset; + simuData.tachoAngle = simuData.angleOffset + } + + OverlayContainer { + id: indicatorPane + scale: mainview.width / 2560 + anchors.centerIn: mainview + z: topZ + + Image { + id: topLineImg + width: 958; height: 10 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.menuBottom + anchors.topMargin: -10 + source: "qrc:/icons/2D/MenuTopLineCrop.png" + } + Image { + id: bottomLineImg + width: 958; height: 10 + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.tellTalesTop + anchors.bottomMargin: 20 + source: "qrc:/icons/2D/MenuBottomLineCrop.png" + } + } + + Gauges { + id: gauges + z: topZ - 1 + state: "Driving" + anchors.centerIn: mainview + + function setState(index) { + if (index === 2) { + state = "Navigation"; + content.item.fadeIn(); + } else { + state = "Driving"; + } + } + + onGaugeClicked: { + resetGauges(false); + } + } + + Loader { + id: content + scale: mainview.width / 2560 + source: "qrc:/SettingsContainer.qml" + anchors.centerIn: parent + z: topZ - 2 + + onSourceChanged: { + gauges.setState(contentIndex); + } + } + + Keys.onRightPressed: { + menuSelect(true); + } + + Keys.onLeftPressed: { + menuSelect(false); + } + + Keys.onUpPressed: { + selectedMenuIndex--; + if (selectedMenuIndex < 0) + selectedMenuIndex = 0; + } + + Keys.onDownPressed: { + selectedMenuIndex++; + if (selectedMenuIndex > maxMenuIndex) + selectedMenuIndex = maxMenuIndex; + } + + onUseMetricChanged: { + resetGauges(true); + } + + // Simulated speed and rpm data + SimuData { + id: simuData + startupAnimation: mainview.startupAnimation + + onTimeChanged: { + indicatorPane.time.text = time; + } + onSpeedChanged: { + gauges.speedText = speed; + } + onSpeedAngleChanged: { + gauges.speedNeedle.speedNeedle.rotation = speedAngle; + } + onRpmChanged: { + var rpmVal = (Math.round(rpm / 100) * 100) / 1000; + gauges.tachoText = rpmVal.toFixed(1); + } + onTachoAngleChanged: { + gauges.tachoNeedle.tachoNeedle.rotation = tachoAngle; + } + } + + function menuSelect(next) { + if (!allowSelection) + return; + + previousContentIndex = contentIndex; + + // settings - navigation - music - call - car + if (next) + contentIndex++; + else + contentIndex--; + + if (contentIndex > maxContentIndex) + contentIndex = 1; + else if (contentIndex < 1) + contentIndex = maxContentIndex; + + selectContent(contentIndex); + } + + function selectContent(index) { + if (previousContentIndex === index) + return; + + selectedMenuIndex = 0; + indicatorPane.select(index); + + if (previousContentIndex === 2) { // from Navigation + allowSelection = false; + selectionTimer.start(); + } else if (previousContentIndex === 5) { // from Car + allowSelection = false; + selectionTimer.start(); + } + + switch (index) { + case 1: // Settings + content.source = "qrc:/SettingsContainer.qml"; + break; + case 2: // Navigation + allowSelection = false; + selectionTimer.start(); + content.source = "qrc:/2D/Navigation.qml"; + break; + case 3: // Music + content.source = "qrc:/MusicContainer.qml"; + break; + case 4: // Call + content.source = "qrc:/ContactsContainer.qml"; + break; + case 5: // Car + allowSelection = false; + selectionTimer.start(); + content.source = "qrc:/2D/CarContainer.qml"; + break; + } + } + + Timer { + id: selectionTimer + interval: 1000 + onTriggered: allowSelection = true; + } +} diff --git a/qml/menu.qrc b/qml/menu.qrc new file mode 100644 index 0000000..7b046da --- /dev/null +++ b/qml/menu.qrc @@ -0,0 +1,11 @@ +<RCC> + <qresource prefix="/"> + <file>icons/callIcon.png</file> + <file>icons/carIcon.png</file> + <file>icons/musicIcon.png</file> + <file>icons/navigationIcon.png</file> + <file>icons/settingsIcon.png</file> + <file>icons/RedHighlight.png</file> + <file>icons/selectionBox.png</file> + </qresource> +</RCC> diff --git a/qml/music.qrc b/qml/music.qrc new file mode 100644 index 0000000..31c6de0 --- /dev/null +++ b/qml/music.qrc @@ -0,0 +1,15 @@ +<RCC> + <qresource prefix="/"> + <file>MusicContainer.qml</file> + <file>MusicContainerForm.ui.qml</file> + <file>icons/album1.png</file> + <file>icons/album2.png</file> + <file>icons/album3.png</file> + <file>icons/album4.png</file> + <file>icons/album5.png</file> + <file>icons/album6.png</file> + <file>icons/musicBackground.png</file> + <file>icons/musicBackgroundBlue.png</file> + <file>icons/BlueHighlight.png</file> + </qresource> +</RCC> diff --git a/qml/settings.qrc b/qml/settings.qrc new file mode 100644 index 0000000..1974c4a --- /dev/null +++ b/qml/settings.qrc @@ -0,0 +1,27 @@ +<RCC> + <qresource prefix="/"> + <file>SettingsContainer.qml</file> + <file>SettingsContainerForm.ui.qml</file> + <file>listmodels/SettingsMainModel.qml</file> + <file>listmodels/SettingsDisplayModel.qml</file> + <file>listmodels/SettingsDriverAssistModel.qml</file> + <file>listmodels/SettingsLightningModel.qml</file> + <file>listmodels/SettingsChimesModel.qml</file> + <file>listmodels/SettingsConvenienceModel.qml</file> + <file>Help.qml</file> + <file>listmodels/DisplayColorModel.qml</file> + <file>listmodels/DisplayUnitsModel.qml</file> + <file>listmodels/DriverAssistESCModel.qml</file> + <file>listmodels/DriverAssistTrafficSignsModel.qml</file> + <file>listmodels/LightningAutoHighbeamModel.qml</file> + <file>listmodels/LightningHdlampModel.qml</file> + <file>listmodels/ConvenienceAuxModel.qml</file> + <file>listmodels/ConvenienceParkHeaterModel.qml</file> + <file>listmodels/OnOffModel.qml</file> + <file>listmodels/ChimesParkSlotModel.qml</file> + <file>listmodels/ChimesInformationModel.qml</file> + <file>listmodels/ChimesWarningModel.qml</file> + <file>icons/MenuBack.png</file> + <file>icons/MenuBackBlue.png</file> + </qresource> +</RCC> diff --git a/qml/telltales.qrc b/qml/telltales.qrc new file mode 100644 index 0000000..045ed86 --- /dev/null +++ b/qml/telltales.qrc @@ -0,0 +1,15 @@ +<RCC> + <qresource prefix="/"> + <file>iso-icons/iso_grs_7000_4_0238.dat</file> + <file>iso-icons/iso_grs_7000_4_0239.dat</file> + <file>iso-icons/iso_grs_7000_4_0245.dat</file> + <file>iso-icons/iso_grs_7000_4_0248.dat</file> + <file>iso-icons/iso_grs_7000_4_0249.dat</file> + <file>iso-icons/iso_grs_7000_4_1434A.dat</file> + <file>OverlayContainer.qml</file> + <file>OverlayContainerForm.ui.qml</file> + <file>icons/QML_mask.jpg</file> + <file>icons/icon_turnsignal_off.png</file> + <file>icons/icon_turnsignal_on.png</file> + </qresource> +</RCC> diff --git a/qml/videos/car.avi b/qml/videos/car.avi Binary files differnew file mode 100644 index 0000000..d630903 --- /dev/null +++ b/qml/videos/car.avi diff --git a/qml/videos/carblue.avi b/qml/videos/carblue.avi Binary files differnew file mode 100644 index 0000000..b7537ca --- /dev/null +++ b/qml/videos/carblue.avi |