From d3e5e853b4c1d05f9b2c16fef959ff1fdad9eff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20Virranm=C3=A4ki?= Date: Mon, 4 Dec 2017 11:14:38 +0200 Subject: Kria Cluster 2D Demo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9d01217933c28c334193c5b8ec1d00f89ac4d3da Reviewed-by: Tomi Korpipää --- .gitignore | 21 ++ android/AndroidManifest.xml | 77 ++++ android/res/drawable-hdpi/icon.png | Bin 0 -> 294050 bytes android/res/drawable-ldpi/icon.png | Bin 0 -> 294050 bytes android/res/drawable-mdpi/icon.png | Bin 0 -> 294050 bytes android/res/values/libs.xml | 25 ++ example.ico | Bin 0 -> 132124 bytes fps.cpp | 97 +++++ fps.h | 80 ++++ iconqt.png | Bin 0 -> 294050 bytes kria-cluster-2d-demo.pro | 39 ++ kria-cluster-2d-demo.qrc | 9 + main.cpp | 87 +++++ qml/2D/CarContainer.qml | 120 ++++++ qml/2D/ClusterGradient.qml | 207 +++++++++++ qml/2D/Gauges.qml | 444 +++++++++++++++++++++++ qml/2D/GaugesForm.ui.qml | 237 ++++++++++++ qml/2D/Navigation.qml | 89 +++++ qml/2D/SpeedNeedle.qml | 75 ++++ qml/2D/TachoNeedle.qml | 75 ++++ qml/2d.qrc | 26 ++ qml/ContactsContainer.qml | 58 +++ qml/ContactsContainerForm.ui.qml | 166 +++++++++ qml/FpsDisplay.qml | 91 +++++ qml/Help.qml | 76 ++++ qml/MusicContainer.qml | 114 ++++++ qml/MusicContainerForm.ui.qml | 146 ++++++++ qml/OverlayContainer.qml | 200 ++++++++++ qml/OverlayContainerForm.ui.qml | 254 +++++++++++++ qml/SettingsContainer.qml | 338 +++++++++++++++++ qml/SettingsContainerForm.ui.qml | 123 +++++++ qml/SimuData.qml | 262 +++++++++++++ qml/contacts.qrc | 12 + qml/fonts/TitilliumWeb-Regular.ttf | Bin 0 -> 63752 bytes qml/fonts/TitilliumWeb-SemiBold.ttf | Bin 0 -> 63044 bytes qml/icons/2D/CarOverview.jpg | Bin 0 -> 83525 bytes qml/icons/2D/CarOverview.png | Bin 0 -> 236510 bytes qml/icons/2D/CarOverviewBlue.png | Bin 0 -> 213503 bytes qml/icons/2D/MenuBottomLineCrop.png | Bin 0 -> 2711 bytes qml/icons/2D/MenuTopLineCrop.png | Bin 0 -> 2511 bytes qml/icons/2D/MphSpeedMeterBg.png | Bin 0 -> 243036 bytes qml/icons/2D/MphSpeedMeterBgBlue.png | Bin 0 -> 256923 bytes qml/icons/2D/NeedleBg.png | Bin 0 -> 52634 bytes qml/icons/2D/SpeedMeterBg.png | Bin 0 -> 245080 bytes qml/icons/2D/SpeedMeterBgBlue.png | Bin 0 -> 257735 bytes qml/icons/2D/TachoMeterBg.png | Bin 0 -> 251177 bytes qml/icons/2D/TachoMeterBgBlue.png | Bin 0 -> 263800 bytes qml/icons/BlueHighlight.png | Bin 0 -> 66528 bytes qml/icons/Map.png | Bin 0 -> 887064 bytes qml/icons/MapLocation.png | Bin 0 -> 1262 bytes qml/icons/MenuBack.png | Bin 0 -> 2169 bytes qml/icons/MenuBackBlue.png | Bin 0 -> 2215 bytes qml/icons/QML_mask.jpg | Bin 0 -> 38193 bytes qml/icons/RedHighlight.png | Bin 0 -> 79229 bytes qml/icons/album1.png | Bin 0 -> 112703 bytes qml/icons/album2.png | Bin 0 -> 183625 bytes qml/icons/album3.png | Bin 0 -> 165884 bytes qml/icons/album4.png | Bin 0 -> 147107 bytes qml/icons/album5.png | Bin 0 -> 156831 bytes qml/icons/album6.png | Bin 0 -> 182363 bytes qml/icons/callIcon.png | Bin 0 -> 3974 bytes qml/icons/carIcon.png | Bin 0 -> 5753 bytes qml/icons/icon_turnsignal_off.png | Bin 0 -> 541 bytes qml/icons/icon_turnsignal_on.png | Bin 0 -> 1248 bytes qml/icons/janedoe.png | Bin 0 -> 11825 bytes qml/icons/jimdoe.png | Bin 0 -> 12167 bytes qml/icons/johndoe.png | Bin 0 -> 7808 bytes qml/icons/lauradoe.png | Bin 0 -> 12592 bytes qml/icons/musicBackground.png | Bin 0 -> 51707 bytes qml/icons/musicBackgroundBlue.png | Bin 0 -> 52711 bytes qml/icons/musicIcon.png | Bin 0 -> 4574 bytes qml/icons/navigationIcon.png | Bin 0 -> 5263 bytes qml/icons/selectionBox.png | Bin 0 -> 20679 bytes qml/icons/settingsIcon.png | Bin 0 -> 6189 bytes qml/icons/simonedoe.png | Bin 0 -> 17081 bytes qml/icons/timdoe.png | Bin 0 -> 16922 bytes qml/iso-icons/iso_grs_7000_4_0238.dat | Bin 0 -> 3993 bytes qml/iso-icons/iso_grs_7000_4_0239.dat | Bin 0 -> 3814 bytes qml/iso-icons/iso_grs_7000_4_0245.dat | Bin 0 -> 2307 bytes qml/iso-icons/iso_grs_7000_4_0248.dat | Bin 0 -> 2387 bytes qml/iso-icons/iso_grs_7000_4_0249.dat | Bin 0 -> 2482 bytes qml/iso-icons/iso_grs_7000_4_1434A.dat | Bin 0 -> 4042 bytes qml/listmodels/ChimesInformationModel.qml | 66 ++++ qml/listmodels/ChimesParkSlotModel.qml | 66 ++++ qml/listmodels/ChimesWarningModel.qml | 66 ++++ qml/listmodels/ConvenienceAuxModel.qml | 66 ++++ qml/listmodels/ConvenienceParkHeaterModel.qml | 74 ++++ qml/listmodels/DisplayColorModel.qml | 66 ++++ qml/listmodels/DisplayUnitsModel.qml | 66 ++++ qml/listmodels/DriverAssistESCModel.qml | 70 ++++ qml/listmodels/DriverAssistTrafficSignsModel.qml | 66 ++++ qml/listmodels/LightningAutoHighbeamModel.qml | 66 ++++ qml/listmodels/LightningHdlampModel.qml | 74 ++++ qml/listmodels/OnOffModel.qml | 66 ++++ qml/listmodels/SettingsChimesModel.qml | 70 ++++ qml/listmodels/SettingsConvenienceModel.qml | 66 ++++ qml/listmodels/SettingsDisplayModel.qml | 66 ++++ qml/listmodels/SettingsDriverAssistModel.qml | 66 ++++ qml/listmodels/SettingsLightningModel.qml | 66 ++++ qml/listmodels/SettingsMainModel.qml | 78 ++++ qml/main2D.qml | 259 +++++++++++++ qml/menu.qrc | 11 + qml/music.qrc | 15 + qml/settings.qrc | 27 ++ qml/telltales.qrc | 15 + qml/videos/car.avi | Bin 0 -> 1854562 bytes qml/videos/carblue.avi | Bin 0 -> 1854532 bytes 107 files changed, 5099 insertions(+) create mode 100644 .gitignore create mode 100644 android/AndroidManifest.xml create mode 100644 android/res/drawable-hdpi/icon.png create mode 100644 android/res/drawable-ldpi/icon.png create mode 100644 android/res/drawable-mdpi/icon.png create mode 100644 android/res/values/libs.xml create mode 100644 example.ico create mode 100644 fps.cpp create mode 100644 fps.h create mode 100644 iconqt.png create mode 100644 kria-cluster-2d-demo.pro create mode 100644 kria-cluster-2d-demo.qrc create mode 100644 main.cpp create mode 100644 qml/2D/CarContainer.qml create mode 100644 qml/2D/ClusterGradient.qml create mode 100644 qml/2D/Gauges.qml create mode 100644 qml/2D/GaugesForm.ui.qml create mode 100644 qml/2D/Navigation.qml create mode 100644 qml/2D/SpeedNeedle.qml create mode 100644 qml/2D/TachoNeedle.qml create mode 100644 qml/2d.qrc create mode 100644 qml/ContactsContainer.qml create mode 100644 qml/ContactsContainerForm.ui.qml create mode 100644 qml/FpsDisplay.qml create mode 100644 qml/Help.qml create mode 100644 qml/MusicContainer.qml create mode 100644 qml/MusicContainerForm.ui.qml create mode 100644 qml/OverlayContainer.qml create mode 100644 qml/OverlayContainerForm.ui.qml create mode 100644 qml/SettingsContainer.qml create mode 100644 qml/SettingsContainerForm.ui.qml create mode 100644 qml/SimuData.qml create mode 100644 qml/contacts.qrc create mode 100644 qml/fonts/TitilliumWeb-Regular.ttf create mode 100644 qml/fonts/TitilliumWeb-SemiBold.ttf create mode 100644 qml/icons/2D/CarOverview.jpg create mode 100644 qml/icons/2D/CarOverview.png create mode 100644 qml/icons/2D/CarOverviewBlue.png create mode 100644 qml/icons/2D/MenuBottomLineCrop.png create mode 100644 qml/icons/2D/MenuTopLineCrop.png create mode 100644 qml/icons/2D/MphSpeedMeterBg.png create mode 100644 qml/icons/2D/MphSpeedMeterBgBlue.png create mode 100644 qml/icons/2D/NeedleBg.png create mode 100644 qml/icons/2D/SpeedMeterBg.png create mode 100644 qml/icons/2D/SpeedMeterBgBlue.png create mode 100644 qml/icons/2D/TachoMeterBg.png create mode 100644 qml/icons/2D/TachoMeterBgBlue.png create mode 100644 qml/icons/BlueHighlight.png create mode 100644 qml/icons/Map.png create mode 100644 qml/icons/MapLocation.png create mode 100644 qml/icons/MenuBack.png create mode 100644 qml/icons/MenuBackBlue.png create mode 100644 qml/icons/QML_mask.jpg create mode 100644 qml/icons/RedHighlight.png create mode 100644 qml/icons/album1.png create mode 100644 qml/icons/album2.png create mode 100644 qml/icons/album3.png create mode 100644 qml/icons/album4.png create mode 100644 qml/icons/album5.png create mode 100644 qml/icons/album6.png create mode 100644 qml/icons/callIcon.png create mode 100644 qml/icons/carIcon.png create mode 100644 qml/icons/icon_turnsignal_off.png create mode 100644 qml/icons/icon_turnsignal_on.png create mode 100644 qml/icons/janedoe.png create mode 100644 qml/icons/jimdoe.png create mode 100644 qml/icons/johndoe.png create mode 100644 qml/icons/lauradoe.png create mode 100644 qml/icons/musicBackground.png create mode 100644 qml/icons/musicBackgroundBlue.png create mode 100644 qml/icons/musicIcon.png create mode 100644 qml/icons/navigationIcon.png create mode 100644 qml/icons/selectionBox.png create mode 100644 qml/icons/settingsIcon.png create mode 100644 qml/icons/simonedoe.png create mode 100644 qml/icons/timdoe.png create mode 100644 qml/iso-icons/iso_grs_7000_4_0238.dat create mode 100644 qml/iso-icons/iso_grs_7000_4_0239.dat create mode 100644 qml/iso-icons/iso_grs_7000_4_0245.dat create mode 100644 qml/iso-icons/iso_grs_7000_4_0248.dat create mode 100644 qml/iso-icons/iso_grs_7000_4_0249.dat create mode 100644 qml/iso-icons/iso_grs_7000_4_1434A.dat create mode 100644 qml/listmodels/ChimesInformationModel.qml create mode 100644 qml/listmodels/ChimesParkSlotModel.qml create mode 100644 qml/listmodels/ChimesWarningModel.qml create mode 100644 qml/listmodels/ConvenienceAuxModel.qml create mode 100644 qml/listmodels/ConvenienceParkHeaterModel.qml create mode 100644 qml/listmodels/DisplayColorModel.qml create mode 100644 qml/listmodels/DisplayUnitsModel.qml create mode 100644 qml/listmodels/DriverAssistESCModel.qml create mode 100644 qml/listmodels/DriverAssistTrafficSignsModel.qml create mode 100644 qml/listmodels/LightningAutoHighbeamModel.qml create mode 100644 qml/listmodels/LightningHdlampModel.qml create mode 100644 qml/listmodels/OnOffModel.qml create mode 100644 qml/listmodels/SettingsChimesModel.qml create mode 100644 qml/listmodels/SettingsConvenienceModel.qml create mode 100644 qml/listmodels/SettingsDisplayModel.qml create mode 100644 qml/listmodels/SettingsDriverAssistModel.qml create mode 100644 qml/listmodels/SettingsLightningModel.qml create mode 100644 qml/listmodels/SettingsMainModel.qml create mode 100644 qml/main2D.qml create mode 100644 qml/menu.qrc create mode 100644 qml/music.qrc create mode 100644 qml/settings.qrc create mode 100644 qml/telltales.qrc create mode 100644 qml/videos/car.avi create mode 100644 qml/videos/carblue.avi 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/res/drawable-hdpi/icon.png b/android/res/drawable-hdpi/icon.png new file mode 100644 index 0000000..01393cf Binary files /dev/null and b/android/res/drawable-hdpi/icon.png differ diff --git a/android/res/drawable-ldpi/icon.png b/android/res/drawable-ldpi/icon.png new file mode 100644 index 0000000..01393cf Binary files /dev/null and b/android/res/drawable-ldpi/icon.png differ diff --git a/android/res/drawable-mdpi/icon.png b/android/res/drawable-mdpi/icon.png new file mode 100644 index 0000000..01393cf Binary files /dev/null and b/android/res/drawable-mdpi/icon.png differ 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 @@ + + + + https://download.qt.io/ministro/android/qt5/qt-5.9 + + + + + + + + + + + + + + + + + + + + diff --git a/example.ico b/example.ico new file mode 100644 index 0000000..a671863 Binary files /dev/null and b/example.ico differ diff --git a/fps.cpp b/fps.cpp new file mode 100644 index 0000000..2c17900 --- /dev/null +++ b/fps.cpp @@ -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 +#include +#include + +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(); +} diff --git a/fps.h b/fps.h new file mode 100644 index 0000000..586521b --- /dev/null +++ b/fps.h @@ -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 + +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 m_paintPasses; +}; + +#endif // FPSTEXT_H diff --git a/iconqt.png b/iconqt.png new file mode 100644 index 0000000..01393cf Binary files /dev/null and b/iconqt.png differ 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 @@ + + + qml/main2D.qml + qml/SimuData.qml + qml/FpsDisplay.qml + qml/fonts/TitilliumWeb-SemiBold.ttf + qml/fonts/TitilliumWeb-Regular.ttf + + 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 +#include +#include +#include +#include + +#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", 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 @@ + + + 2D/Gauges.qml + 2D/GaugesForm.ui.qml + 2D/TachoNeedle.qml + 2D/SpeedNeedle.qml + 2D/CarContainer.qml + 2D/ClusterGradient.qml + icons/2D/MenuBottomLineCrop.png + icons/2D/MenuTopLineCrop.png + icons/2D/CarOverview.jpg + 2D/Navigation.qml + icons/2D/SpeedMeterBg.png + icons/2D/TachoMeterBg.png + icons/2D/NeedleBg.png + icons/2D/SpeedMeterBgBlue.png + icons/2D/TachoMeterBgBlue.png + icons/2D/CarOverview.png + icons/2D/CarOverviewBlue.png + icons/2D/MphSpeedMeterBg.png + icons/2D/MphSpeedMeterBgBlue.png + icons/Map.png + videos/car.avi + videos/carblue.avi + + 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 @@ + + + ContactsContainer.qml + ContactsContainerForm.ui.qml + icons/janedoe.png + icons/johndoe.png + icons/jimdoe.png + icons/lauradoe.png + icons/simonedoe.png + icons/timdoe.png + + diff --git a/qml/fonts/TitilliumWeb-Regular.ttf b/qml/fonts/TitilliumWeb-Regular.ttf new file mode 100644 index 0000000..6da8219 Binary files /dev/null and b/qml/fonts/TitilliumWeb-Regular.ttf differ diff --git a/qml/fonts/TitilliumWeb-SemiBold.ttf b/qml/fonts/TitilliumWeb-SemiBold.ttf new file mode 100644 index 0000000..dfdcdbe Binary files /dev/null and b/qml/fonts/TitilliumWeb-SemiBold.ttf differ diff --git a/qml/icons/2D/CarOverview.jpg b/qml/icons/2D/CarOverview.jpg new file mode 100644 index 0000000..6dda999 Binary files /dev/null and b/qml/icons/2D/CarOverview.jpg differ diff --git a/qml/icons/2D/CarOverview.png b/qml/icons/2D/CarOverview.png new file mode 100644 index 0000000..70311d3 Binary files /dev/null and b/qml/icons/2D/CarOverview.png differ diff --git a/qml/icons/2D/CarOverviewBlue.png b/qml/icons/2D/CarOverviewBlue.png new file mode 100644 index 0000000..3c89de8 Binary files /dev/null and b/qml/icons/2D/CarOverviewBlue.png differ diff --git a/qml/icons/2D/MenuBottomLineCrop.png b/qml/icons/2D/MenuBottomLineCrop.png new file mode 100644 index 0000000..d1f10cc Binary files /dev/null and b/qml/icons/2D/MenuBottomLineCrop.png differ diff --git a/qml/icons/2D/MenuTopLineCrop.png b/qml/icons/2D/MenuTopLineCrop.png new file mode 100644 index 0000000..dcf118e Binary files /dev/null and b/qml/icons/2D/MenuTopLineCrop.png differ diff --git a/qml/icons/2D/MphSpeedMeterBg.png b/qml/icons/2D/MphSpeedMeterBg.png new file mode 100644 index 0000000..1101b53 Binary files /dev/null and b/qml/icons/2D/MphSpeedMeterBg.png differ diff --git a/qml/icons/2D/MphSpeedMeterBgBlue.png b/qml/icons/2D/MphSpeedMeterBgBlue.png new file mode 100644 index 0000000..7223c9a Binary files /dev/null and b/qml/icons/2D/MphSpeedMeterBgBlue.png differ diff --git a/qml/icons/2D/NeedleBg.png b/qml/icons/2D/NeedleBg.png new file mode 100644 index 0000000..24ae116 Binary files /dev/null and b/qml/icons/2D/NeedleBg.png differ diff --git a/qml/icons/2D/SpeedMeterBg.png b/qml/icons/2D/SpeedMeterBg.png new file mode 100644 index 0000000..75202ad Binary files /dev/null and b/qml/icons/2D/SpeedMeterBg.png differ diff --git a/qml/icons/2D/SpeedMeterBgBlue.png b/qml/icons/2D/SpeedMeterBgBlue.png new file mode 100644 index 0000000..5842fb7 Binary files /dev/null and b/qml/icons/2D/SpeedMeterBgBlue.png differ diff --git a/qml/icons/2D/TachoMeterBg.png b/qml/icons/2D/TachoMeterBg.png new file mode 100644 index 0000000..b444987 Binary files /dev/null and b/qml/icons/2D/TachoMeterBg.png differ diff --git a/qml/icons/2D/TachoMeterBgBlue.png b/qml/icons/2D/TachoMeterBgBlue.png new file mode 100644 index 0000000..e65df39 Binary files /dev/null and b/qml/icons/2D/TachoMeterBgBlue.png differ diff --git a/qml/icons/BlueHighlight.png b/qml/icons/BlueHighlight.png new file mode 100644 index 0000000..069a67c Binary files /dev/null and b/qml/icons/BlueHighlight.png differ diff --git a/qml/icons/Map.png b/qml/icons/Map.png new file mode 100644 index 0000000..444adbc Binary files /dev/null and b/qml/icons/Map.png differ diff --git a/qml/icons/MapLocation.png b/qml/icons/MapLocation.png new file mode 100644 index 0000000..84b7a17 Binary files /dev/null and b/qml/icons/MapLocation.png differ diff --git a/qml/icons/MenuBack.png b/qml/icons/MenuBack.png new file mode 100644 index 0000000..5cfadc5 Binary files /dev/null and b/qml/icons/MenuBack.png differ diff --git a/qml/icons/MenuBackBlue.png b/qml/icons/MenuBackBlue.png new file mode 100644 index 0000000..d71d730 Binary files /dev/null and b/qml/icons/MenuBackBlue.png differ diff --git a/qml/icons/QML_mask.jpg b/qml/icons/QML_mask.jpg new file mode 100644 index 0000000..3c54f68 Binary files /dev/null and b/qml/icons/QML_mask.jpg differ diff --git a/qml/icons/RedHighlight.png b/qml/icons/RedHighlight.png new file mode 100644 index 0000000..40fcd4c Binary files /dev/null and b/qml/icons/RedHighlight.png differ diff --git a/qml/icons/album1.png b/qml/icons/album1.png new file mode 100644 index 0000000..2caf97d Binary files /dev/null and b/qml/icons/album1.png differ diff --git a/qml/icons/album2.png b/qml/icons/album2.png new file mode 100644 index 0000000..e73ba32 Binary files /dev/null and b/qml/icons/album2.png differ diff --git a/qml/icons/album3.png b/qml/icons/album3.png new file mode 100644 index 0000000..ebb2082 Binary files /dev/null and b/qml/icons/album3.png differ diff --git a/qml/icons/album4.png b/qml/icons/album4.png new file mode 100644 index 0000000..2260aad Binary files /dev/null and b/qml/icons/album4.png differ diff --git a/qml/icons/album5.png b/qml/icons/album5.png new file mode 100644 index 0000000..1b8cc2c Binary files /dev/null and b/qml/icons/album5.png differ diff --git a/qml/icons/album6.png b/qml/icons/album6.png new file mode 100644 index 0000000..f2bd6ca Binary files /dev/null and b/qml/icons/album6.png differ diff --git a/qml/icons/callIcon.png b/qml/icons/callIcon.png new file mode 100644 index 0000000..28c6d5d Binary files /dev/null and b/qml/icons/callIcon.png differ diff --git a/qml/icons/carIcon.png b/qml/icons/carIcon.png new file mode 100644 index 0000000..c6a4f3f Binary files /dev/null and b/qml/icons/carIcon.png differ diff --git a/qml/icons/icon_turnsignal_off.png b/qml/icons/icon_turnsignal_off.png new file mode 100644 index 0000000..261284a Binary files /dev/null and b/qml/icons/icon_turnsignal_off.png differ diff --git a/qml/icons/icon_turnsignal_on.png b/qml/icons/icon_turnsignal_on.png new file mode 100644 index 0000000..00f5cac Binary files /dev/null and b/qml/icons/icon_turnsignal_on.png differ diff --git a/qml/icons/janedoe.png b/qml/icons/janedoe.png new file mode 100644 index 0000000..c2e8fdc Binary files /dev/null and b/qml/icons/janedoe.png differ diff --git a/qml/icons/jimdoe.png b/qml/icons/jimdoe.png new file mode 100644 index 0000000..ddc2b03 Binary files /dev/null and b/qml/icons/jimdoe.png differ diff --git a/qml/icons/johndoe.png b/qml/icons/johndoe.png new file mode 100644 index 0000000..3922439 Binary files /dev/null and b/qml/icons/johndoe.png differ diff --git a/qml/icons/lauradoe.png b/qml/icons/lauradoe.png new file mode 100644 index 0000000..0c61bb0 Binary files /dev/null and b/qml/icons/lauradoe.png differ diff --git a/qml/icons/musicBackground.png b/qml/icons/musicBackground.png new file mode 100644 index 0000000..d2f67c3 Binary files /dev/null and b/qml/icons/musicBackground.png differ diff --git a/qml/icons/musicBackgroundBlue.png b/qml/icons/musicBackgroundBlue.png new file mode 100644 index 0000000..5c9b1a9 Binary files /dev/null and b/qml/icons/musicBackgroundBlue.png differ diff --git a/qml/icons/musicIcon.png b/qml/icons/musicIcon.png new file mode 100644 index 0000000..a8b2501 Binary files /dev/null and b/qml/icons/musicIcon.png differ diff --git a/qml/icons/navigationIcon.png b/qml/icons/navigationIcon.png new file mode 100644 index 0000000..df488f6 Binary files /dev/null and b/qml/icons/navigationIcon.png differ diff --git a/qml/icons/selectionBox.png b/qml/icons/selectionBox.png new file mode 100644 index 0000000..ce323af Binary files /dev/null and b/qml/icons/selectionBox.png differ diff --git a/qml/icons/settingsIcon.png b/qml/icons/settingsIcon.png new file mode 100644 index 0000000..ac2b99d Binary files /dev/null and b/qml/icons/settingsIcon.png differ diff --git a/qml/icons/simonedoe.png b/qml/icons/simonedoe.png new file mode 100644 index 0000000..9de9277 Binary files /dev/null and b/qml/icons/simonedoe.png differ diff --git a/qml/icons/timdoe.png b/qml/icons/timdoe.png new file mode 100644 index 0000000..36301a8 Binary files /dev/null and b/qml/icons/timdoe.png differ diff --git a/qml/iso-icons/iso_grs_7000_4_0238.dat b/qml/iso-icons/iso_grs_7000_4_0238.dat new file mode 100644 index 0000000..f2c08ff Binary files /dev/null and b/qml/iso-icons/iso_grs_7000_4_0238.dat differ diff --git a/qml/iso-icons/iso_grs_7000_4_0239.dat b/qml/iso-icons/iso_grs_7000_4_0239.dat new file mode 100644 index 0000000..44adbb0 Binary files /dev/null and b/qml/iso-icons/iso_grs_7000_4_0239.dat differ diff --git a/qml/iso-icons/iso_grs_7000_4_0245.dat b/qml/iso-icons/iso_grs_7000_4_0245.dat new file mode 100644 index 0000000..4c990b1 Binary files /dev/null and b/qml/iso-icons/iso_grs_7000_4_0245.dat differ diff --git a/qml/iso-icons/iso_grs_7000_4_0248.dat b/qml/iso-icons/iso_grs_7000_4_0248.dat new file mode 100644 index 0000000..7dbdca8 Binary files /dev/null and b/qml/iso-icons/iso_grs_7000_4_0248.dat differ diff --git a/qml/iso-icons/iso_grs_7000_4_0249.dat b/qml/iso-icons/iso_grs_7000_4_0249.dat new file mode 100644 index 0000000..89dc2d4 Binary files /dev/null and b/qml/iso-icons/iso_grs_7000_4_0249.dat differ diff --git a/qml/iso-icons/iso_grs_7000_4_1434A.dat b/qml/iso-icons/iso_grs_7000_4_1434A.dat new file mode 100644 index 0000000..35dafff Binary files /dev/null and b/qml/iso-icons/iso_grs_7000_4_1434A.dat differ 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 @@ + + + icons/callIcon.png + icons/carIcon.png + icons/musicIcon.png + icons/navigationIcon.png + icons/settingsIcon.png + icons/RedHighlight.png + icons/selectionBox.png + + 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 @@ + + + MusicContainer.qml + MusicContainerForm.ui.qml + icons/album1.png + icons/album2.png + icons/album3.png + icons/album4.png + icons/album5.png + icons/album6.png + icons/musicBackground.png + icons/musicBackgroundBlue.png + icons/BlueHighlight.png + + 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 @@ + + + SettingsContainer.qml + SettingsContainerForm.ui.qml + listmodels/SettingsMainModel.qml + listmodels/SettingsDisplayModel.qml + listmodels/SettingsDriverAssistModel.qml + listmodels/SettingsLightningModel.qml + listmodels/SettingsChimesModel.qml + listmodels/SettingsConvenienceModel.qml + Help.qml + listmodels/DisplayColorModel.qml + listmodels/DisplayUnitsModel.qml + listmodels/DriverAssistESCModel.qml + listmodels/DriverAssistTrafficSignsModel.qml + listmodels/LightningAutoHighbeamModel.qml + listmodels/LightningHdlampModel.qml + listmodels/ConvenienceAuxModel.qml + listmodels/ConvenienceParkHeaterModel.qml + listmodels/OnOffModel.qml + listmodels/ChimesParkSlotModel.qml + listmodels/ChimesInformationModel.qml + listmodels/ChimesWarningModel.qml + icons/MenuBack.png + icons/MenuBackBlue.png + + 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 @@ + + + iso-icons/iso_grs_7000_4_0238.dat + iso-icons/iso_grs_7000_4_0239.dat + iso-icons/iso_grs_7000_4_0245.dat + iso-icons/iso_grs_7000_4_0248.dat + iso-icons/iso_grs_7000_4_0249.dat + iso-icons/iso_grs_7000_4_1434A.dat + OverlayContainer.qml + OverlayContainerForm.ui.qml + icons/QML_mask.jpg + icons/icon_turnsignal_off.png + icons/icon_turnsignal_on.png + + diff --git a/qml/videos/car.avi b/qml/videos/car.avi new file mode 100644 index 0000000..d630903 Binary files /dev/null and b/qml/videos/car.avi differ diff --git a/qml/videos/carblue.avi b/qml/videos/carblue.avi new file mode 100644 index 0000000..b7537ca Binary files /dev/null and b/qml/videos/carblue.avi differ -- cgit v1.2.3