From 3c299579ce714726b268f8f345bd5981426942d5 Mon Sep 17 00:00:00 2001 From: srimaldia Date: Fri, 9 Dec 2016 19:58:35 +0900 Subject: add standalone BT app Signed-off-by: srimaldia --- doc/AppGrid.qml | 43 +++++++++++ doc/AppIcon.qml | 51 ++++++++++++ doc/BottomBar.qml | 65 ++++++++++++++++ doc/GridItem.qml | 45 +++++++++++ doc/Key.qml | 85 ++++++++++++++++++++ doc/Keyboard.qml | 137 ++++++++++++++++++++++++++++++++ doc/Main.qml | 101 ++++++++++++++++++++++++ doc/README.md | 23 ++++++ doc/Rotated.qml | 17 ++++ doc/Scaled.qml | 17 ++++ doc/Scaled_04.qml | 17 ++++ doc/Scaled_720p.qml | 17 ++++ doc/TopBar.qml | 146 +++++++++++++++++++++++++++++++++++ doc/VolumeControl.qml | 97 +++++++++++++++++++++++ doc/images/AGL-Logo.png | Bin 0 -> 20091 bytes doc/images/AppHex.png | Bin 0 -> 9827 bytes doc/images/Hex-Background.jpg | Bin 0 -> 119534 bytes doc/images/JLR-Logo.png | Bin 0 -> 35509 bytes doc/images/agl_icon.png | Bin 0 -> 25190 bytes doc/images/application_grid.png | Bin 0 -> 5427 bytes doc/images/backspace_icon.png | Bin 0 -> 640 bytes doc/images/blank_hexagon.png | Bin 0 -> 5405 bytes doc/images/browser_app_icon.png | Bin 0 -> 5474 bytes doc/images/browser_app_icon.svg | 100 ++++++++++++++++++++++++ doc/images/bt_close.png | Bin 0 -> 1215 bytes doc/images/cameras_app_icon.png | Bin 0 -> 4408 bytes doc/images/cameras_app_icon.svg | 82 ++++++++++++++++++++ doc/images/dashboard_app_icon.png | Bin 0 -> 5530 bytes doc/images/dashboard_app_icon.svg | 130 +++++++++++++++++++++++++++++++ doc/images/fingerprint_app_icon.png | Bin 0 -> 5919 bytes doc/images/fmradio_app_icon.png | Bin 0 -> 3732 bytes doc/images/fmradio_app_icon.svg | 110 ++++++++++++++++++++++++++ doc/images/googlemaps_app_icon.png | Bin 0 -> 3508 bytes doc/images/googlemaps_app_icon.svg | 86 +++++++++++++++++++++ doc/images/homescreen_icon.png | Bin 0 -> 4606 bytes doc/images/hvac_app_icon.png | Bin 0 -> 4236 bytes doc/images/hvac_app_icon.svg | 101 ++++++++++++++++++++++++ doc/images/icon_apps_blue.png | Bin 0 -> 6342 bytes doc/images/icongear.png | Bin 0 -> 10833 bytes doc/images/media_player_app_icon.png | Bin 0 -> 4347 bytes doc/images/media_player_app_icon.svg | 97 +++++++++++++++++++++++ doc/images/news_app_icon.png | Bin 0 -> 2428 bytes doc/images/news_app_icon.svg | 57 ++++++++++++++ doc/images/nfc_app_icon.png | Bin 0 -> 3933 bytes doc/images/nfc_app_icon.svg | 94 ++++++++++++++++++++++ doc/images/phone_app_icon.png | Bin 0 -> 4335 bytes doc/images/phone_app_icon.svg | 108 ++++++++++++++++++++++++++ doc/images/settings_icon.png | Bin 0 -> 6528 bytes doc/images/shift_off_icon.png | Bin 0 -> 825 bytes doc/images/shift_on_icon.png | Bin 0 -> 710 bytes doc/images/space_bar_icon.png | Bin 0 -> 302 bytes doc/images/switchcontrol.png | Bin 0 -> 2269 bytes doc/images/switchplate_off.png | Bin 0 -> 5071 bytes doc/images/switchplate_on.png | Bin 0 -> 4824 bytes doc/images/symbols_icon.png | Bin 0 -> 1373 bytes doc/images/symbols_off_icon.png | Bin 0 -> 1500 bytes doc/images/tizen.png | Bin 0 -> 4391 bytes doc/images/weather_app_icon.png | Bin 0 -> 4615 bytes doc/images/weather_app_icon.svg | 115 +++++++++++++++++++++++++++ doc/images/white_return.png | Bin 0 -> 728 bytes 60 files changed, 1941 insertions(+) create mode 100644 doc/AppGrid.qml create mode 100644 doc/AppIcon.qml create mode 100644 doc/BottomBar.qml create mode 100644 doc/GridItem.qml create mode 100644 doc/Key.qml create mode 100644 doc/Keyboard.qml create mode 100644 doc/Main.qml create mode 100644 doc/README.md create mode 100644 doc/Rotated.qml create mode 100644 doc/Scaled.qml create mode 100644 doc/Scaled_04.qml create mode 100644 doc/Scaled_720p.qml create mode 100644 doc/TopBar.qml create mode 100644 doc/VolumeControl.qml create mode 100755 doc/images/AGL-Logo.png create mode 100755 doc/images/AppHex.png create mode 100755 doc/images/Hex-Background.jpg create mode 100755 doc/images/JLR-Logo.png create mode 100755 doc/images/agl_icon.png create mode 100755 doc/images/application_grid.png create mode 100755 doc/images/backspace_icon.png create mode 100755 doc/images/blank_hexagon.png create mode 100755 doc/images/browser_app_icon.png create mode 100755 doc/images/browser_app_icon.svg create mode 100755 doc/images/bt_close.png create mode 100755 doc/images/cameras_app_icon.png create mode 100755 doc/images/cameras_app_icon.svg create mode 100755 doc/images/dashboard_app_icon.png create mode 100755 doc/images/dashboard_app_icon.svg create mode 100755 doc/images/fingerprint_app_icon.png create mode 100755 doc/images/fmradio_app_icon.png create mode 100755 doc/images/fmradio_app_icon.svg create mode 100755 doc/images/googlemaps_app_icon.png create mode 100755 doc/images/googlemaps_app_icon.svg create mode 100755 doc/images/homescreen_icon.png create mode 100755 doc/images/hvac_app_icon.png create mode 100755 doc/images/hvac_app_icon.svg create mode 100755 doc/images/icon_apps_blue.png create mode 100755 doc/images/icongear.png create mode 100755 doc/images/media_player_app_icon.png create mode 100755 doc/images/media_player_app_icon.svg create mode 100755 doc/images/news_app_icon.png create mode 100755 doc/images/news_app_icon.svg create mode 100755 doc/images/nfc_app_icon.png create mode 100755 doc/images/nfc_app_icon.svg create mode 100755 doc/images/phone_app_icon.png create mode 100755 doc/images/phone_app_icon.svg create mode 100755 doc/images/settings_icon.png create mode 100755 doc/images/shift_off_icon.png create mode 100755 doc/images/shift_on_icon.png create mode 100755 doc/images/space_bar_icon.png create mode 100755 doc/images/switchcontrol.png create mode 100755 doc/images/switchplate_off.png create mode 100755 doc/images/switchplate_on.png create mode 100755 doc/images/symbols_icon.png create mode 100755 doc/images/symbols_off_icon.png create mode 100755 doc/images/tizen.png create mode 100755 doc/images/weather_app_icon.png create mode 100755 doc/images/weather_app_icon.svg create mode 100755 doc/images/white_return.png (limited to 'doc') diff --git a/doc/AppGrid.qml b/doc/AppGrid.qml new file mode 100644 index 0000000..46b7889 --- /dev/null +++ b/doc/AppGrid.qml @@ -0,0 +1,43 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import components 1.0 +import system 1.0 + +App { + id: root + appId: 'appgrid' + + HexGrid { + anchors.centerIn: parent + columns: 5 + spacing: 10 + + Repeater { + model: ListModel { + ListElement { icon: "hvac"; name: "HVAC" } + ListElement { icon: "browser"; name: "DNA Browser" } + ListElement { icon: "dashboard"; name: "Dashboard" } + ListElement { icon: "googlemaps"; name: "Google Maps" } + ListElement { icon: "news"; name: "News" } + ListElement { icon: "nfc"; name: "NFC" } + ListElement { icon: "fmradio"; name: "FM Radio" } + ListElement { icon: "phone"; name: "Phone" } + ListElement { icon: "weather"; name: "Weather" } + ListElement { icon: "media_player"; name: "Media Manager" } + ListElement { icon: "cameras"; name: "Cameras" } + ListElement { icon: "fingerprint"; name: "Fingerprint" } + ListElement { icon: "wayland"; name: "Wayland" } + } + delegate: GridItem { + name: model.name + icon: model.icon + onClicked: System.activeApp = model.icon + } + } + } +} diff --git a/doc/AppIcon.qml b/doc/AppIcon.qml new file mode 100644 index 0000000..b645ed9 --- /dev/null +++ b/doc/AppIcon.qml @@ -0,0 +1,51 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +MouseArea { + id: root + + width: 90 + height: 90 + + property bool active: false + property alias source: icon.source + + function click() { + clicked(undefined) + } + + Image { + id: icon + anchors.centerIn: parent + width: 100 + height: 100 + fillMode: Image.PreserveAspectFit + } + +// states: [ +// State { +// name: "focused" +// when: root.active +// PropertyChanges { +// target: icon +// scale: 2.0 +// anchors.verticalCenterOffset: 20 +// } +// } +// ] + +// transitions: [ +// Transition { +// NumberAnimation { +// properties: 'scale, anchors.verticalCenterOffset' +// easing.type: Easing.OutElastic +// duration: 500 +// } +// } +// ] +} diff --git a/doc/BottomBar.qml b/doc/BottomBar.qml new file mode 100644 index 0000000..0760b71 --- /dev/null +++ b/doc/BottomBar.qml @@ -0,0 +1,65 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 +//import com.pelagicore.qmldevinfo 0.1 + +Item { + height: 120 + + ShaderEffect { + anchors.fill: parent + property color color: "#777" + property real radius: 40 + opacity: 0.24 + + fragmentShader: " +uniform lowp float radius; +uniform lowp float height; +uniform lowp float width; +uniform lowp float qt_Opacity; +uniform lowp vec4 color; +varying highp vec2 qt_TexCoord0; + +void main(void) { + lowp vec2 dist = min(qt_TexCoord0, vec2(1.0) - qt_TexCoord0); + lowp float xval = smoothstep(0.0, radius, dist.x * width); + lowp float yval = smoothstep(0.0, radius, dist.y * height); + gl_FragColor = mix(color, vec4(1.0), sqrt(yval * xval)) * qt_Opacity; +} + " + } + + Image { + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + source: "images/settings_icon.png" + + MouseArea { + anchors.fill: parent + onClicked: System.showSettings = !System.showSettings + } + } + +// DevInfo { +// id: devinfo +// } + + Image { + anchors.centerIn: parent + anchors.horizontalCenterOffset: -15 + source: "images/AGL-Logo.png" + height: 80 + fillMode: Image.PreserveAspectFit + } + + VolumeControl { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 40 + } +} diff --git a/doc/GridItem.qml b/doc/GridItem.qml new file mode 100644 index 0000000..93d3031 --- /dev/null +++ b/doc/GridItem.qml @@ -0,0 +1,45 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + id: root + + width: background.width + height: background.height + + property string name + property string icon + + signal clicked() + + Image { + id: background + source: "images/AppHex.png" + } + + Column { + y: 10 + anchors.horizontalCenter: parent.horizontalCenter + spacing: -10 + + AppIcon { + source: "images/%1_app_icon.png".arg(root.icon) + } + + Text { + anchors.horizontalCenter: parent.horizontalCenter + color: "white" + text: root.name + } + } + + MouseArea { + anchors.fill: parent + onClicked: root.clicked() + } +} diff --git a/doc/Key.qml b/doc/Key.qml new file mode 100644 index 0000000..6eb5ae0 --- /dev/null +++ b/doc/Key.qml @@ -0,0 +1,85 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 +import utils 1.0 + +Item { + id: root + + width: 90 + height: 130 + + property color color: Style.orangeViv + property alias text: textItem.text + property alias symbol: symbolItem.text + property real fade: 0.16 + property string icon: "" + + signal clicked() + + Rectangle { + id: keyRect + anchors.fill: parent + radius: 10 + } + + LinearGradient { + anchors.fill: parent + source: keyRect + start: Qt.point(0, 0) + end: Qt.point(0, 130) + gradient: Gradient { + GradientStop { position: 0.0; color: root.color } + GradientStop { position: root.fade; color: Qt.darker(root.color, 2.0) } + GradientStop { position: 0.8; color: "black" } + } + } + + Rectangle { + anchors.fill: parent + color: "transparent" + radius: 10 + border.width: 4 + border.color: Style.orangeLt + + Text { + id: symbolItem + visible: icon === "" + anchors.top: parent.top + anchors.right: parent.right + anchors.topMargin: 15 + anchors.rightMargin: 20 + font.pixelSize: 28 + font.family: "Source Sans Pro" + color: "white" + } + + Text { + id: textItem + visible: icon === "" + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 10 + font.pixelSize: 60 + font.family: "Source Sans Pro" + color: "white" + } + + Image { + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 30 + source: icon === "" ? icon : "images/" + icon + ".png" + } + } + + MouseArea { + anchors.fill: parent + onClicked: root.clicked() + } +} diff --git a/doc/Keyboard.qml b/doc/Keyboard.qml new file mode 100644 index 0000000..be79b75 --- /dev/null +++ b/doc/Keyboard.qml @@ -0,0 +1,137 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Item { + id: root + height: 620 + + property var currentString: "" + property bool useSymbols: false + property bool useUppercase: false + + property var rows: [ + ["q","w","e","r","t","y","u","i","o","p"], + ["a","s","d","f","g","h","j","k","l"], + ["z","x","c","v","b","n","m"] + ] + property var symbolRows: [ + ["1","2","3","4","5","6","7","8","9","0"], + ["(",")","-","@","*","^",":",";","~"], + ["/","'","\"",".",",","?","!"] + ] + + function keyPressed(text, symbol) { + if (useSymbols) + currentString += symbol + else + currentString += text + } + + Rectangle { + anchors.fill: parent + color: "black" + opacity: 0.7 + } + + Column { + y: 20 + width: parent.width + spacing: 20 + + Row { + anchors.horizontalCenter: parent.horizontalCenter + spacing: 10 + + Repeater { + model: rows[0] + Key { + text: useUppercase ? modelData.toUpperCase() : modelData + symbol: symbolRows[0][index] + onClicked: keyPressed(text, symbol) + } + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter + spacing: 10 + + Repeater { + model: rows[1] + Key { + text: useUppercase ? modelData.toUpperCase() : modelData + symbol: symbolRows[1][index] + onClicked: keyPressed(text, symbol) + } + } + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter + spacing: 45 + + Key { + width: 130 + color: Style.orangeLt + fade: 0.3 + icon: "shift_" + (useUppercase ? "on" : "off") + "_icon" + onClicked: useUppercase = !useUppercase + } + + Row { + spacing: 10 + + Repeater { + model: rows[2] + Key { + text: useUppercase ? modelData.toUpperCase() : modelData + symbol: symbolRows[2][index] + onClicked: keyPressed(text, symbol) + } + } + } + + Key { + width: 130 + color: Style.orangeLt + fade: 0.3 + icon: "backspace_icon" + onClicked: currentString = currentString.slice(0, -1) + } + } + + Row { + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter + + Key { + width: 150 + color: Style.orangeLt + fade: 0.3 + icon: "symbols" + (useSymbols ? "" : "_off") + "_icon" + onClicked: useSymbols = !useSymbols + } + + Key { + width: 700 + color: Style.orangeLt + fade: 0.3 + icon: "space_bar_icon" + onClicked: keyPressed(" ", " ") + } + + Key { + width: 150 + color: Style.orangeLt + fade: 0.3 + icon: "white_return" + } + } + } +} diff --git a/doc/Main.qml b/doc/Main.qml new file mode 100644 index 0000000..8f92511 --- /dev/null +++ b/doc/Main.qml @@ -0,0 +1,101 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.3 +import "apps/Browser" +import "apps/Cameras" +import "apps/Dashboard" +import "apps/Fingerprint" +import "apps/FMRadio" +import "apps/GoogleMaps" +import "apps/Home" +import "apps/HVAC" +import "apps/MediaPlayer" +import "apps/News" +import "apps/NFC" +import "apps/Phone" +import "apps/Settings" +import "apps/Weather" +import "apps/WaylandView" +import system 1.0 + +Item { + width: 1080 + height: 1920 + + Image { + anchors.centerIn: parent + source: "images/Hex-Background.jpg" + } + + Item { + id: appSurface + + anchors.top: topbar.bottom + anchors.bottom: bottombar.top + anchors.left: parent.left + anchors.right: parent.right + + + Home {} + GoogleMaps {} + Browser {} + Dashboard {} + HVAC {} + Weather {} + FMRadio {} + MediaPlayer {} + NFC {} + News {} + Phone {} + WaylandView {} + Cameras {} + Fingerprint {} + AppGrid {} + } + + TopBar { + id: topbar + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + } + + BottomBar { + id: bottombar + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + } + + Settings { + id: settings + visible: System.showSettings + anchors.fill: parent + anchors.topMargin: 120 + anchors.bottomMargin: 120 + } + + Keyboard { + id: keyboard + y: System.showKeyboard ? parent.height - height : parent.height + width: parent.width + + Behavior on y { YAnimator { duration: 300; easing.type: Easing.OutQuad }} + } + + focus: true + Keys.onLeftPressed: topbar.left() + Keys.onRightPressed: topbar.right() + Keys.onReturnPressed: topbar.click() + Keys.onBackPressed: topbar.home() + Keys.onPressed: { + switch (event.key) { + default: + console.debug('Main.qml', event.key) + } + } +} diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..b01fc55 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,23 @@ +Open source QML UI + +To run on target: +$ cd /usr/AGL/CES2017 +$ /usr/bin/qt5/qmlscene -I imports Main.qml + +For development it can be nice to use Scaled.qml instead so it fits your screen. + + + +© 2015 Jaguar Land Rover. All Rights Reserved. +Licensed under Creative Commons Attribution 4.0 International +https://creativecommons.org/licenses/by/4.0/legalcode + +(Optional) switch shell for weston to ivi-shell and start demo apps if you want to start demo apps with ivi-shell. +$ cd /usr/AGL/CES2017 +$ ./switch_to_ivi-shell +(Option a) $ ./start_ALS2016_ivi-shell.sh +(Option b) $ ./start_ALS2016_with_navi_ivi-shell.sh + +Option a: start QML UI only. +Option b: start QML + CarNavigation:/home/navi. For the time being, CarNavigation expects to be Wayland native application, which will be showed on top of QML by using LayerManagerControl. + diff --git a/doc/Rotated.qml b/doc/Rotated.qml new file mode 100644 index 0000000..4eef7f3 --- /dev/null +++ b/doc/Rotated.qml @@ -0,0 +1,17 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + width: 1920 + height: 1080 + + Main { + anchors.centerIn: parent + rotation: 90 + } +} diff --git a/doc/Scaled.qml b/doc/Scaled.qml new file mode 100644 index 0000000..c566735 --- /dev/null +++ b/doc/Scaled.qml @@ -0,0 +1,17 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + width: 1080*scale + height: 1920*scale + scale: 0.5 + + Main { + anchors.centerIn: parent + } +} diff --git a/doc/Scaled_04.qml b/doc/Scaled_04.qml new file mode 100644 index 0000000..502a663 --- /dev/null +++ b/doc/Scaled_04.qml @@ -0,0 +1,17 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + width: 1080*scale + height: 1920*scale + scale: 0.4 + + Main { + anchors.centerIn: parent + } +} diff --git a/doc/Scaled_720p.qml b/doc/Scaled_720p.qml new file mode 100644 index 0000000..86cb9b1 --- /dev/null +++ b/doc/Scaled_720p.qml @@ -0,0 +1,17 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + width: 1080*scale + height: 1920*scale + scale: 0.666666666 + + Main { + anchors.centerIn: parent + } +} diff --git a/doc/TopBar.qml b/doc/TopBar.qml new file mode 100644 index 0000000..5e0a532 --- /dev/null +++ b/doc/TopBar.qml @@ -0,0 +1,146 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 +import execScript 1.0 + +Item { + id: root + + height: 120 + + ShaderEffect { + anchors.fill: parent + property color color: "#777" + property real radius: 40 + opacity: 0.24 + + fragmentShader: " +uniform lowp float radius; +uniform lowp float height; +uniform lowp float width; +uniform lowp float qt_Opacity; +uniform lowp vec4 color; +varying highp vec2 qt_TexCoord0; + +void main(void) { + lowp vec2 dist = min(qt_TexCoord0, vec2(1.0) - qt_TexCoord0); + lowp float xval = smoothstep(0.0, radius, dist.x * width); + lowp float yval = smoothstep(0.0, radius, dist.y * height); + gl_FragColor = mix(color, vec4(1.0), sqrt(yval * xval)) * qt_Opacity; +} + " + } + + property int currentIndex: 0 + property AppIcon currentItem + + Row { + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: 5 + anchors.horizontalCenter: parent.horizontalCenter + spacing: 30 + + AppIcon { + id: homeScreen + active: currentIndex === 0 + onActiveChanged: if (active) root.currentItem = homeScreen + property var mainScreen: root.parent + property bool home: System.activeApp === "home" + source: home ? "images/agl_icon.png" : "images/homescreen_icon.png" + + onClicked: { + if (currentIndex === 1) { + execscript.execute("./switch_off_navi.sh") + } + currentIndex = 0 + System.activeApp = "home" + } + } + + AppIcon { + id: googleMaps + active: currentIndex === 1 + onActiveChanged: if (active) root.currentItem = googleMaps + source: "images/googlemaps_app_icon.png" + + onClicked: { + currentIndex = 1 + System.activeApp = "googlemaps" + execscript.execute("./switch_on_navi.sh") + } + } + + Repeater { + model: ListModel { + id: applicationModel + ListElement { name: "browser" } + ListElement { name: "dashboard" } + ListElement { name: "hvac" } + ListElement { name: "weather" } + ListElement { name: "fmradio" } + ListElement { name: "media_player" } + } + + delegate: AppIcon { + id: app + active: currentIndex === model.index + 2 + onActiveChanged: if (active) root.currentItem = app + source: "images/%1_app_icon.png".arg(model.name) + onClicked: { + if (currentIndex === 1) { + execscript.execute("./switch_off_navi.sh") + } + System.activeApp = model.name + currentIndex = model.index + 2 + } + + Rectangle { + x: -15.5 + y: -15 + height: 123 + width: 1 + color: "black" + } + } + } + + AppIcon { + id: launcher + active: currentIndex === applicationModel.count + 2 + onActiveChanged: if (active) root.currentItem = launcher + source: "images/application_grid.png" + onClicked: { + if (currentIndex === 1) { + execscript.execute("./switch_off_navi.sh") + } + System.activeApp = "appgrid" + currentIndex = applicationModel.count + 2 + } + } + } + + property int __appCount: applicationModel.count + 3 + + function left() { + root.currentIndex = (root.currentIndex + root.__appCount - 1) % root.__appCount + } + + function right() { + root.currentIndex = (root.currentIndex + 1) % root.__appCount + } + + function click() { + currentItem.click() + } + + function home() { + homeScreen.click() + } + + ExecScript { id: execscript } +} diff --git a/doc/VolumeControl.qml b/doc/VolumeControl.qml new file mode 100644 index 0000000..56540a8 --- /dev/null +++ b/doc/VolumeControl.qml @@ -0,0 +1,97 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + height: 100 + width: childrenRect.width + + property alias value: shader.value + + FontLoader { + source: "fontawesome-webfont.ttf" + } + + Row { + spacing: 28 + + Text { + anchors.verticalCenter: parent.verticalCenter + font.family: "FontAwesome" + font.pixelSize: 30 + color: "white" + text: "\uf068" + + MouseArea { + anchors.fill: parent + onClicked: shader.value = Math.max(shader.value - 0.1, 0.0) + } + } + + ShaderEffect { + id: shader + width: 85 + height: 100 + + property color bgColor: "#333" + property color fgColor: "#b2f0ff" + property real value: 0.5 + + fragmentShader: " +uniform lowp float qt_Opacity; +uniform lowp float value; +uniform lowp vec4 bgColor; +uniform lowp vec4 fgColor; +varying highp vec2 qt_TexCoord0; + +void main(void) { + lowp float x = min(qt_TexCoord0.x, 1.0 - qt_TexCoord0.x); + lowp float y = min(qt_TexCoord0.y, 1.0 - qt_TexCoord0.y); + lowp float c = y - 0.5 * (0.5 - x); + lowp float outside = smoothstep(0.0, 0.01, c); + lowp float rim = smoothstep(0.1, 0.11, c - step(x, 0.101)); + lowp float inside = smoothstep(0.125, 0.135, c - step(x, 0.125)); + + lowp vec4 color = mix(bgColor, fgColor, step(qt_TexCoord0.x, value)); + color = mix(color, bgColor, inside * 0.8); + color = mix(color, vec4(1.0), (rim - inside) * 0.6); + + gl_FragColor = mix(vec4(0.0), color, outside) * qt_Opacity; +} + " + + MouseArea { + anchors.fill: parent + onPositionChanged: { + shader.value = Math.min(Math.max(mouse.x / width, 0.0), 1.0) + } + } + + Text { + anchors.centerIn: parent + font.family: "Source Sans Pro" + font.weight: Font.Bold + font.pixelSize: 30 + color: "white" + text: Math.round(shader.value * 100) + } + } + + Text { + anchors.verticalCenter: parent.verticalCenter + font.family: "FontAwesome" + font.pixelSize: 30 + color: "white" + text: "\uf067" + + MouseArea { + anchors.fill: parent + onClicked: shader.value = Math.min(shader.value + 0.1, 1.0) + } + } + } +} diff --git a/doc/images/AGL-Logo.png b/doc/images/AGL-Logo.png new file mode 100755 index 0000000..e869d7f Binary files /dev/null and b/doc/images/AGL-Logo.png differ diff --git a/doc/images/AppHex.png b/doc/images/AppHex.png new file mode 100755 index 0000000..6c9aa68 Binary files /dev/null and b/doc/images/AppHex.png differ diff --git a/doc/images/Hex-Background.jpg b/doc/images/Hex-Background.jpg new file mode 100755 index 0000000..ac9bae0 Binary files /dev/null and b/doc/images/Hex-Background.jpg differ diff --git a/doc/images/JLR-Logo.png b/doc/images/JLR-Logo.png new file mode 100755 index 0000000..50887d1 Binary files /dev/null and b/doc/images/JLR-Logo.png differ diff --git a/doc/images/agl_icon.png b/doc/images/agl_icon.png new file mode 100755 index 0000000..ad36a0d Binary files /dev/null and b/doc/images/agl_icon.png differ diff --git a/doc/images/application_grid.png b/doc/images/application_grid.png new file mode 100755 index 0000000..0cc5b2b Binary files /dev/null and b/doc/images/application_grid.png differ diff --git a/doc/images/backspace_icon.png b/doc/images/backspace_icon.png new file mode 100755 index 0000000..6bc0f20 Binary files /dev/null and b/doc/images/backspace_icon.png differ diff --git a/doc/images/blank_hexagon.png b/doc/images/blank_hexagon.png new file mode 100755 index 0000000..afeb31f Binary files /dev/null and b/doc/images/blank_hexagon.png differ diff --git a/doc/images/browser_app_icon.png b/doc/images/browser_app_icon.png new file mode 100755 index 0000000..9c6ec36 Binary files /dev/null and b/doc/images/browser_app_icon.png differ diff --git a/doc/images/browser_app_icon.svg b/doc/images/browser_app_icon.svg new file mode 100755 index 0000000..14d0ae6 --- /dev/null +++ b/doc/images/browser_app_icon.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + diff --git a/doc/images/bt_close.png b/doc/images/bt_close.png new file mode 100755 index 0000000..51ace79 Binary files /dev/null and b/doc/images/bt_close.png differ diff --git a/doc/images/cameras_app_icon.png b/doc/images/cameras_app_icon.png new file mode 100755 index 0000000..2127f8e Binary files /dev/null and b/doc/images/cameras_app_icon.png differ diff --git a/doc/images/cameras_app_icon.svg b/doc/images/cameras_app_icon.svg new file mode 100755 index 0000000..d8d1610 --- /dev/null +++ b/doc/images/cameras_app_icon.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + diff --git a/doc/images/dashboard_app_icon.png b/doc/images/dashboard_app_icon.png new file mode 100755 index 0000000..f7085d6 Binary files /dev/null and b/doc/images/dashboard_app_icon.png differ diff --git a/doc/images/dashboard_app_icon.svg b/doc/images/dashboard_app_icon.svg new file mode 100755 index 0000000..ca1146a --- /dev/null +++ b/doc/images/dashboard_app_icon.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/fingerprint_app_icon.png b/doc/images/fingerprint_app_icon.png new file mode 100755 index 0000000..abea688 Binary files /dev/null and b/doc/images/fingerprint_app_icon.png differ diff --git a/doc/images/fmradio_app_icon.png b/doc/images/fmradio_app_icon.png new file mode 100755 index 0000000..b781d31 Binary files /dev/null and b/doc/images/fmradio_app_icon.png differ diff --git a/doc/images/fmradio_app_icon.svg b/doc/images/fmradio_app_icon.svg new file mode 100755 index 0000000..5442afe --- /dev/null +++ b/doc/images/fmradio_app_icon.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/googlemaps_app_icon.png b/doc/images/googlemaps_app_icon.png new file mode 100755 index 0000000..3cb3e8d Binary files /dev/null and b/doc/images/googlemaps_app_icon.png differ diff --git a/doc/images/googlemaps_app_icon.svg b/doc/images/googlemaps_app_icon.svg new file mode 100755 index 0000000..425ca66 --- /dev/null +++ b/doc/images/googlemaps_app_icon.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/homescreen_icon.png b/doc/images/homescreen_icon.png new file mode 100755 index 0000000..d736310 Binary files /dev/null and b/doc/images/homescreen_icon.png differ diff --git a/doc/images/hvac_app_icon.png b/doc/images/hvac_app_icon.png new file mode 100755 index 0000000..27df1a0 Binary files /dev/null and b/doc/images/hvac_app_icon.png differ diff --git a/doc/images/hvac_app_icon.svg b/doc/images/hvac_app_icon.svg new file mode 100755 index 0000000..6626041 --- /dev/null +++ b/doc/images/hvac_app_icon.svg @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/icon_apps_blue.png b/doc/images/icon_apps_blue.png new file mode 100755 index 0000000..95b534b Binary files /dev/null and b/doc/images/icon_apps_blue.png differ diff --git a/doc/images/icongear.png b/doc/images/icongear.png new file mode 100755 index 0000000..fa619aa Binary files /dev/null and b/doc/images/icongear.png differ diff --git a/doc/images/media_player_app_icon.png b/doc/images/media_player_app_icon.png new file mode 100755 index 0000000..2495afd Binary files /dev/null and b/doc/images/media_player_app_icon.png differ diff --git a/doc/images/media_player_app_icon.svg b/doc/images/media_player_app_icon.svg new file mode 100755 index 0000000..1bae4ed --- /dev/null +++ b/doc/images/media_player_app_icon.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/news_app_icon.png b/doc/images/news_app_icon.png new file mode 100755 index 0000000..33752f4 Binary files /dev/null and b/doc/images/news_app_icon.png differ diff --git a/doc/images/news_app_icon.svg b/doc/images/news_app_icon.svg new file mode 100755 index 0000000..e30ffe2 --- /dev/null +++ b/doc/images/news_app_icon.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + diff --git a/doc/images/nfc_app_icon.png b/doc/images/nfc_app_icon.png new file mode 100755 index 0000000..43c3a87 Binary files /dev/null and b/doc/images/nfc_app_icon.png differ diff --git a/doc/images/nfc_app_icon.svg b/doc/images/nfc_app_icon.svg new file mode 100755 index 0000000..a104c0f --- /dev/null +++ b/doc/images/nfc_app_icon.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/phone_app_icon.png b/doc/images/phone_app_icon.png new file mode 100755 index 0000000..3e3c9ac Binary files /dev/null and b/doc/images/phone_app_icon.png differ diff --git a/doc/images/phone_app_icon.svg b/doc/images/phone_app_icon.svg new file mode 100755 index 0000000..606dde9 --- /dev/null +++ b/doc/images/phone_app_icon.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/settings_icon.png b/doc/images/settings_icon.png new file mode 100755 index 0000000..44fb3d8 Binary files /dev/null and b/doc/images/settings_icon.png differ diff --git a/doc/images/shift_off_icon.png b/doc/images/shift_off_icon.png new file mode 100755 index 0000000..720a69a Binary files /dev/null and b/doc/images/shift_off_icon.png differ diff --git a/doc/images/shift_on_icon.png b/doc/images/shift_on_icon.png new file mode 100755 index 0000000..503ff24 Binary files /dev/null and b/doc/images/shift_on_icon.png differ diff --git a/doc/images/space_bar_icon.png b/doc/images/space_bar_icon.png new file mode 100755 index 0000000..2b5c2fa Binary files /dev/null and b/doc/images/space_bar_icon.png differ diff --git a/doc/images/switchcontrol.png b/doc/images/switchcontrol.png new file mode 100755 index 0000000..1c350b5 Binary files /dev/null and b/doc/images/switchcontrol.png differ diff --git a/doc/images/switchplate_off.png b/doc/images/switchplate_off.png new file mode 100755 index 0000000..16250c5 Binary files /dev/null and b/doc/images/switchplate_off.png differ diff --git a/doc/images/switchplate_on.png b/doc/images/switchplate_on.png new file mode 100755 index 0000000..43bb554 Binary files /dev/null and b/doc/images/switchplate_on.png differ diff --git a/doc/images/symbols_icon.png b/doc/images/symbols_icon.png new file mode 100755 index 0000000..07e1deb Binary files /dev/null and b/doc/images/symbols_icon.png differ diff --git a/doc/images/symbols_off_icon.png b/doc/images/symbols_off_icon.png new file mode 100755 index 0000000..59cd170 Binary files /dev/null and b/doc/images/symbols_off_icon.png differ diff --git a/doc/images/tizen.png b/doc/images/tizen.png new file mode 100755 index 0000000..c6674d6 Binary files /dev/null and b/doc/images/tizen.png differ diff --git a/doc/images/weather_app_icon.png b/doc/images/weather_app_icon.png new file mode 100755 index 0000000..dcb46ee Binary files /dev/null and b/doc/images/weather_app_icon.png differ diff --git a/doc/images/weather_app_icon.svg b/doc/images/weather_app_icon.svg new file mode 100755 index 0000000..d1fb79c --- /dev/null +++ b/doc/images/weather_app_icon.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/images/white_return.png b/doc/images/white_return.png new file mode 100755 index 0000000..0385846 Binary files /dev/null and b/doc/images/white_return.png differ -- cgit 1.2.3-korg