diff options
Diffstat (limited to 'src/components/qt_hmi/qml_model_qt4/popups')
12 files changed, 0 insertions, 1427 deletions
diff --git a/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml b/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml deleted file mode 100644 index 70e7ba29ef..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/AlertWindow.qml +++ /dev/null @@ -1,285 +0,0 @@ -/** - * @file AlertWindow.qml - * @brief Alert popup window - * 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 1.1 -import "../controls" -import "../hmi_api/Common.js" as Common -import "../models/Constants.js" as Constants - -Rectangle { - id: alertWindow - property date lastAlertTime - property variant softButtons - property int appId - property string popUpName // TODO{ALESHIN}: No requerments for closePopUp, if alert couldn't be closed by closePopUp request - delete everywhere - - color: "transparent" - - property variant async - - Rectangle { - id: rectangle - - anchors.centerIn: parent - color: "black" - border.color: "white" - - width: alertContent.width + 60 - height: alertContent.height + 60 - - property alias alertString: alert.text - property alias appNameString: appName.text - property int duration - - Column { - id: alertContent - anchors.centerIn: parent - spacing: 20 - - Text { - id: appName - anchors.horizontalCenter: parent.horizontalCenter - color: "white" - font.pointSize: 16 - } - - Row { - width: Constants.alertWidth - spacing: 20 - - Image { - id: alertLogo - source: "../res/warning.png" - } - - Text { - id: alert - width: parent.width - alertLogo.width - parent.spacing - clip: true - color: "white" - font.pointSize: 16 - } - } - - Rectangle { - id: progressIndicator - color: "white" - height: 10 - } - - Column { - Item { - width: Constants.alertWidth - height: alertButton1.visible ? alertButton1.height : 0 - - SoftButton { - id: alertButton1 - appId: alertWindow.appId - button: softButtons && softButtons.length > 0 ? softButtons[0] : undefined - anchors.left: parent.left - anchors.right: alertButton2.visible ? alertButton2.left : parent.right - width: Constants.alertWidth / 2 - onPressed: { alertWindow.keep = true; } - onReleased: { alertWindow.keep = false; } - onKeepContext: { - alertWindow.restart(); - sdlUI.onResetTimeout(appId, "UI.Alert") - } - onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); } - onStealFocus: { - contentLoader.go("views/SDLPlayerView.qml", appId); - alertWindow.complete(Common.Result.SUCCESS); - } - } - SoftButton { - id: alertButton2 - appId: alertWindow.appId - button: softButtons && softButtons.length > 1 ? softButtons[1] : undefined - anchors.right: parent.right - width: Constants.alertWidth / 2 - onPressed: { alertWindow.keep = true; } - onReleased: { alertWindow.keep = false; } - onKeepContext: { - alertWindow.restart(); - sdlUI.onResetTimeout(appId, "UI.Alert") - } - onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); } - onStealFocus: { - contentLoader.go("views/SDLPlayerView.qml", appId); - alertWindow.complete(Common.Result.SUCCESS); - } - } - } - Item { - width: Constants.alertWidth - height: alertButton3.visible ? childrenRect.height : 0 - SoftButton { - id: alertButton3 - appId: alertWindow.appId - button: softButtons && softButtons.length > 2 ? softButtons[2] : undefined - anchors.left: parent.left - anchors.right: alertButton4.visible ? alertButton4.left : parent.right - width: Constants.alertWidth / 2 - onPressed: { alertWindow.keep = true; } - onReleased: { alertWindow.keep = false; } - onKeepContext: { - alertWindow.restart(); - sdlUI.onResetTimeout(appId, "UI.Alert") - } - onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); } - onStealFocus: { - contentLoader.go("views/SDLPlayerView.qml", appId); - alertWindow.complete(Common.Result.SUCCESS); - } - } - SoftButton { - id: alertButton4 - appId: alertWindow.appId - button: softButtons && softButtons.length > 3 ? softButtons[3] : undefined - anchors.right: parent.right - width: Constants.alertWidth / 2 - onPressed: { alertWindow.keep = true; } - onReleased: { alertWindow.keep = false; } - onKeepContext: { - alertWindow.restart(); - sdlUI.onResetTimeout(appId, "UI.Alert") - } - onDefaultAction: { alertWindow.complete(Common.Result.SUCCESS); } - onStealFocus: { - contentLoader.go("views/SDLPlayerView.qml", appId); - alertWindow.complete(Common.Result.SUCCESS); - } - } - } - } - } - - SequentialAnimation { - id: animation - PropertyAction { target: progressIndicator; property: "width"; value: alertContent.width } - PropertyAnimation { - id: shrinkProgressAnimation - target: progressIndicator - property: "width" - to: 0 - duration: rectangle.duration - } - } - } - - Timer { - id: timer - onTriggered: { - complete(Common.Result.SUCCESS) - } - } - - function alert (alertStrings, duration, showIndicator, sButtons, applicationId) { - if (timer.running) { // we have alert already - var currentTime = new Date() - var timeFromLastAlert = currentTime - lastAlertTime - var timeLeft = timer.interval - timeFromLastAlert - var discreteInMilliseconds = 1000 // wish to round left time to integer seconds - var timeLeftRounded = discreteInMilliseconds * Math.ceil(timeLeft / discreteInMilliseconds) - return timeLeftRounded - } - else { - lastAlertTime = new Date(); - appId = applicationId - rectangle.appNameString = dataContainer.getApplication(appId).appName; - softButtons = sButtons; - rectangle.alertString = alertStrings.join('\n'); - timer.interval = duration; - rectangle.duration = duration; - timer.start(); - show(); - - progressIndicator.visible = !!showIndicator - progressIndicator.width = alertContent.width - console.log("ProgressIndicator.width:", progressIndicator.width) - animation.start() - } - } - - function show () { - dataContainer.activeAlert = true - dataContainer.applicationSavedContext = dataContainer.applicationContext - visible = true - } - - function complete (reason, data) { - if (!keep) { - hide() - switch (reason) { - case Common.Result.SUCCESS: - DBus.sendReply(async, { __retCode: Common.Result.SUCCESS, __message: "UI.Alert" }) - break - // For other cases - } - } - timer.stop() - } - - function hide() { - console.debug(popUpName, "HIDE") - dataContainer.activeAlert = false - dataContainer.applicationContext = dataContainer.applicationSavedContext - visible = false - } - - function restart() { - animation.restart(); - timer.restart(); - } - - property bool keep: false - - onKeepChanged: { - if (visible && !keep && !timer.running) { - hide() - } - } - - onVisibleChanged: { - if (visible) { - dataContainer.activePopup.push(popUpName) - } else { - for (var i in dataContainer.activePopup) { - if (dataContainer.activePopup[i] === popUpName) { - dataContainer.activePopup.splice(i, 1) - } - } - } - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml b/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml deleted file mode 100644 index a1ef64144d..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/ContextPopup.qml +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file ContextPopup.qml - * @brief Popup view with system context. - * 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 1.1 - -PopUp { - function show() { - console.debug("enter") - if (!visible) { // must not increment counter if show() called for visible popup - visible = true; - dataContainer.popups++ - } - console.debug("exit") - } - - function hide() { - console.debug("enter") - console.debug(popUpName, "HIDE") - if (visible) { // must not decrement counter if hide() called for invisible popup - visible = false; - dataContainer.popups-- - } - console.debug("exit") - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml b/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml deleted file mode 100644 index 17e5de50b7..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/ExitAllApplicationsPopup.qml +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file ExitAllApplicationsPopup.qml - * @brief Popup "Exit all applications" - * 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 1.1 -import "../models/Constants.js" as Constants -import "../hmi_api/Common.js" as Common -import "../controls" - -PopUp { - function complete(reason){ - hide() - } - - Item { - ListModel { - id: reasonExit - - Component.onCompleted: { - for (var name in Common.ApplicationsCloseReason) { - append({name: name}); - } - } - } - } - - Column - { - anchors.centerIn: parent - Row { - Text { - text: "Select reason: " - color: "white" - } - - ComboBox { - id: reasonComboBox - model: reasonExit - } - z: 1000 - } - OvalButton { - text: "Exit" - anchors.horizontalCenter: parent.horizontalCenter - onClicked: { - sdlBasicCommunication.onExitAllApplications(Common.ApplicationsCloseReason[reasonComboBox.currentText]) - hide() - } - } - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml b/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml deleted file mode 100644 index 7a5c53501e..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/InteractionPopup.qml +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @file InteractionPopup.qml - * @brief Interaction popup 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 1.1 -import "../controls" -import "../hmi_api/Common.js" as Common -import "../models/Constants.js" as Constants - -ContextPopup { - Text { - id: initialText - text: dataContainer.interactionModel.initialText - anchors.top: parent.top - anchors.topMargin: Constants.popupMargin - anchors.left: parent.left - anchors.leftMargin: Constants.popupMargin - font.pixelSize: Constants.fontSize - color: Constants.primaryColor - } - - ListView { - anchors.top: initialText.bottom - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.popupMargin - model: dataContainer.interactionModel.choice - delegate: OvalButton { - width: parent.width - text: name - icon: image - onClicked: { - complete(Common.Result.SUCCESS, {"choiceID": id}) - } - } - } - - Item { - Timer { - id: timer - onTriggered: { - complete(Common.Result.TIMED_OUT) - } - } - } - - function activate () { - console.debug("enter") - timer.interval = dataContainer.interactionModel.timeout - timer.start() - show() - console.debug("exit") - } - - function complete (reason, data) { - console.debug("enter") - switch (reason) { - case Common.Result.SUCCESS: - DBus.sendReply(dataContainer.interactionModel.async, data) - break - case Common.Result.ABORTED: - DBus.sendReply(dataContainer.interactionModel.async, { __retCode: Common.Result.ABORTED }) - break - case Common.Result.TIMED_OUT: - DBus.sendReply(dataContainer.interactionModel.async, { __retCode: Common.Result.TIMED_OUT }) - break - } - timer.stop() - hide() - console.debug("exit") - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml b/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml deleted file mode 100644 index e65519d363..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/PerformAudioPassThruPopup.qml +++ /dev/null @@ -1,149 +0,0 @@ -/** - * @file PerformAudioPassThruPopup.qml - * @brief Popup for audio pass thru - * 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 1.1 -import "../models/Constants.js" as Constants -import "../hmi_api/Common.js" as Common -import "../controls" - -ContextPopup { - property variant async - - function showAudioPassThru(){ - console.debug("entered") - dataContainer.uiAudioPassThru.running = true - show() - if (dataContainer.uiAudioPassThru.timeout) { - timer.start() - } - console.debug("exited") - } - - function complete(reason){ - console.debug("enter", reason) - timer.stop() - dataContainer.uiAudioPassThru.timeout = 0 - dataContainer.uiAudioPassThru.running = false - switch (reason) { - case Common.Result.ABORTED: - console.debug("exit with abort") - DBus.sendError(async, Common.Result.ABORTED) - break; - case Common.Result.SUCCESS: - console.debug("exit with success") - DBus.sendReply(async, {}) - break; - case Common.Result.RETRY: - console.debug("exit with retry") - DBus.sendError(async, Common.Result.RETRY) - break; - } - hide() - } - - - Column { - spacing: Constants.generalSpacing - anchors.centerIn: parent - Timer { - id: timer - interval: dataContainer.uiAudioPassThru.timeout - onTriggered: { - complete(Common.Result.SUCCESS) - } - } - - Text { - id: appNameText - anchors.horizontalCenter: parent.horizontalCenter - text: dataContainer.uiAudioPassThru.appName - color: Constants.primaryColor - font.pixelSize: Constants.fontSize * 2 - } - - Row { - spacing: Constants.generalSpacing - Image { - source: "../res/controlButtons/vrImage.png" - } - - Column { - Text { - anchors.horizontalCenter: parent.horizontalCenter - text: dataContainer.uiAudioPassThru.firstLine - color: Constants.audioPassThruTextColor - font.pixelSize: Constants.fontSize - } - Text { - anchors.horizontalCenter: parent.horizontalCenter - text: dataContainer.uiAudioPassThru.secondLine - color: Constants.audioPassThruTextColor - font.pixelSize: Constants.fontSize - } - } - } - - - Row { - anchors.horizontalCenter: parent.horizontalCenter - spacing: Constants.generalSpacing - - OvalButton { - text: "Retry" - fontSize: Constants.fontSize - onClicked: { - complete(Common.Result.RETRY) - } - } - - OvalButton { - text: "Done" - fontSize: Constants.fontSize - onClicked: { - complete(Common.Result.SUCCESS) - } - } - } - - OvalButton { - text: "Close" - anchors.horizontalCenter: parent.horizontalCenter - onClicked: { - console.debug("enter") - complete(Common.Result.ABORTED) - console.debug("exit") - } - } - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml b/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml deleted file mode 100644 index 07f8c98011..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/PopUp.qml +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @file PopUp.qml - * @brief General popup 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 1.1 -import "../models/Constants.js" as Constants - -Item { - default property alias content: content.children - property int padding: Constants.popUpPadding - property string popUpName - - visible: false - - width: Constants.popupWidth - height: Constants.popupHeigth - - MouseArea { anchors.fill: parent } - - Rectangle { - width: parent.width - padding / 2 - height: parent.height - padding / 2 - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: Constants.secondaryColor - border.width: 1 - border.color: Constants.popUpBorderColor - radius: padding - Rectangle { - id: content - width: parent.width - padding - height: parent.height - padding - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - color: Constants.transparentColor - } - } - - onVisibleChanged: { - if (popUpName) { - if (visible) { - dataContainer.activePopup.push(popUpName) - } else { - for (var i in dataContainer.activePopup) { - if (dataContainer.activePopup[i] === popUpName) { - dataContainer.activePopup.splice(i, 1) - } - } - } - } - } - - function show() { - console.debug("enter"); - visible = true; - console.debug("exit"); - } - - function hide() { - console.debug("enter"); - visible = false; - console.debug("exit"); - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml b/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml deleted file mode 100644 index 6dcd222ed3..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/SliderPopup.qml +++ /dev/null @@ -1,214 +0,0 @@ -/** - * @file ExitAllApplicationsPopup.qml - * @brief Popup "Exit all applications" - * 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 1.1 -import "../models/Constants.js" as Constants -import "../hmi_api/Common.js" as Common -import "../controls" - -ContextPopup { - property variant async - property int position: 1 - /** - * Test Support Section - */ - property int resultCode: -1 - signal onReady - /** - * Test Support Section End - */ - - function showSlider(){ - console.debug("enter") - - dataContainer.uiSlider.running = true - dataContainer.applicationSavedContext = dataContainer.applicationContext - if(dataContainer.uiSlider.footer.length === 0 || dataContainer.uiSlider.position === 0 ) { - footerText.text = "" - } else { - footerText.text = dataContainer.uiSlider.footer.length === 1 ? dataContainer.uiSlider.footer[0] : dataContainer.uiSlider.footer[dataContainer.uiSlider.position - 1] - } - position = dataContainer.uiSlider.position - show() - timer.start() - onReady() - console.debug("exit") - } - - function complete(reason){ - console.debug("enter reason = ", reason) - timer.stop() - dataContainer.applicationContext = dataContainer.applicationSavedContext - dataContainer.uiSlider.running = false - switch(reason) { - case Common.Result.ABORTED: - console.debug("aborted position is", position) - resultCode = Common.Result.ABORTED - DBus.sendReply(async, {__retCode: resultCode, sliderPosition: position}) - break - case Common.Result.SUCCESS: - console.debug("send position", position) - resultCode = Common.Result.SUCCESS - dataContainer.uiSlider.position = position - DBus.sendReply(async, {sliderPosition:position}) - break - default: - break - } - hide() - position = 1 - console.debug("exit") - } - - - Column - { - spacing: Constants.generalSpacing - anchors.centerIn: parent - Timer { - id: timer - interval: dataContainer.uiSlider.timeout - onTriggered: { - console.debug("triggered") - complete(Common.Result.SUCCESS) - } - } - - Text { - id: appNameText - anchors.horizontalCenter: parent.horizontalCenter - text: dataContainer.uiSlider.appName - color: Constants.primaryColor - font.pixelSize: Constants.fontSize * 2 - } - - Text { - id: headerText - width: borderRectangle.width - elide: Text.ElideRight - anchors.horizontalCenter: parent.horizontalCenter - text: dataContainer.uiSlider.header - color: Constants.sliderTextColor - font.pixelSize: Constants.fontSize * 2 - } - - Rectangle { - id: borderRectangle - width: Constants.sliderBarWidth - height: Constants.sliderBarHeight - anchors.horizontalCenter: parent.horizontalCenter - border.color: Constants.sliderBarBorderColor - border.width: Constants.sliderBarBorderWidth - radius: Constants.sliderBarRadius - color: "black" - - Rectangle { - id: rectangle - color: Constants.sliderBarFillColor - height: parent.height - border.color: parent.border.color - border.width: parent.border.width - radius: parent.radius - - onVisibleChanged: { - var tickWidth = borderRectangle.width / dataContainer.uiSlider.numTicks - rectangle.width = dataContainer.uiSlider.position * tickWidth - } - } - - MouseArea{ - id: mouseArea - anchors.fill: parent - onClicked: { - onPositionChanged(mouse) - } - - onPositionChanged: { - if(mouseX <= 0){ - rectangle.width = borderRectangle.width / dataContainer.uiSlider.numTicks - position = 1 - } - - if(mouseX > borderRectangle.width) { - rectangle.width = borderRectangle.width - position = dataContainer.uiSlider.numTicks - } - - if(mouseX > 0 && mouseX < borderRectangle.width) { - var tickWidth = borderRectangle.width / dataContainer.uiSlider.numTicks - position = Math.ceil(mouseX / tickWidth) - rectangle.width = position * tickWidth - } - - if(dataContainer.uiSlider.footer.length > 1){ - footerText.text = dataContainer.uiSlider.footer[position - 1] - } - } - } - } - - Text { - id:footerText - width: borderRectangle.width - elide: Text.ElideRight - anchors.horizontalCenter: parent.horizontalCenter - text: "" - color: Constants.sliderTextColor - font.pixelSize: Constants.fontSize * 2 - } - - OvalButton { - text: "Close" - anchors.horizontalCenter: parent.horizontalCenter - onClicked: { - console.debug("enter") - complete(Common.Result.ABORTED) - console.debug("exit") - } - } - } - - function getTimer() { - return timer - } - function getBackButton() { - return backButton - } - function getFooterText() { - return footerText - } - function getBorderRectangle() { - return borderRectangle - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml b/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml deleted file mode 100644 index 9a833b19e7..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/TBTClientStatePopUp.qml +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @file TBTClientStatePopUp.qml - * @brief Popup view for TBT interface (list of states). - * 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 1.1 -import "../hmi_api/Common.js" as Common -import "../models/Constants.js" as Constants -import "../controls" - -PopUp { - Item { - ListModel { - id: tbtState - - Component.onCompleted: { - for (var name in Common.TBTState) { - append({name: name}); - } - } - } - } - Text { - text: "TBT Client State" - verticalAlignment: Text.AlignVCenter - anchors.right: parent.right - anchors.left: parent.left - anchors.top: parent.top - color: Constants.primaryColor - } - ComboBox { - id: comboBox - anchors.left: parent.left - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - model: tbtState - onCurrentTextChanged: { - console.log("Send signal onTBTClientState:", currentText); - sdlNavigation.onTBTClientState(Common.TBTState[currentText]); - } - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml b/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml deleted file mode 100644 index ce64a6be89..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/TTSPopUp.qml +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @file TTSPopUp.qml - * @brief Popup view for TTS - * 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 1.1 -import "../hmi_api/Common.js" as Common -import "../models/Constants.js" as Constants -import "../controls" - -PopUp { - height: Constants.ttsPopUpHeight - width: Constants.ttsPopUpWidth - padding: Constants.ttsPopUpPadding - property variant async - - ScrollableText { - id: text - anchors.fill: parent - } - - resources: [ - Timer { - id: timer - interval: Constants.ttsSpeakTime - onTriggered: deactivate() - } - ] - - function activate(message) { - console.debug("Activate TTS popup:", message); - dataContainer.activeTTS = true; - text.text = message; - show(); - timer.restart(); - console.debug("Exit"); - } - - function deactivate() { - console.debug("Deactivate TTS popup"); - dataContainer.activeTTS = false; - text.text = ''; - timer.stop(); - hide(); - DBus.sendReply(async, {}); - async = null; - console.debug("Exit"); - } -} - diff --git a/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml b/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml deleted file mode 100644 index 8718c8cd69..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/VRHelpPopup.qml +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @file VRHelpPopup.qml - * @brief Popup view for VR help - * 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 1.1 -import "../controls" -import "../models/Constants.js" as Constants -import "../hmi_api/Common.js" as Common - -PopUp { - Text { - id: title - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.popupMargin - text: "VR HELP" // default title - font.pixelSize: Constants.titleFontSize - color: Constants.primaryColor - } - - ScrollableListView { - anchors.top: title.bottom - anchors.bottom: closeButton.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Constants.popupMargin - - model: dataContainer.vrHelp - - delegate: Row { - spacing: Constants.iconItemListSpacing - Icon { - source: model.icon - width: Constants.iconItemListSize - height: Constants.iconItemListSize - } - - Text { - text: model.text - color: Constants.primaryColor - font.pixelSize: Constants.fontSize - } - } - } - - OvalButton { - id: closeButton - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Constants.popupMargin - width: Constants.ovalButtonWidth - text: "Close" - onClicked: complete() - } - - property alias title: title.text - - function complete(reason, data) { - hide() - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml b/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml deleted file mode 100644 index 8a8be54be7..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/VRPopUp.qml +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @file VRPopUp.qml - * @brief Popup view for VR interface (list commands). - * 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 1.1 -import "../models/Constants.js" as Constants -import "../hmi_api/Common.js" as Common -import "../views" -import "../controls" - -PopUp { - Text { - id: title - anchors.left: parent.left - anchors.top: parent.top - height: voice.height - width: parent.width - voice.width - text: "Speak the command" - verticalAlignment: Text.AlignVCenter - font.pixelSize: Constants.fontSize - color: Constants.primaryColor - } - - Image { - id: voice - anchors.top: parent.top - anchors.right: parent.right - source: "../res/controlButtons/vrImage.png" - } - - ScrollableListView { - anchors.bottomMargin: Constants.popupMargin - anchors.rightMargin: Constants.popupMargin - anchors.leftMargin: Constants.popupMargin - anchors.top: voice.bottom - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.left: parent.left - - model: dataContainer.vrCommands - - delegate: OvalButton { - width: parent.width - text: command - onClicked: { - sdlVR.onCommand(cmdID, appID === 0 ? undefined : appID); - } - } - } - - function activate() { - dataContainer.activeVR = true; - sdlVR.started(); - show(); - } - - function complete(reason) { - dataContainer.activeVR = false; - sdlVR.stopped(); - hide(); - } -} diff --git a/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml b/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml deleted file mode 100644 index f4582c28ca..0000000000 --- a/src/components/qt_hmi/qml_model_qt4/popups/VehicleInfoPopUp.qml +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @file VIPopUp.qml - * @brief Pop up window with information about vehicle. - * 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 1.1 -import "../models/Constants.js" as Constants -import "../hmi_api/Common.js" as Common -import "../controls" - -PopUp { - //TODO{ALeshin}: Redraw this window as ListView or Column, when we'll get requirements - Column { - anchors.fill: parent - Text { - id: viText - width: parent.width - height: 1/5 * parent.height - text: "Vehicle Information" - font.pixelSize: Constants.fontSize - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - color: Constants.primaryColor - } - - Row { - height: 1/5 * parent.height - width: parent.width - - Text { - width: 1/4 * parent.width - height: 1/5 * parent.height - anchors.verticalCenter: parent.verticalCenter - text: "PRNDL: " - font.pixelSize: Constants.fontSize - verticalAlignment: Text.AlignVCenter - color: Constants.primaryColor - } - - ComboBox { - anchors.verticalCenter: parent.verticalCenter - id: comboBox - model: prndlList - - onCurrentIndexChanged: { - console.debug("PRNDL:", currentIndex) - dataContainer.vehicleInfoModel.prndl = model.get(currentIndex).id - } - - textRole: "name" - ListModel { - id: prndlList - Component.onCompleted: { - append({ id: -1, name: "<NO DATA (prndl)>" }) - for (var name in Common.PRNDL) { - append({ id: Common.PRNDL[name], name: name }); - } - } - } - } - z: 1000 - } - - Text { - width: parent.width - height: 1/5 * parent.height - text: "ECU 1: " + dataContainer.vehicleInfoModel.ecuDIDData.data1 - font.pixelSize: Constants.fontSize - verticalAlignment: Text.AlignVCenter - color: Constants.primaryColor - } - - Text { - width: parent.width - height: 1/5 * parent.height - text: "ECU 2: " + dataContainer.vehicleInfoModel.ecuDIDData.data2 - font.pixelSize: Constants.fontSize - verticalAlignment: Text.AlignVCenter - color: Constants.primaryColor - } - } -} |