diff options
Diffstat (limited to 'HomeScreen/qml')
24 files changed, 116 insertions, 11 deletions
diff --git a/HomeScreen/qml/Home.qml b/HomeScreen/qml/Home.qml new file mode 100644 index 0000000..cfcd1c8 --- /dev/null +++ b/HomeScreen/qml/Home.qml @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.2 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 1.0 +import Home 1.0 + +Item { + id: root + + Image { + anchors.fill: parent + anchors.topMargin: -218 + anchors.bottomMargin: -215 + source: './images/AGL_HMI_Background_Car-01.png' + } + + property int pid: -1 + + GridView { + anchors.centerIn: parent + width: cellHeight * 3 + height: cellHeight * 3 + cellWidth: 320 + cellHeight: 320 + + model: ApplicationModel {} + delegate: MouseArea { + width: 320 + height: 320 + Image { + anchors.fill: parent + source: './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive') + } + onClicked: { + console.log("app is ", model.id) + pid = launcher.launch(model.id) + layoutHandler.makeMeVisible(pid) + + applicationArea.visible = true + appLauncherAreaLauncher.visible = false + layoutHandler.showAppLayer() + } + } + } +} diff --git a/HomeScreen/qml/ShortcutArea.qml b/HomeScreen/qml/ShortcutArea.qml index 9ef8701..d9931cb 100644 --- a/HomeScreen/qml/ShortcutArea.qml +++ b/HomeScreen/qml/ShortcutArea.qml @@ -17,20 +17,12 @@ import QtQuick 2.2 import QtQuick.Layouts 1.1 -import HomeScreen 1.0 Item { id: root width: 785 height: 218 - ApplicationLauncher { - id: launcher - } - - LayoutHandler { - id: layoutHandler - } ListModel { id: applicationModel @@ -40,7 +32,7 @@ Item { } ListElement { name: 'Multimedia' - application: 'radio@0.1' + application: 'mediaplayer@0.1' } ListElement { name: 'HVAC' @@ -67,8 +59,18 @@ Item { active: model.index === root.currentIndex onClicked: { root.currentIndex = active ? -1 : model.index - pid = launcher.launch(model.application) - layoutHandler.makeMeVisible(pid) + if (0 === model.index) { + appLauncherAreaLauncher.visible = true + applicationArea.visible = false + layoutHandler.hideAppLayer() + } + else { + applicationArea.visible = true + appLauncherAreaLauncher.visible = false + pid = launcher.launch(model.application) + layoutHandler.makeMeVisible(pid) + layoutHandler.showAppLayer() + } } } } diff --git a/HomeScreen/qml/images/Home/AGL_HMI_Background_Car-01.png b/HomeScreen/qml/images/Home/AGL_HMI_Background_Car-01.png Binary files differnew file mode 100644 index 0000000..b0072d8 --- /dev/null +++ b/HomeScreen/qml/images/Home/AGL_HMI_Background_Car-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Active-01.png Binary files differnew file mode 100644 index 0000000..888d0bd --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Inactive-01.png Binary files differnew file mode 100644 index 0000000..ab83b0e --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Active-01.png Binary files differnew file mode 100644 index 0000000..11d39e5 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Inactive-01.png Binary files differnew file mode 100644 index 0000000..6c0b914 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Active-01.png Binary files differnew file mode 100644 index 0000000..efc11e9 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Inactive-01.png Binary files differnew file mode 100644 index 0000000..b528376 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Active-01.png Binary files differnew file mode 100644 index 0000000..1c99ac4 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Inactive-01.png Binary files differnew file mode 100644 index 0000000..0bed61d --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Active-01.png Binary files differnew file mode 100644 index 0000000..e7ad085 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Inactive-01.png Binary files differnew file mode 100644 index 0000000..dd40750 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Active-01.png Binary files differnew file mode 100644 index 0000000..2df01d3 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Inactive-01.png Binary files differnew file mode 100644 index 0000000..ec62b87 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Active-01.png Binary files differnew file mode 100644 index 0000000..2150581 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Inactive-01.png Binary files differnew file mode 100644 index 0000000..61dcedc --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Active-01.png Binary files differnew file mode 100644 index 0000000..1aa5a01 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Inactive-01.png Binary files differnew file mode 100644 index 0000000..616983e --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Active-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Active-01.png Binary files differnew file mode 100644 index 0000000..1d13fd6 --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Active-01.png diff --git a/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Inactive-01.png b/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Inactive-01.png Binary files differnew file mode 100644 index 0000000..027f1fe --- /dev/null +++ b/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Inactive-01.png diff --git a/HomeScreen/qml/images/Home/home.qrc b/HomeScreen/qml/images/Home/home.qrc new file mode 100644 index 0000000..7dde212 --- /dev/null +++ b/HomeScreen/qml/images/Home/home.qrc @@ -0,0 +1,23 @@ +<RCC> + <qresource prefix="/images"> + <file>AGL_HMI_Background_Car-01.png</file> + <file>HMI_AppLauncher_Connectivity_Active-01.png</file> + <file>HMI_AppLauncher_Connectivity_Inactive-01.png</file> + <file>HMI_AppLauncher_Dashboard_Active-01.png</file> + <file>HMI_AppLauncher_Dashboard_Inactive-01.png</file> + <file>HMI_AppLauncher_HVAC_Active-01.png</file> + <file>HMI_AppLauncher_HVAC_Inactive-01.png</file> + <file>HMI_AppLauncher_Multimedia_Active-01.png</file> + <file>HMI_AppLauncher_Multimedia_Inactive-01.png</file> + <file>HMI_AppLauncher_Navigation_Active-01.png</file> + <file>HMI_AppLauncher_Navigation_Inactive-01.png</file> + <file>HMI_AppLauncher_Phone_Active-01.png</file> + <file>HMI_AppLauncher_Phone_Inactive-01.png</file> + <file>HMI_AppLauncher_POI_Active-01.png</file> + <file>HMI_AppLauncher_POI_Inactive-01.png</file> + <file>HMI_AppLauncher_Radio_Active-01.png</file> + <file>HMI_AppLauncher_Radio_Inactive-01.png</file> + <file>HMI_AppLauncher_Settings_Active-01.png</file> + <file>HMI_AppLauncher_Settings_Inactive-01.png</file> + </qresource> +</RCC> diff --git a/HomeScreen/qml/main.qml b/HomeScreen/qml/main.qml index 542f395..143d649 100644 --- a/HomeScreen/qml/main.qml +++ b/HomeScreen/qml/main.qml @@ -18,6 +18,7 @@ import QtQuick 2.2 import QtQuick.Window 2.1 import QtQuick.Layouts 1.1 +import HomeScreen 1.0 Window { visible: true @@ -26,6 +27,14 @@ Window { height: container.height * container.scale title: 'HomeScreen' + ApplicationLauncher { + id: launcher + } + + LayoutHandler { + id: layoutHandler + } + Image { id: container anchors.centerIn: parent @@ -48,6 +57,16 @@ Window { Layout.fillWidth: true Layout.fillHeight: true Layout.preferredHeight: 1920 - 218 - 215 + + visible: true + } + + Home { + id: appLauncherAreaLauncher + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredHeight: 1920 - 218 - 215 + visible: false } MediaArea { diff --git a/HomeScreen/qml/qml.qrc b/HomeScreen/qml/qml.qrc index a916b03..3d699e0 100644 --- a/HomeScreen/qml/qml.qrc +++ b/HomeScreen/qml/qml.qrc @@ -1,5 +1,6 @@ <RCC> <qresource prefix="/"> + <file>Home.qml</file> <file>main.qml</file> <file>MediaArea.qml</file> <file>MediaAreaBlank.qml</file> |