summaryrefslogtreecommitdiff
path: root/src/components/qt_hmi/qml_model_qt5/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/qt_hmi/qml_model_qt5/controls')
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml68
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml48
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml87
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml66
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml77
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml93
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml125
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml53
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml108
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml133
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/Icon.qml65
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml70
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml64
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml103
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml246
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml105
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/Pager.qml53
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml77
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml75
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml106
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml136
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml49
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js39
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml97
-rw-r--r--src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml42
25 files changed, 0 insertions, 2185 deletions
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml b/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml
deleted file mode 100644
index 58cba17707..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/ArrowKeys.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file ArrowKeys.qml
- * @brief Keys with arrow for cursor movement.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-Item {
- width: buttonOk.width
- height: buttonOk.height
-
- HardwareButton {
- id: arrowUp
- buttonId: Common.ButtonName.TUNEUP
- name: "Up"
- }
- HardwareButton {
- id: arrowDown
- buttonId: Common.ButtonName.TUNEDOWN
- name: "Down"
- }
- HardwareButton {
- id: arrowLeft
- buttonId: Common.ButtonName.SEEKLEFT
- name: "Left"
- }
- HardwareButton {
- id: arrowRight
- buttonId: Common.ButtonName.SEEKRIGHT
- name: "Right"
- }
- HardwareButton {
- id: buttonOk
- buttonId: Common.ButtonName.OK
- name: "Ok"
- longPressAvailable: false
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml
deleted file mode 100644
index 5d82f15592..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/BackButton.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file BackButton.qml
- * @brief Button "Back" that return to previous menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-OvalButton {
- text: "Back"
- onClicked: { contentLoader.back() }
- fontSize: Constants.fontSize
- opacity: 0
-
- NumberAnimation on opacity {
- to: 1;
- duration: Constants.animationDuration
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml
deleted file mode 100644
index f0755b3980..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/CircleButton.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * @file CircleButton.qml
- * @brief Parent class for circle button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Image {
- id: circleBtn
- source: imgOff
- property alias text: btnText.text
- property alias pixelSize: btnText.font.pixelSize
- property string dest: ""
- property bool isPressed: false
- property string imgOff: "../res/buttons/round_btn.png"
- property string imgOn: "../res/buttons/round_pressed_btn.png"
- property string textColorOnPressed: Constants.secondaryColor
- property string textColorDefault: Constants.primaryColor
-
- signal clicked()
- function wasClicked()
- {
- clicked()
- }
-
- Text {
- anchors.centerIn: parent
- id: btnText
- color: textColorDefault
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- console.log("CircleButton onPressed enter");
- source = imgOn
- btnText.color = textColorOnPressed
- isPressed = true
- console.log("CircleButton onPressed exit");
- }
- onReleased: {
- console.log("CircleButton onReleased enter");
- source = imgOff
- btnText.color = textColorDefault
- isPressed = false
- console.log("CircleButton onReleased exit");
- }
- onClicked: {
- console.log("CircleButton onClicked enter");
- if(dest !== ""){
- contentLoader.go(dest)
- }
- circleBtn.wasClicked()
- console.log("CircleButton onClicked enter");
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml b/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml
deleted file mode 100644
index dc1231570a..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/ClickableImage.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file ClickableImage.qml
- * @brief Clickable image item
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Image {
- signal pressed ()
- signal released ()
- signal canceled ()
- signal clicked()
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- parent.scale = Constants.pressedIconScale
- parent.pressed()
- }
-
- onReleased: {
- parent.scale = 1
- parent.released()
- }
-
- onCanceled: {
- parent.scale = 1
- parent.canceled()
- }
-
- onClicked: {
- parent.clicked()
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml b/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml
deleted file mode 100644
index c56e3dc13d..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/ClickableText.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file ClickableText.qml
- * @brief Clickable text item
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-
-Text {
- property string defaultColor
- property string pressedColor
- signal pressed ()
- signal released ()
- signal canceled ()
- signal clicked ()
-
- color: defaultColor
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- press()
- parent.pressed()
- }
-
- onReleased: {
- release()
- parent.released()
- }
-
- onCanceled: {
- release()
- parent.canceled()
- }
-
- onClicked: {
- parent.clicked()
- }
- }
-
- function press () {
- color = pressedColor
- }
-
- function release () {
- color = defaultColor
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml b/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml
deleted file mode 100644
index 9211ac1baf..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/ClimateControlBtn.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @file ClimateControlBtn.qml
- * @brief Round button, which is used at climat menu.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item
-{
- id: climateControlBtn
- width: climateBtnImg.width
- height: climateBtnImg.height
- property string name: ""
- property string txt: ""
- state: "off"
-
- Image {
- id: climateBtnImg
- source: climateControlBtn.state === "off" ? "../res/climate/climate_round_off_btn.png" : "../res/climate/climate_round_on_btn.png"
-
- Image {
- id: hoverImg
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- property string st: climateControlBtn.state === "off" ? "_off" : "_on"
- source: climateControlBtn.name === "" ? "": "../res/climate/" + climateControlBtn.name + st + ".png"
- }
-
- Text {
- id: hoverText
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- text: climateControlBtn.txt
- font.pixelSize: Constants.fontSize
- color: climateControlBtn.state === "off" ? Constants.primaryColor : Constants.secondaryColor
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if(climateControlBtn.state === "on") {
- climateControlBtn.state = "off"
- climateBtnImg.source = "../res/climate/climate_round_off_btn.png"
- if(climateControlBtn.txt != "") {
- hoverText.color = Constants.primaryColor
- }
- if(climateControlBtn.name != "") {
- hoverImg.source = "../res/climate/" + climateControlBtn.name + "_off.png"
- }
- } else {
- climateControlBtn.state = "on"
- climateBtnImg.source = "../res/climate/climate_round_on_btn.png"
- if(climateControlBtn.txt != "") {
- hoverText.color = Constants.secondaryColor
- }
- if(climateControlBtn.name != "") {
- hoverImg.source = "../res/climate/" + climateControlBtn.name + "_on.png"
- }
- }
- }
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml b/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml
deleted file mode 100644
index 3695070dfd..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/GradientRectangle.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * @file GradientRectangle.qml
- * @brief Rectangle with gradient.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-import "../hmi_api/Common.js" as Common
-
-Rectangle {
- property string firstColor: "grey"
- property string secondColor: "#2E2E2E"
- property alias fontSize: text.font.pixelSize
- property alias text: text.text
- property int customButtonID
- property bool isCustomButton: false
- property bool clickProcessed
- signal pressed()
- signal released()
-
- radius: 5
- border.color: "#D3D3D3"
-
- Text {
- id: text
- anchors.fill: parent
- font.pixelSize: Constants.titleFontSize
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- elide: Text.ElideRight
- }
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: {
- firstColor = "#2E2E2E"
- secondColor = "grey"
- parent.pressed()
- }
- onReleased: {
- firstColor = "grey"
- secondColor = "#2E2E2E"
- parent.released()
- }
- }
-
- Timer {
- id: timer
- interval: Constants.customButtonTimer
- repeat: false
- triggeredOnStart: false
- }
-
- onPressed: {
- if (isCustomButton) {
- timer.start()
- clickProcessed = false
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, customButtonID)
- }
- }
-
- onReleased: {
- if (isCustomButton) {
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, customButtonID)
- timer.stop()
- if (!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, customButtonID)
- }
- }
- }
-
- Connections {
- target: timer
- onTriggered: {
- if (isCustomButton) {
- if(!clickProcessed) {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, customButtonID)
- clickProcessed = true
- }
- }
- }
- }
-
- gradient: Gradient {
- GradientStop {
- position: 0.1
- color: firstColor
- }
- GradientStop {
- position: 0.5
- color: secondColor
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml b/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml
deleted file mode 100644
index 39e1f0d7c4..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/GridItem.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file GridItem.qml
- * @brief Item with animation for GridMenu
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- id: item
- opacity: 0
- SequentialAnimation {
- id: animation
- PauseAnimation {duration: index * 100 }
- NumberAnimation {
- target: item
- duration: Constants.animationDuration
- property: "opacity"
- from: 0; to: 1;
- }
- }
- Component.onCompleted: {
- animation.start()
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml
deleted file mode 100644
index 47f034082e..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/HardwareButton.qml
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file HardwareButton.qml
- * @brief Parent class for hardware button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import com.ford.sdl.hmi.hw_buttons 1.0
-import "../hmi_api/Common.js" as Common
-
-MaskedContainer {
- property string name
- property int buttonId: Common.ButtonName.CUSTOM_BUTTON
- property bool upDownAvailable: true
- property bool shortPressAvailable: true
- property bool longPressAvailable: true
-
- signal hold
-
- Image {
- source: "../res/controlButtons/" + name + "Button.png"
- }
- Image {
- id: pressedImg
- source: "../res/controlButtons/" + name + "Button_pressed.png"
- visible: false
- Behavior on opacity {
- NumberAnimation { duration: 80 }
- }
- }
- Timer {
- id: timer
- interval: 2000
- repeat: false
- triggeredOnStart: false
- }
- property bool clickProcessed
- onPressed: {
- clickProcessed = false
- pressedImg.visible = true
- timer.start()
- if (upDownAvailable) {
- sdlButtons.onButtonEvent(buttonId, Common.ButtonEventMode.BUTTONDOWN, undefined)
- }
- }
-
- onReleased: {
- if (upDownAvailable) {
- sdlButtons.onButtonEvent(buttonId, Common.ButtonEventMode.BUTTONUP, undefined)
- }
- timer.stop()
- if (!clickProcessed && shortPressAvailable) {
- sdlButtons.onButtonPress(buttonId, Common.ButtonPressMode.SHORT, undefined)
- }
- pressedImg.visible = false
- }
-
- Connections {
- target: timer
- onTriggered: {
- if(!clickProcessed && longPressAvailable) {
- sdlButtons.onButtonPress(buttonId, Common.ButtonPressMode.LONG, undefined)
- clickProcessed = true
- hold()
- }
- }
- }
-
- Component.onCompleted: {
- if (buttonId !== Common.ButtonName.CUSTOM_BUTTON) {
- settingsContainer.buttonCapabilities.push(
- {
- name: buttonId,
- upDownAvailable: upDownAvailable,
- shortPressAvailable: shortPressAvailable,
- longPressAvailable: longPressAvailable
- });
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml b/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml
deleted file mode 100644
index 26cfe9abe0..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/HeaderMenu.qml
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * @file HeaderMenu.qml
- * @brief Header menu view.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- id: headerMenu
- anchors.fill: parent
- Text {
- anchors.leftMargin: Constants.margin
- anchors.topMargin: Constants.margin
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize
- text: "75°"
- }
-
- Item {
- width: menuText.width
- height: parent.height
- anchors.topMargin: Constants.margin
- anchors.horizontalCenter: headerMenu.horizontalCenter
- signal clicked ()
-
- ClickableText {
- id: menuLogo
- anchors.horizontalCenter: menuText.horizontalCenter
- anchors.bottom: parent.verticalCenter
- text: "≡"
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.fontSize
-
- onClicked: parent.clicked()
- onPressed: menuText.press()
- onReleased: menuText.release()
- onCanceled: menuText.release()
- }
-
- ClickableText {
- id: menuText
- anchors.top: parent.verticalCenter
- text: "MENU";
- defaultColor: Constants.primaryColor
- pressedColor: Constants.primaryColorPressed
- font.pixelSize: Constants.fontSize
-
- onClicked: parent.clicked()
- onPressed: menuLogo.press()
- onReleased: menuLogo.release()
- onCanceled: menuLogo.release()
- }
-
- onClicked: {
- contentLoader.go("./views/MainMenuView.qml")
- }
- }
-
- Row {
- id: clock
- height: childrenRect.height
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.rightMargin: Constants.margin
- anchors.topMargin: Constants.margin
- property date date: new Date()
-
- Timer {
- running: true
- repeat: true
- interval: 1000
- onTriggered: {
- clock.date = new Date();
- }
- }
-
- Text {
- text: Qt.formatTime(clock.date, "hh");
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
-
- Item {
- width: 10
- height: parent.height
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: clock.date.getSeconds() % 2 ? ":" : ""
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
- }
-
- Text {
- text: Qt.formatTime(clock.date, "mm");
- color: Constants.primaryColor
- font.pixelSize: Constants.fontSize;
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml b/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml
deleted file mode 100644
index 2aa7019428..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/Icon.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * @file Navigation.qml
- * @brief Icon.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-Item {
- property var source
-
- Image {
- anchors.fill: parent
- source: url(parent.source)
-
- function image(turnIcon) {
- if (turnIcon && turnIcon.imageType === Common.ImageType.STATIC) {
- return turnIcon.value;
- } else {
- return "";
- }
- }
-
- function url(turnIcon) {
- if (turnIcon && turnIcon.imageType === Common.ImageType.DYNAMIC) {
- return turnIcon.value;
- } else {
- return "";
- }
- }
- }
-
- function reset () {
- source = undefined
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml b/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml
deleted file mode 100644
index 6373237241..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/ListItem.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file Entry.qml
- * @brief Entry with icon and text for list.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: main
- color: Constants.transparentColor
-
- property alias text: label.text
- property alias fontSize: label.font.pixelSize
- property alias icon: image.source
-
- Icon {
- id: image
- width: Constants.iconItemListSize
- height: Constants.iconItemListSize
- anchors.left: parent.left
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenter: parent.verticalCenter
- visible: source ? true : false
- }
- Text {
- id: label
- anchors.verticalCenter: parent.verticalCenter
- height: image.height
- width: parent.width - image.width
- z: 50
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: Constants.fontSize
- text: "Name Entry"
- anchors.left: image.right
- anchors.leftMargin: Constants.generalSpacing
- anchors.verticalCenterOffset: 0
- visible: text !== ""
- color: Constants.primaryColor
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml
deleted file mode 100644
index a7f91dd397..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/MaskedButton.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @file MaskedButton.qml
- * @brief Masked button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import com.ford.sdl.hmi.hw_buttons 1.0
-
-MaskedContainer {
- property string name
-
- Image {
- id: icon
- source: "../res/controlButtons/" + name + "Button.png"
- }
-
- onPressed: {
- state = "pressed";
- }
-
- onReleased: {
- state = "";
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: icon
- source: "../res/controlButtons/" + name + "Button_pressed.png"
- }
- }
-
- ]
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml b/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml
deleted file mode 100644
index 32626d292d..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/MultiTouchArea.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-
-MultiPointTouchArea {
- property date created
-
- minimumTouchPoints: 1
- maximumTouchPoints: 10
-
- MouseArea {
- anchors.fill: parent
-
- function mouseTouchEvent() {
- var now = new Date()
- var touchEvents = [
- {
- id: 0,
- ts: [now.valueOf() - created.valueOf()],
- c: [{x: mouseX, y: mouseY}]
- }
- ]
- return touchEvents
- }
-
- onPressed: {
- sdlUI.onTouchEvent(Common.TouchType.BEGIN, mouseTouchEvent())
- }
- onReleased: {
- sdlUI.onTouchEvent(Common.TouchType.END, mouseTouchEvent())
- }
- onCanceled: {
- sdlUI.onTouchEvent(Common.TouchType.END, mouseTouchEvent())
- }
- onPositionChanged: {
- sdlUI.onTouchEvent(Common.TouchType.MOVE, mouseTouchEvent())
- }
- }
-
- function touchEvents() {
- var now = new Date()
- var touchEvents = []
- for (var i = 0; i < touchPoints.length; ++i) {
- touchEvents.push(
- {
-// pointId is guaranteed to be unique but is not guaranteed to fit in range
-// perhaps we will have to edit protocol xml
- id: touchPoints[i].pointId,
- ts: [now.valueOf() - created.valueOf()],
- c: [{x: touchPoints[i].x, y: touchPoints[i].y}]
- }
- )
- }
- return touchEvents
- }
-
- onPressed: {
- sdlUI.onTouchEvent(Common.TouchType.BEGIN, touchEvents())
- }
- onReleased: {
- sdlUI.onTouchEvent(Common.TouchType.END, touchEvents())
- }
- onCanceled: {
- sdlUI.onTouchEvent(Common.TouchType.END, touchEvents())
- }
- onUpdated: {
- sdlUI.onTouchEvent(Common.TouchType.MOVE, touchEvents())
- }
- Component.onCompleted: {
- created = new Date()
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml
deleted file mode 100644
index 6d68a9096b..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/OvalButton.qml
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * @file OvalButton.qml
- * @brief Oval button with flexible width.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-import "../models/Constants.js" as Constants
-
-// Don't change constants. It break button
-// TODO (dchmerev@luxoft.com): make this comment more clear
-// todo (ykazakov): eliminate this problem and remove all such comments
-
-Item {
- id: main
- width: dynamic ? field.width + 2 * left.width : Constants.ovalButtonWidth
- height: Constants.ovalButtonHeight
-
- signal clicked;
- signal pressed;
- signal released;
- signal pressAndHold;
- property alias text: label.text
- property alias fontSize: label.font.pixelSize
- property alias icon: image.source
- property bool highlighted: false
- property bool dynamic: false
- property bool disabled: false
-
- function hue() {
- var ret = 0;
- if (disabled) {
- ret = Constants.disabledButtonHue;
- } else if (highlighted) {
- ret = Constants.highlightedButtonHue;
- }
- return ret;
- }
-
- function saturation() {
- var ret = 0;
- if (disabled) {
- ret = Constants.disabledButtonSaturation;
- } else if (highlighted) {
- ret = Constants.highlightedButtonSaturation;
- }
- return ret;
- }
-
- function lightness() {
- var ret = 0;
- if (disabled) {
- ret = Constants.disabledButtonLightness;
- } else if (highlighted) {
- ret = Constants.highlightedButtonLightness;
- }
- return ret;
- }
-
- Item {
- id: buttonBorderImage
- visible: false
- anchors.fill: parent
- Image {
- id: left
- width: 31
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.top: parent.top
- source: "../res/buttons/oval_btn_left.png"
- }
-
- Image {
- id: right
- width: 31
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- source: "../res/buttons/oval_btn_right.png"
- }
-
- Image {
- id: top
- height: 10
- anchors.right: parent.right
- anchors.rightMargin: 31
- anchors.left: parent.left
- anchors.leftMargin: 31
- anchors.top: parent.top
- fillMode: Image.TileHorizontally
- source: "../res/buttons/oval_btn_top.png"
- }
-
- Image {
- id: bottom
- height: 11
- anchors.right: parent.right
- anchors.rightMargin: 31
- anchors.left: parent.left
- anchors.leftMargin: 31
- anchors.bottom: parent.bottom
- fillMode: Image.TileHorizontally
- source: "../res/buttons/oval_btn_bottom.png"
- }
- }
-
- HueSaturation {
- anchors.fill: buttonBorderImage
- source: buttonBorderImage
- hue: main.hue()
- saturation: main.saturation()
- lightness: main.lightness()
- }
-
- Rectangle {
- id: background
- color: Constants.transparentColor
- anchors.fill: parent
- anchors.rightMargin: 31
- anchors.leftMargin: 31
- anchors.bottomMargin: 10
- anchors.topMargin: 10
- visible: false
- }
-
- HueSaturation {
- anchors.fill: background
- source: background
- hue: main.hue()
- saturation: main.saturation()
- lightness: main.lightness()
- }
-
- MouseArea {
- id: mousearea
- anchors.rightMargin: 15
- anchors.leftMargin: 15
- anchors.bottomMargin: 11
- anchors.topMargin: 10
- anchors.fill: parent
- enabled: !parent.disabled
- onPressed: {
- parent.state = "pressed";
- parent.pressed();
- }
- onReleased: {
- parent.state = "";
- parent.released();
- }
- onClicked: {
- parent.clicked();
- }
- onPressAndHold: {
- parent.pressAndHold();
- }
- onCanceled: {
- parent.state = "";
- }
- }
-
- Item {
- id: field
- anchors.fill: background
-
- Icon {
- id: image
- width: Constants.iconButtonSize
- height: Constants.iconButtonSize
- anchors.verticalCenter: parent.verticalCenter
- visible: source ? true : false
- }
- Text {
- id: label
- width: image.visible ? parent.width - image.width : parent.width
- color: Constants.primaryColor
- anchors.centerIn: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: Constants.ovalButtonFontSize
- visible: false
- elide: Text.ElideRight
- }
- HueSaturation {
- anchors.fill: label
- source: label
- hue: main.hue()
- saturation: main.saturation()
- lightness: main.lightness()
- visible: label.text !== ""
- }
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: left
- source: "../res/buttons/oval_btn_pressed_left.png"
- }
-
- PropertyChanges {
- target: right
- source: "../res/buttons/oval_btn_pressed_right.png"
- }
-
- PropertyChanges {
- target: background
- color: Constants.primaryColor
- }
-
- PropertyChanges {
- target: label
- color: Constants.secondaryColor
- }
- }
- ]
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml b/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml
deleted file mode 100644
index 5b150d560d..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/PagedFlickable.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * @file PagedFlickable.qml
- * @brief Animated row.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-
-Item
-{
- id: flickablePage
- height: container.height + pager.height
- default property alias content: containerRow.children
- property alias spacing: containerRow.spacing
- property int elementWidth
- property int snapTo
- property int count: 0
-
- Flickable {
- id: container
- anchors.bottom: parent.bottom
- maximumFlickVelocity: 1500
- contentWidth: containerRow.width
- height: containerRow.height
- width: parent.width
- interactive: contentWidth > width
-
- onMovementEnded: {
- var rest = contentX % snapTo
- var t = 0.25
- if (rest > parent.snapTo / 2) {
- rest = rest - parent.snapTo
- }
- var vel = 2 * rest / t
- flickDeceleration = Math.abs(vel) / t
- flick(vel, 0)
- flickDeceleration = 1500
- }
- Row {
- id: containerRow
- anchors.verticalCenter: parent.verticalCenter
- }
- }
-
- Pager {
- id: pager
- space: 7
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.top
-
- pages: {
- if ( (container.contentWidth % container.width) >= (flickablePage.elementWidth / 2 + flickablePage.spacing)) {
- return Math.ceil(container.contentWidth / container.width)
- }
- else {
- return Math.floor(container.contentWidth / container.width)
- }
- }
-
- activePage: {
- if (container.contentX <= 0) {
- return 0
- }
- else if ( (container.contentWidth - container.contentX) < container.width) {
- return pages -1
- }
- else {
- if ( (container.contentX % container.width) >= (flickablePage.elementWidth / 2 + flickablePage.spacing)) {
- return Math.ceil(container.contentX / container.width)
- }
- else if ( (container.contentX % container.width) > 0) {
- return Math.floor(container.contentX / container.width)
- }
- }
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml b/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml
deleted file mode 100644
index 53d99436ce..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/Pager.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @file Pager.qml
- * @brief Bubbles that indicate about page switch.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-
-Row {
- id: pager
- property int pages
- property int activePage: 0
- property int space
- property int itemsInRowOnScreen: 3
-
- spacing: space
- visible: pages !== 1
-
- Repeater {
- model: pages
- Image {
- source: index === activePage ? "../res/white_ball.png" : "../res/blue_ball.png"
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml
deleted file mode 100644
index bb1cb38388..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/PlayPauseButton.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file PlayPauseButton.qml
- * @brief Behavior of Play/Pause button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-
-Image {
- id: playPauseButton
- property string sourceOnPressed: ""
- property string sourceOnReleased: ""
-
- signal clicked
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- playPauseButton.source = playPauseButton.sourceOnPressed
- }
- onReleased: {
- playPauseButton.source = playPauseButton.sourceOnReleased
- }
- onClicked: {
- playPauseButton.clicked()
- }
- }
- states: [
- State {
- name: "Play"
- PropertyChanges {
- target: playPauseButton
- source: "../res/buttons/player_play_btn.png"
- sourceOnPressed: "../res/buttons/player_play_pressed_btn.png"
- sourceOnReleased: "../res/buttons/player_pause_btn.png"
- }
- },
-
- State {
- name: "Pause"
- PropertyChanges {
- target: playPauseButton
- source: "../res/buttons/player_pause_btn.png"
- sourceOnPressed: "../res/buttons/player_pause_pressed_btn.png"
- sourceOnReleased: "../res/buttons/player_play_btn.png"
- }
- }
- ]
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml
deleted file mode 100644
index 95a751c39b..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/PowerSwitchButton.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file PowerSwitchBtn.qml
- * @brief On/Off button.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Rectangle {
- id: powerSwitchBtn
- state: "Turn ON"
- width: 120
- height: 80
- radius: 5
- property bool pressed;
-
- gradient: Gradient {
- GradientStop { position: pressed ? 1.0 : 0.0; color: "#2c2c2c" }
- GradientStop { position: pressed ? 0.0 : 1.0; color: "black" }
- }
-
- MouseArea {
- anchors.fill: parent
- onPressed: {
- parent.pressed = true
- }
- onReleased: {
- parent.pressed = false
- parent.state = parent.state === "Turn ON" ? "Turn OFF" : "Turn ON"
- btnText.text = parent.state
- if (parent.state === "Turn OFF") {
- contentLoader.reset()
- mainScreen.visible = true
- warningInfo.showOkButton()
- }
- }
- }
-
- Text {
- id: btnText
- color: "red"
- text: parent.state
- anchors.centerIn: parent
- font.pixelSize: Constants.powerButtonFornSize
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml b/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml
deleted file mode 100644
index 32e74d71bb..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/PresetRow.qml
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * @file PresetRow.qml
- * @brief Animated row with radio stations.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Item {
- id: presetRow
- height: childrenRect.height
- property variant presets: []
- property int selectedIndex: 0
- signal presetSelected
- signal presetButtonPressed()
- signal presetButtonReleased()
- signal presetButtonClicked()
- signal presetButtonHold()
-
- Image {
- id: circleButton
- source: "../res/buttons/preset_pressed_btn.png"
- visible: false
- enabled: false
- }
-
- PagedFlickable {
- width: parent.width
- spacing: (width - (circleButton.width * 4)) / 3
- snapTo: spacing + circleButton.width
- elementWidth: circleButton.width
-
- Repeater {
- model: presetRow.presets.length
- delegate:
- Column {
- width: circleButton.width
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- source: presetRow.selectedIndex === index ? "../res/buttons/preset_pressed_btn.png" : "../res/buttons/preset_btn.png"
- MouseArea {
- anchors.fill: parent
- onPressed: {
- presetRow.selectedIndex = index;
- presetButtonPressed()
- }
- onReleased: {
- presetRow.selectedIndex = index;
- presetButtonReleased()
- }
- onClicked: {
- presetRow.selectedIndex = index
- presetButtonClicked()
- }
- onPressAndHold: {
- presetRow.selectedIndex = index;
- presetButtonHold()
- }
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- text: index + 1
- font.pixelSize: Constants.fontSize
- color: presetRow.selectedIndex === index ? Constants.secondaryColor : Constants.primaryColor
- }
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- text: presetRow.presets[index]
- font.pixelSize: Constants.fontSize
- color: "white"
- }
- }
- }
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml
deleted file mode 100644
index f83370a207..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/PushButton.qml
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * @file PushButton.qml
- * @brief Simple button
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-
-Rectangle {
- id: toggleButton
- width: 160
- height: 40
- radius: 2
- border.width: 2
- border.color: "#000000"
- gradient: grUnpressed
-
- property alias label : label.text
-
- signal pressed()
- signal unpressed()
- signal clicked()
-
- property bool toggleMode: false
-
- state: "unpressed"
- onStateChanged: {
- if (state == "pressed") {
- pressed();
- } else {
- unpressed();
- }
- }
-
- Text {
- id: label
- color: "white"
- text: "PushButton"
- font.pixelSize: 18
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.fill: parent
- }
- MouseArea {
- id: mouseArea
-
- anchors.fill: parent
- onPressed: {
- if (toggleMode) {
- if (parent.state == "unpressed") {
- parent.state = "pressed"
- } else {
- parent.state = "unpressed"
- }
- } else {
- parent.state = "pressed"
- }
- }
- onReleased: {
- if (!toggleMode) {
- parent.state = "unpressed"
- if (mouse.isClick) {
- parent.clicked()
- }
- }
- }
- }
-
- states: [
- State {
- name: "pressed"
- PropertyChanges {
- target: toggleButton
- gradient: grPressed
- }
- },
- State {
- name: "unpressed"
- PropertyChanges {
- target: toggleButton
- gradient: grUnpressed
- }
- }
- ]
-
- Gradient {
- id: grUnpressed
-
- GradientStop { position: 0.0; color: "#2c2c2c" }
- GradientStop { position: 1.0; color: "#0c0c0c" }
- }
-
- Gradient {
- id: grPressed
-
- GradientStop { position: 0.0; color: "black" }
- GradientStop { position: 1.0; color: "black" }
- }
-
- transitions: [
- Transition {
- from: "unpressed"
- to: "pressed"
- reversible: true
- }
- ]
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml b/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml
deleted file mode 100644
index a63960d16d..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/ScrollableListView.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @file ScrollableListView.qml
- * @brief ListView with scrollbar on the right
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-ListView {
- clip: true
-
- Rectangle {
- visible: parent.height < parent.contentHeight
- anchors.right: parent.right
- y: parent.visibleArea.yPosition * parent.height
- width: Constants.scrollBarWidth
- height: parent.visibleArea.heightRatio * parent.height
- color: Constants.primaryColor
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js b/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js
deleted file mode 100644
index 227f638366..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file SoftButton.js
- * @brief Soft button view constants
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-.pragma library
-
-var Action = {
- doOnClicked: 0,
- doOnReleased: 1
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml b/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
deleted file mode 100644
index b1b7f71799..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/SoftButton.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file SoftButton.qml
- * @brief Soft button view
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-import QtQuick 2.0
-import "../hmi_api/Common.js" as Common
-import "SoftButton.js" as SoftButton
-
-OvalButton {
- property var button
- property int appId
- visible: !!button
-
- signal defaultAction;
- signal stealFocus;
- signal keepContext;
-
- property int actionOrder: SoftButton.Action.doOnClicked
-
- highlighted: button ? button.isHighlighted : false
- onPressed: {
- actionOrder = SoftButton.Action.doOnClicked
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONDOWN, button.softButtonID, appId)
- }
-
- onReleased: {
- if (actionOrder === SoftButton.Action.doOnReleased) {
- switch (button.systemAction) {
- case Common.SystemAction.DEFAULT_ACTION:
- defaultAction();
- break;
- case Common.SystemAction.STEAL_FOCUS:
- stealFocus();
- break;
- case Common.SystemAction.KEEP_CONTEXT:
- keepContext();
- break;
- }
- }
-
- sdlButtons.onButtonEvent(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonEventMode.BUTTONUP, button.softButtonID, appId)
- }
-
- onClicked: {
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.SHORT, button.softButtonID, appId);
- switch (button.systemAction) {
- case Common.SystemAction.DEFAULT_ACTION:
- defaultAction();
- break;
- case Common.SystemAction.STEAL_FOCUS:
- stealFocus();
- break;
- case Common.SystemAction.KEEP_CONTEXT:
- keepContext();
- break;
- }
- }
-
- onPressAndHold: {
- actionOrder = SoftButton.Action.doOnReleased; // action should be triggered on release
- sdlButtons.onButtonPress(Common.ButtonName.CUSTOM_BUTTON, Common.ButtonPressMode.LONG, button.softButtonID, appId);
- }
-
- onButtonChanged: {
- icon = button && button.type !== Common.SoftButtonType.SBT_TEXT ? button.image : undefined;
- text = button && button.type !== Common.SoftButtonType.SBT_IMAGE ? button.text : ""
- }
-}
diff --git a/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml b/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml
deleted file mode 100644
index c06ebc45e4..0000000000
--- a/src/components/qt_hmi/qml_model_qt5/controls/StatusBar.qml
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * @file StatusBar.qml
- * @brief Status bar that contains text string.
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * 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 Ford Motor Company 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 HOLDER 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.
- */
-
-import QtQuick 2.0
-import "../models/Constants.js" as Constants
-
-Text {
- text: dataContainer.currentApplication.hmiUIText.statusBar
- color: Constants.primaryColor
- font.pixelSize: Constants.statusBarFontSize
-}