diff options
author | Scott Murray <scott.murray@konsulko.com> | 2021-12-16 16:49:22 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2021-12-16 16:53:08 -0500 |
commit | 8b8c003e0be89baef3715c7f905ba32213bdb853 (patch) | |
tree | 143ecba776377a86527caaf2750a66fd22160db1 /app/voice | |
parent | ff0e7f9777118469203fe48663f4226d82ecc58b (diff) |
Update for app framework removal
Changes:
- Remove the autobuild scripts and config.xml used by the app
framework widget build.
- Update the qmake files to just build a "settings" binary and
install it into /usr/bin by default.
- Remove the code in main.cpp that handled reading the WebSocket
command-line arguments and passing them to binding related
code.
- Tweak the Bluetooth QML to call into the new start call in
the libqtappfw-bt Bluetooth object that replaces the previous
WebSocket onConnected hook.
- Remove the voice related code as it is not likely to be
re-enabled anytime soon.
Bug-AGL: SPEC-4182
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I8d3272b62aa403a71adadd26c545c1ed33281e5f
Diffstat (limited to 'app/voice')
-rw-r--r-- | app/voice/ConfigDialog.qml | 265 | ||||
-rw-r--r-- | app/voice/Voice.qml | 101 | ||||
-rw-r--r-- | app/voice/images/HMI_Settings_VoiceIcon.svg | 331 | ||||
-rw-r--r-- | app/voice/voice.qrc | 7 |
4 files changed, 0 insertions, 704 deletions
diff --git a/app/voice/ConfigDialog.qml b/app/voice/ConfigDialog.qml deleted file mode 100644 index 6ab7dea..0000000 --- a/app/voice/ConfigDialog.qml +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2019 Konsulko Group - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.11 -import QtQuick.Controls 2.4 -import QtQuick.Layouts 1.3 -import QtQrCode.Component 1.0 -import AGL.Demo.Controls 1.0 - -Dialog { - id: root - property alias xpos: root.x - property alias ypos: root.y - property alias maxpwidth: root.width - property alias maxpheight: root.height - - property string thisAgentName: undefined - property string thisAgentId: undefined - property string thisAgentVendor: undefined - property string thisAgentWuW: undefined - property string thisAgentAuthState: undefined - property string thisAgentConnState: undefined - property string thisAgentDialogState: undefined - property string thisAgentLoginUrl: undefined - property string thisAgentLoginCode: undefined - property bool tokenValid: false - property bool agentActive: false - - signal requestNewToken(string thisAgentId) - - visible: false - z: 1 - focus: true - modal: true - footer: DialogButtonBox { - Button { text: "CLOSE" - DialogButtonBox.buttonRole: DialogButtonBox.RejectRole - } - Button { text: "UPDATE" - DialogButtonBox.buttonRole: DialogButtonBox.ResetRole - } - background: Rectangle { - border.color : '#00ADDC' - color: '#848286' - } - } - - background: Rectangle { - border.color : '#00ADDC' - color: 'black' - opacity: 0.5 - } - - onReset: refreshToken() - function refreshToken() { - root.requestNewToken(thisAgentId); - } - - Item { - id: container - anchors.centerIn: parent - anchors.fill: parent - ColumnLayout { - anchors.fill: parent - spacing: 0 - - RowLayout { - Layout.fillHeight: false - Layout.fillWidth: true - Layout.alignment: Qt.AlignLeft | Qt.AlignTop - spacing: 16 - - /* Labels */ - ColumnLayout { - Layout.fillWidth: true - Label { - id: nameLabel - font.pixelSize: 28 - color: 'white' - text: "Voice Agent:" - Layout.preferredWidth: 200 - } - Label { - id: vendorLabel - font.pixelSize: 28 - color: 'white' - text: "Vendor:" - Layout.preferredWidth: 200 - } - Label { - id: wuwLabel - font.pixelSize: 28 - color: 'white' - text: "Wake Up Word:" - Layout.preferredWidth: 200 - } - Label { - id: authLabel - font.pixelSize: 28 - color: 'white' - text: "Authorization status:" - } - Label { - id: connLabel - font.pixelSize: 28 - color: 'white' - text: "Connection status:" - } - Label { - id: dialogLabel - font.pixelSize: 28 - color: 'white' - text: "Dialog status:" - } - } - - /* Values */ - ColumnLayout { - Layout.fillWidth: true - Label { - id: nameValue - font.pixelSize: 28 - color: '#66FF99' - text: thisAgentName - } - Label { - id: vendorValue - font.pixelSize: 28 - color: '#66FF99' - text: thisAgentVendor - } - Label { - id: wuwValue - font.pixelSize: 28 - color: '#66FF99' - text: thisAgentWuW - } - Label { - id: authValue - font.pixelSize: 28 - color: (thisAgentAuthState == "UNINITIALIZED")? '#00ADDC' : '#848286' - text: thisAgentAuthState - } - Label { - id: connValue - font.pixelSize: 28 - color: (thisAgentConnState == "DISCONNECTED")? '#00ADDC' : '#848286' - text: thisAgentConnState - } - Label { - id: dialogValue - font.pixelSize: 28 - color: (thisAgentDialogState == "MICROPHONEOFF")? '#00ADDC' : '#848286' - text: thisAgentDialogState - } - } - } - RowLayout { - Layout.fillHeight: true - Layout.fillWidth: true - Layout.alignment: Qt.AlignLeft - Layout.topMargin: 32 - spacing: 16 - visible: root.thisAgentAuthState !== "REFRESHED" - ColumnLayout { - Layout.fillWidth: true - Label { - id: loginUrlLabel - font.pixelSize: 28 - color: 'white' - text: "Login url:" - } - Label { - id: loginCodeLabel - font.pixelSize: 28 - color: 'white' - text: "Login code:" - } - } - ColumnLayout { - Layout.fillWidth: true - Label { - id: loginUrlValue - font.pixelSize: 28 - color: root.tokenValid? '#848286':'#0DF9FF' - text: thisAgentLoginUrl - } - Label { - id: loginCodeValue - font.pixelSize: 28 - color: root.tokenValid? '#848286':'#0DF9FF' - text: thisAgentLoginCode - } - } - } - RowLayout { - Layout.fillHeight: true - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: 8 - Layout.bottomMargin: 8 - - QtQrCode { - /* - * FIXME: Generated URL is currently Alexa-specific, work around for - * now by checking agent name and only displaying for Alexa. - */ - data: "%1?cbl-code=%2".arg(root.thisAgentLoginUrl).arg(root.thisAgentLoginCode) - visible: root.thisAgentName === "Alexa" && root.thisAgentAuthState !== "REFRESHED" && root.tokenValid - background: 'white' - margin: 16 - Layout.fillWidth: true - Layout.fillHeight: true - } - } - Label { - id: instructions - font.pixelSize: 18 - - states: [ - State { - name: "HAVE_TOKEN" - when: root.thisAgentAuthState !== "REFRESHED" && root.tokenValid - PropertyChanges { - target: instructions - text: "You can use the supplied login data to enable "+thisAgentName+"." - visible: true - } - }, - State { - name: "NEED_TOKEN" - when: root.thisAgentAuthState !== "REFRESHED" && !root.tokenValid - PropertyChanges { - target: instructions - text: "The current login data is not valid. Press 'UPDATE' to refresh." - visible: true - } - }, - State { - name: "AUTHORIZED" - when: root.thisAgentAuthState === "REFRESHED" - PropertyChanges { - target: instructions - visible: false - } - } - ] - } - } - } -} diff --git a/app/voice/Voice.qml b/app/voice/Voice.qml deleted file mode 100644 index 4de43b6..0000000 --- a/app/voice/Voice.qml +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2019 Konsulko Group - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.11 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.4 -import AGL.Demo.Controls 1.0 -import ".." - -SettingPage { - id: root - icon: '/voice/images/HMI_Settings_VoiceIcon.svg' - title: 'Voice' - readonly property bool isVoice: true - - Component { - id: voiceAgent - MouseArea { - height: 120 - width: ListView.view.width - Column { - anchors.leftMargin: 100 - id: agentName - Label { - id: agentNameText - text: name - color: '#66FF99' - font.pixelSize: 38 - font.bold: active === "active" - } - } - Column { - anchors.right: parent.right - anchors.rightMargin: 5 - Button { - visible: active === "active" - font.pixelSize: 18 - text: "DETAILS" - onClicked: { - agentdata.tokenValid = Qt.binding(function() { return (usrauth[2] === "expired")? false : true }) - agentdata.agentActive = Qt.binding(function() { return (active === "active")? true: false }) - agentdata.open() - } - - ConfigDialog { - id: agentdata - parent: Overlay.overlay - maxpwidth: 744 - maxpheight: 744 - xpos: (parent.width - maxpwidth)/2 - ypos: (parent.height - maxpheight)/2 - thisAgentName: name - thisAgentId: id - thisAgentWuW: wuw - thisAgentVendor: vendor - thisAgentAuthState: authstate - thisAgentConnState: connstate - thisAgentDialogState: dialogstate - thisAgentLoginUrl: usrauth[0] - thisAgentLoginCode: usrauth[1] - - onRequestNewToken: { - voice.getCBLpair(id); - } - } - } - } - - Image { - source: '../images/HMI_Settings_DividingLine.svg' - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top - anchors.topMargin: -15 - visible: model.index > 0 - } - } - } - - ListView { - id: view - anchors.fill: parent - anchors.margins: 100 - model: VoiceAgentModel - delegate: voiceAgent - clip: true - } -} diff --git a/app/voice/images/HMI_Settings_VoiceIcon.svg b/app/voice/images/HMI_Settings_VoiceIcon.svg deleted file mode 100644 index 7e6f8f6..0000000 --- a/app/voice/images/HMI_Settings_VoiceIcon.svg +++ /dev/null @@ -1,331 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> - -<svg - xmlns:i="&#38;ns_ai;" - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - id="Radio_Inactive" - x="0px" - y="0px" - viewBox="0 0 300 300" - xml:space="preserve" - inkscape:version="0.92.4 (unknown)" - sodipodi:docname="foo.svg" - width="300" - height="300"><metadata - id="metadata5319"><rdf:RDF><cc:Work - rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs - id="defs5317" /><sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1858" - inkscape:window-height="808" - id="namedview5315" - showgrid="false" - inkscape:zoom="0.78666667" - inkscape:cx="-417.39185" - inkscape:cy="81.68331" - inkscape:window-x="0" - inkscape:window-y="27" - inkscape:window-maximized="0" - inkscape:current-layer="g5196" /><style - type="text/css" - id="style5192"> - .st0{fill:#FFFFFF;} - .st1{font-family:'Roboto-Regular';} - .st2{font-size:25px;} - .st3{letter-spacing:6;} - .st4{fill:url(#SVGID_1_);} - .st5{fill:url(#SVGID_2_);} - .st6{fill:url(#SVGID_3_);} - .st7{fill:url(#SVGID_4_);} - .st8{fill:url(#SVGID_5_);} - .st9{fill:url(#SVGID_6_);} - .st10{fill:url(#SVGID_7_);} - .st11{fill:url(#SVGID_8_);} - .st12{fill:url(#SVGID_9_);} - .st13{fill:url(#SVGID_10_);} - .st14{fill:url(#SVGID_11_);} - .st15{fill:url(#SVGID_12_);} - .st16{fill:url(#SVGID_13_);} -</style><switch - id="switch5194" - transform="matrix(1.3307804,0,0,1.3314313,-62.924861,-27.94579)"><g - i:extraneous="self" - id="g5196"><g - id="g5198" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" - transform="matrix(1.44,0,0,1.44,-70.444,-60.28)"><linearGradient - id="SVGID_1_" - gradientUnits="userSpaceOnUse" - x1="4.0481" - y1="287.94919" - x2="320.4859" - y2="-15.4029" - gradientTransform="matrix(1,0.00546456,-0.00546456,1,-2.0192,-3.0212)"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5201" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5203" /></linearGradient><g - id="g5207" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_2_" - gradientUnits="userSpaceOnUse" - x1="-11.0561" - y1="273.63409" - x2="354.8013" - y2="-51.979"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5210" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5212" /></linearGradient><path - class="st5" - d="m 168.2,162.4 -1.2,-3.5 c 7.9,-2.6 13.3,-9.6 13.3,-17.3 v -40.5 c 0,-10.2 -9.1,-18.4 -20.2,-18.4 -11.1,0 -20.2,8.3 -20.2,18.4 v 40.5 c 0,7.7 5.3,14.6 13.2,17.3 l -1.2,3.5 c -9.4,-3.2 -15.7,-11.5 -15.7,-20.8 v -40.5 c 0,-12.2 10.7,-22.1 23.9,-22.1 13.2,0 23.9,9.9 23.9,22.1 v 40.5 c 0,9.3 -6.4,17.6 -15.8,20.8 z" - id="path5214" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" - inkscape:connector-curvature="0" /></g><g - id="g5216" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_3_" - gradientUnits="userSpaceOnUse" - x1="3.6219001" - y1="290.12631" - x2="369.4794" - y2="-35.486801"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5219" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5221" /></linearGradient><path - class="st6" - d="m 160,172.9 c -18.3,0 -33.1,-12.2 -33.1,-27.3 h 3.7 c 0,13 13.2,23.6 29.5,23.6 16.3,0 29.5,-10.6 29.5,-23.6 h 3.7 c -0.2,15.1 -15,27.3 -33.3,27.3 z" - id="path5223" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" - inkscape:connector-curvature="0" /></g><g - id="g5225" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_4_" - gradientUnits="userSpaceOnUse" - x1="19.325199" - y1="307.77039" - x2="385.18259" - y2="-17.8428"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5228" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5230" /></linearGradient><rect - x="158.2" - y="178.5" - class="st7" - width="3.7" - height="8" - id="rect5232" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5234" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_5_" - gradientUnits="userSpaceOnUse" - x1="-22.1502" - y1="261.16879" - x2="343.70721" - y2="-64.444397"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5237" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5239" /></linearGradient><rect - x="138.10001" - y="110.3" - class="st8" - width="14.3" - height="3.7" - id="rect5241" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5243" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_6_" - gradientUnits="userSpaceOnUse" - x1="-27.6269" - y1="255.0152" - x2="338.23059" - y2="-70.5979"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5246" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5248" /></linearGradient><rect - x="138.10001" - y="99.300003" - class="st9" - width="14.3" - height="3.7" - id="rect5250" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5252" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_7_" - gradientUnits="userSpaceOnUse" - x1="-16.6164" - y1="267.3866" - x2="349.241" - y2="-58.226601"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5255" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5257" /></linearGradient><rect - x="138.10001" - y="121.4" - class="st10" - width="14.3" - height="3.7" - id="rect5259" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5261" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_8_" - gradientUnits="userSpaceOnUse" - x1="-11.1393" - y1="273.54059" - x2="354.71811" - y2="-52.072498"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5264" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5266" /></linearGradient><rect - x="138.10001" - y="132.5" - class="st11" - width="14.3" - height="3.7" - id="rect5268" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5270" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_9_" - gradientUnits="userSpaceOnUse" - x1="-9.1322002" - y1="275.7959" - x2="356.72531" - y2="-49.817299"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5273" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5275" /></linearGradient><rect - x="167.60001" - y="110.3" - class="st12" - width="14.3" - height="3.7" - id="rect5277" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5279" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_10_" - gradientUnits="userSpaceOnUse" - x1="-14.6088" - y1="269.6423" - x2="351.2486" - y2="-55.970798"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5282" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5284" /></linearGradient><rect - x="167.60001" - y="99.300003" - class="st13" - width="14.3" - height="3.7" - id="rect5286" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5288" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_11_" - gradientUnits="userSpaceOnUse" - x1="-3.5984001" - y1="282.01361" - x2="362.25909" - y2="-43.599499"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5291" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5293" /></linearGradient><rect - x="167.60001" - y="121.4" - class="st14" - width="14.3" - height="3.7" - id="rect5295" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5297" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_12_" - gradientUnits="userSpaceOnUse" - x1="1.8788" - y1="288.16769" - x2="367.73621" - y2="-37.445499"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5300" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5302" /></linearGradient><rect - x="167.60001" - y="132.5" - class="st15" - width="14.3" - height="3.7" - id="rect5304" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /></g><g - id="g5306" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1"><linearGradient - id="SVGID_13_" - gradientUnits="userSpaceOnUse" - x1="24.376101" - y1="313.44559" - x2="390.23361" - y2="-12.1676"><stop - offset="0" - style="stop-color:#00ADDC" - id="stop5309" /><stop - offset="1" - style="stop-color:#6BFBFF" - id="stop5311" /></linearGradient><path - class="st16" - d="m 182.1,195 h -3.7 c 0,-4.6 -2.3,-5.4 -8.8,-5.4 h -19.2 c -6.5,0 -8.8,0.8 -8.8,5.4 h -3.7 c 0,-9.1 7.8,-9.1 12.5,-9.1 h 19.2 c 4.7,0 12.5,0 12.5,9.1 z" - id="path5313" - style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" - inkscape:connector-curvature="0" /></g></g></g></switch></svg>
\ No newline at end of file diff --git a/app/voice/voice.qrc b/app/voice/voice.qrc deleted file mode 100644 index 8b05e91..0000000 --- a/app/voice/voice.qrc +++ /dev/null @@ -1,7 +0,0 @@ -<RCC> - <qresource prefix="/voice"> - <file>Voice.qml</file> - <file>ConfigDialog.qml</file> - <file>images/HMI_Settings_VoiceIcon.svg</file> - </qresource> -</RCC> |