diff --git a/MsmView.qml b/MsmView.qml new file mode 100644 index 0000000..0f026d3 --- /dev/null +++ b/MsmView.qml @@ -0,0 +1,112 @@ +import QtQuick 2.5 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 +import QtQuick.Layouts 1.1 + +Rectangle { + id: skillcontent + width: cbwidth + anchors { left: parent.left; right: parent.right } + height: 60 + border.width: 0 + border.color: "lightsteelblue" + radius: 2 + color: "#222" + +// function getSkillInfoLocal() { +// var customFold = '/opt/mycroft/skills/' +// var skillPath = customFold + model.name +'/__init__.py' +// if(myReader.file_exists_local(skillPath)){ +// msminstllbtn.visible = false +// instlabel.color = "Green" +// instlabel.text = "Installed" +// } +// else { +// //console.log(skillPath) +// instlabel.text = "Not Installed" +// } +// } + + function exec(msmparam) { + var bscrpt = innerset.msmloc + return launchinstaller.msmapp("x-terminal-emulator --hold -e" + " " + bscrpt + " install " + model.url) + } + + Component.onCompleted: { + //getSkillInfoLocal() + //msmSkillInstallProgBar.visible = false; + } + + Column { + id: skillcolumn + width: parent.width / 80 + + Label { + font.capitalization: Font.AllUppercase + wrapMode: Text.WordWrap + text: model.name + } + + Label { + font.pointSize: 8 + wrapMode: Text.WordWrap + text: model.url + } + } + +// Label { +// id: instlabel +// font.pointSize: 8 +// wrapMode: Text.WordWrap +// anchors.right: msminstllbtn.left +// anchors.rightMargin: 5 +// text: "" +// } + + Button { + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + id: msminstllbtn + visible: true + text: "\u25BC Install" + flat: true + checked: false + focus: false + width: 120 + height: 42 + Material.background: Material.Grey + Material.foreground: Material.BlueGrey + + onClicked: { + console.log(model.url) + var msmprogress = exec() +// var getcurrentprogress = msmprogress.split("\n") +// console.log(getcurrentprogress); +// if(getcurrentprogress.indexOf("Cloning repository") != -1) +// { +// msmSkillInstallProgBar.visible = true; +// msmSkillInstallProgBar.indeterminate = true; +// } +// if(getcurrentprogress.indexOf("Skill installed!") != -1) +// { +// msmSkillInstallProgBar.indeterminate = false; +// msmSkillInstallProgBar.value = 100; +// instlabel.color = "Green" +// instlabel.text = "Installed" +// } + } + + } + +// ProgressBar { +// anchors.right: parent.right +// anchors.rightMargin: 2 +// anchors.bottom: parent.bottom +// width: 40 +// id: msmSkillInstallProgBar +// visible: false +// indeterminate: false +// } + + } diff --git a/Options.qml b/Options.qml index 20f4bbd..d7d0a1c 100644 --- a/Options.qml +++ b/Options.qml @@ -1,11 +1,11 @@ -import QtQuick 2.0 +import QtQuick 2.5 import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 +import QtQuick.Layouts 1.1 import Qt.labs.settings 1.0 Rectangle { id: rectangle1 - color: "#0e884b" + color: "#0e7f86" anchors.fill: parent property alias strscript: textField1.text property alias stpscript: textField2.text @@ -51,20 +51,20 @@ Rectangle { TextField { id: fontsizetextfld - width: 36 - height: 26 + width: 28 + height: 46 text: qsTr("12") anchors.left: fontsizelabelfld.right anchors.verticalCenter: fontsizelabelfld.verticalCenter - anchors.leftMargin: 10 + anchors.leftMargin: 6 } Button { id: button1 - width: 100 - height: 18 + width: 102 + height: 42 text: qsTr("Apply") - anchors.verticalCenterOffset: -42 + anchors.verticalCenterOffset: -33 anchors.verticalCenter: fontsizetextfld.verticalCenter anchors.left: label2.right anchors.leftMargin: 177 @@ -76,36 +76,37 @@ Rectangle { TextField { id: textField1 - width: 262 - height: 26 + width: 274 + height: 43 text: qsTr("/home/Aix/mycroft-core/mycroft.sh") horizontalAlignment: Text.AlignHCenter - anchors.horizontalCenterOffset: 140 + anchors.horizontalCenterOffset: 162 anchors.horizontalCenter: fontsizetextfld.horizontalCenter anchors.top: fontsizetextfld.bottom - anchors.topMargin: 14 + anchors.topMargin: 2 } TextField { id: textField2 - width: 263 - height: 25 + width: 275 + height: 40 text: qsTr("/home/Aix/mycroft-core/mycroft.sh") horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: textField1.horizontalCenter anchors.top: textField1.bottom - anchors.topMargin: 10 + anchors.topMargin: -1 } TextField { id: textField3 - width: 263 - height: 25 + width: 273 + height: 40 text: qsTr("ws://0.0.0.0:8181/core") + anchors.horizontalCenterOffset: 1 horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: textField1.horizontalCenter anchors.top: textField2.bottom - anchors.topMargin: 10 + anchors.topMargin: -3 } Label { @@ -129,6 +130,7 @@ Rectangle { Label { id: label3 text: qsTr("Mycroft WS IP") + textFormat: Text.AutoText font.bold: true anchors.top: label2.bottom anchors.topMargin: 18 diff --git a/README.md b/README.md index 98881e6..eb0770c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,22 @@ -# Mycroft Ai QT Standalone Application -This application provides Mycroft with Standalone GUI interface for OS/Desktops which do not support native desktop integration interfaces. +## Mycroft AI Standalone GUI Client Version 1.3 +##### Standalone GUI client for Mycroft written in QT, support for all Desktop Environments +###### Appimage Release - Comes bundled with all the QT/GUI Dependencies + +What's New: +* added: Fullscreen support, ability to resize in windowed mode +* added: New conversation model allows visual feedback for skill results +* added: Web-view integration for skills with HTML type data +* added: New conversation animation +* added: Inbuilt Installation feature for all skills listed in mycroft-skills directly from the application using MSM Skill Installer +* added: Drag and Drop to conversation area for Image/File Recognition type skills +* added: To settings ability to set custom drag and drop (Image/File) recognition command +* changed: Redesign for better space management and dedicated animations bar #### AppImage: -* Appimage for the Qt Application for any desktop environment (Linux). +* Appimage for the Qt Application for any desktop environment (Linux) * Download -> chmod +x mycroft-qtapplication.AppImage -> Run +* Go To Settings and Set the Start and Stop path to your Mycroft.sh file in the Mycroft-Core folder +* Toggle The Switch on The Top Left Corner to Start Mycroft ### Building From Source: @@ -11,9 +24,11 @@ This application provides Mycroft with Standalone GUI interface for OS/Desktops * Qt5 * QtQuick 2.0 * QtQml Models 2.2 -* QtQuick Controls 1.0 -* QtQuick Layouts 1.0 +* QtQuick Controls 2.0 +* QtQuick Layouts 1.3 * Qt Websockets 1.0 +* Qt Webkit 3.0 +* Qt Webkit Experimental 1.0 * QtQuick Controls Styles 1.4 * Qt Creator (QT IDE FOR APP DEVELOPMENT) diff --git a/SimpleMessageType.qml b/SimpleMessageType.qml new file mode 100644 index 0000000..2ee905b --- /dev/null +++ b/SimpleMessageType.qml @@ -0,0 +1,35 @@ +import QtQuick 2.5 +import QtQml.Models 2.2 +import QtQuick.Controls 2.0 + +Column { + spacing: 6 + anchors.right: parent.right + + readonly property bool sentByMe: model.recipient !== "User" + property alias mssg: messageText.text + + Row { + id: messageRow + spacing: 6 + + Rectangle { + id: messageRect + width: cbwidth + radius: 2 + height: messageText.implicitHeight + 24 + color: "#111" + + Label { + id: messageText + text: model.InputQuery + anchors.fill: parent + anchors.margins: 12 + wrapMode: Label.Wrap + font.pixelSize: innerset.fntsize + color: "#fff" + + } + } + } + } diff --git a/SkillModel.qml b/SkillModel.qml new file mode 100644 index 0000000..bab7dab --- /dev/null +++ b/SkillModel.qml @@ -0,0 +1,76 @@ +import QtQuick 2.5 + +ListModel { + id: skillshintmodel + ListElement { + Pic: "images/alarm.png" + Skill: "Alarm" + CommandList: [ + ListElement { Commands: "Hey Mycroft, Set alarm for %time" }, + ListElement { Commands: "Hey Mycroft, Set alarm for %time on %date" } + ] + } + + ListElement { + Pic: "images/dateandtime.png" + Skill: "Date & Time" + CommandList: [ + ListElement { Commands: "Hey Mycroft, What is the current time" }, + ListElement { Commands: "Hey Mycroft, Current date in London" } + ] + } + + ListElement { + Pic: "images/desktop.png" + Skill: "Desktop" + CommandList: [ + ListElement { Commands: "Hey Mycroft, Open Firefox"}, + ListElement { Commands: "Hey Mycroft, Open Konsole"} + ] + } + + ListElement { + Pic: "images/joke.png" + Skill: "Joke" + CommandList: [ + ListElement {Commands: "Hey Mycroft, Tell me a joke"}, + ListElement {Commands: "Hey Mycroft, Meaning of life"} + ] + } + + ListElement { + Pic: "images/spell.png" + Skill: "Spell" + CommandList: [ + ListElement {Commands: "Hey Mycroft, Spell Hello"}, + ListElement {Commands: "Hey Mycroft, Spell Mycroft"} + ] + } + + ListElement { + Pic: "images/wikip.png" + Skill: "WiKi" + CommandList: [ + ListElement {Commands: "Hey Mycroft, Wiki the Moon"}, + ListElement {Commands: "Hey Mycroft, Define Relativity"} + ] + } + + ListElement { + Pic: "images/wolfram.png" + Skill: "Wolfram Alpha" + CommandList: [ + ListElement {Commands: "Hey Mycroft, Calculate the Pi"}, + ListElement {Commands: "Hey Mycroft, What is 2+2"} + ] + } + + ListElement { + Pic: "images/weather.png" + Skill: "Weather" + CommandList: [ + ListElement {Commands: "Hey Mycroft, What is the current weather"}, + ListElement {Commands: "Hey Mycroft, Current weather in Tokyo"} + ] + } +} diff --git a/SplitView.qml b/SplitView.qml new file mode 100644 index 0000000..9c36e13 --- /dev/null +++ b/SplitView.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Item { + +} diff --git a/Stockwidget.qml b/Stockwidget.qml deleted file mode 100644 index 18eea82..0000000 --- a/Stockwidget.qml +++ /dev/null @@ -1,81 +0,0 @@ -import QtQuick 2.0 - -Item { -anchors.fill: parent -property alias currentstockprice: stockWidgetPrice.text -property alias currentstocksymbol: stockWidgetSymbol.text - - Image { - id: stockWidgetBackground - anchors.fill: parent - source: "images/stocks.png" - - Text { - id: stockWidgetHeader - color: "#ffffff" - text: qsTr("Stock Price Info") - style: Text.Raised - font.italic: false - textFormat: Text.AutoText - anchors.top: parent.top - anchors.topMargin: 30 - wrapMode: Text.NoWrap - font.bold: true - font.family: "Times New Roman" - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 10 - font.pixelSize: 30 - } - - Text { - id: stockWidgetSymbol - color: "#ffffff" - text: qsTr("Text") - font.bold: true - anchors.top: stockWidgetHeader.bottom - anchors.topMargin: 15 - anchors.right: parent.right - style: Text.Raised - font.family: "Times New Roman" - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 40 - font.pixelSize: 35 - - Text { - id: stockWidgetPriceLabel - color: "#ffffff" - text: qsTr("Stock Price:") - font.italic: true - font.family: "Times New Roman" - style: Text.Raised - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 150 - font.pixelSize: 24 - - Text { - id: stockWidgetPrice - color: "#ffffff" - text: qsTr("128.89") - font.italic: true - style: Text.Raised - font.family: "Times New Roman" - font.bold: true - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 124 - anchors.right: parent.right - anchors.rightMargin: 0 - font.pixelSize: 27 - } - } - } - } -} - - diff --git a/Suggestions.qml b/Suggestions.qml deleted file mode 100644 index ffe165b..0000000 --- a/Suggestions.qml +++ /dev/null @@ -1,329 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 - -Item { - id: main - width: 200 - height: 200 - signal message(string msg) - - Image { - id: image1 - visible: true - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 - anchors.fill: parent - source: "images/bluebg.png" - - Rectangle { - id: rectanglequickitemmenu - color: "#00000000" - visible: true - anchors.fill: parent - - Text { - id: quickaccesslabel - x: 51 - y: 5 - color: "#82b9ea" - text: qsTr("Quick Access") - anchors.top: parent.top - anchors.topMargin: 5 - anchors.horizontalCenterOffset: 0 - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - font.pixelSize: 15 - } - - Rectangle { - id: suggestion1button - x: 10 - y: 30 - width: 30 - height: 30 - color: "#282525" - radius: 15 - anchors.top: parent.top - anchors.topMargin: 30 - anchors.horizontalCenterOffset: -75 - anchors.horizontalCenter: parent.horizontalCenter - border.color: "#1a4878" - border.width: 1 - z:100 - - - Component.onCompleted: { - //print("MyItem Component.onCompleted") - main.message("signal sent"); - } - - Image { - id: image2 - x: 82 - y: 62 - width: 16 - height: 16 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - source: "images/weathericon.png" - } - - Text { - id: suggestion1label - x: 40 - y: 7 - color: "#ffffff" - text: qsTr("Check The Weather") - anchors.verticalCenter: suggestion1button.verticalCenter - anchors.left: suggestion1button.right - anchors.leftMargin: 10 - font.italic: false - font.family: "Verdana" - font.pixelSize: 13 - } - - MouseArea { - id: mouseArea1 - x: 7 - y: 7 - anchors.fill: parent - hoverEnabled: true - Layout.fillWidth: true; - Layout.fillHeight: true; - onEntered: suggestion1button.border.color = "#fff" - onExited: suggestion1button.border.color = "#1a4878" - onClicked: main.message("What is the current Weather") - } - } - - Rectangle { - id: suggestion2button - x: 10 - y: 30 - width: 30 - height: 30 - color: "#282525" - radius: 15 - anchors.top: suggestion1button.bottom - anchors.topMargin: 10 - anchors.horizontalCenterOffset: -75 - anchors.horizontalCenter: parent.horizontalCenter - border.color: "#1a4878" - border.width: 1 - z:100 - - - Component.onCompleted: { - //print("MyItem Component.onCompleted") - main.message("signal sent"); - } - - Image { - id: jokeimagebutton - x: 82 - y: 62 - width: 16 - height: 16 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - source: "images/funnyface.png" - } - - Text { - id: suggestion2label - x: 40 - y: 7 - color: "#ffffff" - text: qsTr("Ask Mycroft A Joke") - anchors.verticalCenter: suggestion2button.verticalCenter - anchors.left: suggestion2button.right - anchors.leftMargin: 10 - font.italic: false - font.family: "Verdana" - font.pixelSize: 13 - } - - MouseArea { - id: mouseArea3 - x: 7 - y: 7 - anchors.fill: parent - hoverEnabled: true - Layout.fillWidth: true; - Layout.fillHeight: true; - onEntered: suggestion2button.border.color = "#fff" - onExited: suggestion2button.border.color = "#1a4878" - onClicked: main.message("Tell me a joke") - } - } - - Rectangle { - id: suggestion3button - x: 10 - y: 30 - width: 30 - height: 30 - color: "#282525" - radius: 15 - anchors.top: suggestion2button.bottom - anchors.topMargin: 10 - anchors.horizontalCenterOffset: -75 - anchors.horizontalCenter: parent.horizontalCenter - border.color: "#1a4878" - border.width: 1 - z:100 - - - Component.onCompleted: { - //print("MyItem Component.onCompleted") - main.message("signal sent"); - } - - Image { - id: reminderimagebutton - x: 82 - y: 62 - width: 16 - height: 16 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - source: "images/reminder.png" - } - - Text { - id: suggestion3label - x: 40 - y: 7 - color: "#ffffff" - text: qsTr("Set A Reminder") - anchors.verticalCenter: suggestion3button.verticalCenter - anchors.left: suggestion3button.right - anchors.leftMargin: 10 - font.italic: false - font.family: "Verdana" - font.pixelSize: 13 - } - - MouseArea { - id: mouseArea4 - x: 7 - y: 7 - anchors.fill: parent - hoverEnabled: true - Layout.fillWidth: true; - Layout.fillHeight: true; - onEntered: suggestion3button.border.color = "#fff" - onExited: suggestion3button.border.color = "#1a4878" - onClicked: { - rectanglereminderbox.visible = true - rectanglequickitemmenu.visible = false - } - } - } - - } - - Rectangle { - id: rectanglereminderbox - width: 0 - height: 0 - color: "#00000000" - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 - anchors.fill: parent - visible: false - - - Text { - id: text1 - color: "#ededed" - text: qsTr("Date:") - anchors.top: parent.top - anchors.topMargin: 40 - anchors.horizontalCenterOffset: -75 - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 13 - } - - Rectangle { - id: rectanglereminderdateinputbox - y: 0 - width: 117 - height: 20 - color: "#292424" - anchors.verticalCenterOffset: 0 - anchors.verticalCenter: text1.verticalCenter - anchors.left: text1.left - anchors.leftMargin: 50 - - TextField { - id: textInput1 - text: "Text Field" - bottomPadding: 0 - rightPadding: 0 - leftPadding: 0 - topPadding: 0 - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - - Text { - id: text2 - color: "#ededed" - text: qsTr("Time:") - anchors.top: text1.bottom - anchors.topMargin: 20 - anchors.horizontalCenterOffset: -75 - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 13 - } - - Rectangle { - id: rectangleremindertimeinputbox - y: 0 - width: 117 - height: 20 - color: "#292424" - anchors.verticalCenterOffset: 0 - anchors.verticalCenter: text2.verticalCenter - anchors.left: text2.left - anchors.leftMargin: 50 - - TextField { - id: textInput2 - text: qsTr("Text Field") - bottomPadding: 0 - rightPadding: 0 - leftPadding: 0 - topPadding: 0 - horizontalAlignment: Text.AlignHCenter - anchors.fill: parent - } - } - - Button { - id: button1 - height: 20 - text: qsTr("Set Reminder") - anchors.horizontalCenter: rectangleremindertimeinputbox.horizontalCenter - anchors.top: rectangleremindertimeinputbox.bottom - anchors.topMargin: 25 - - onClicked: { - main.message("Set A Reminder For"+" "+textInput1.text+" "+textInput2.text) - rectanglereminderbox.visible = false - rectanglequickitemmenu.visible = true - - } - } - } - - } - -} diff --git a/SwitchButton.qml b/SwitchButton.qml new file mode 100644 index 0000000..038f4ac --- /dev/null +++ b/SwitchButton.qml @@ -0,0 +1,82 @@ +import QtQuick 2.7 +import QtQuick.Templates 2.0 as T + +T.Switch { + id: control + + implicitWidth: indicator.implicitWidth + implicitHeight: switchHandle.implicitHeight + + property alias circolour: rectangle.color + + indicator: Rectangle { + id: switchHandle + implicitWidth: 6 * 4.8 + implicitHeight: 6 * 2.6 + x: control.leftPadding + anchors.verticalCenter: parent.verticalCenter + radius: 6 * 1.3 + color: Qt.darker("#222", 1.2) + border.color: "#fff" + + Rectangle { + id: rectangle + + width: 6 * 2.6 + height: 6 * 2.6 + radius: 10 * 1.3 + color: Qt.lighter("#222", 1.5) + border.color: "#fff" + } + + states: [ + State { + name: "off" + when: !control.checked && !control.down + }, + State { + name: "on" + when: control.checked && !control.down + + PropertyChanges { + target: switchHandle + color: Qt.lighter("#222", 1.5) + border.color: "#fff" + } + + PropertyChanges { + target: rectangle + x: parent.width - width + + } + }, + State { + name: "off_down" + when: !control.checked && control.down + + PropertyChanges { + target: rectangle + color: "#fff" + } + + }, + State { + name: "on_down" + extend: "off_down" + when: control.checked && control.down + + PropertyChanges { + target: rectangle + x: parent.width - width + color: "#fff" + } + + PropertyChanges { + target: switchHandle + color: "#222" + border.color: "#222" + } + } + ] + } +} diff --git a/TopBarAnim.qml b/TopBarAnim.qml new file mode 100644 index 0000000..34758a5 --- /dev/null +++ b/TopBarAnim.qml @@ -0,0 +1,152 @@ +import QtQuick 2.5 + +Item { + + //property alias topanimrun: seqrun.running + //anchors.fill: parent + function wsistalking() { + seqrun.running = true + canvasmiddlegraphics.visible = !canvasmiddlegraphics.visible + } + + SequentialAnimation { + id: seqrun + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "i" + from: -50 + to: -70 + duration: 200 + } + + SequentialAnimation { + loops: 10 + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 0 + to: 10 + Math.floor(Math.random() * 6) + 1 + duration: 12 + } + } + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 10 + to: 16 + Math.floor(Math.random() * 2) + 1 + duration: 12 + + } + } + + ParallelAnimation{ + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 16 + Math.floor(Math.random() * 2) + 1 + to: 10 + Math.floor(Math.random() * 6) + 1 + duration: 12 + } + } + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 10 + Math.floor(Math.random() / 6) + 1 + to: 0 + duration: 12 + } + + } + } + } + + ParallelAnimation { + + PropertyAnimation { + target: canvasmiddlegraphics + property: "visible" + from: true + to: false + duration: 20 + } + } + } + + Canvas { + id:canvasmiddlegraphics + width: parent.width + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + visible: true + + property color strokeStyle: Qt.darker(fillStyle, 1.5) + property color fillStyle: Qt.darker("deepskyblue", 1.1) + property real lineWidth: 1.6 + property bool fill: true + property bool stroke: false + property real alpha: 1.0 + property real scale : 1 + property real rotate : 0 + property real i: -50 + property real waveSpeed: 10 + property real amplitude: 0 + antialiasing: true + smooth: true + + onLineWidthChanged:requestPaint(); + onFillChanged:requestPaint(); + onStrokeChanged:requestPaint(); + onScaleChanged:requestPaint(); + onRotateChanged:requestPaint(); + onIChanged: requestPaint(); + + renderTarget: Canvas.FramebufferObject + renderStrategy: Canvas.Cooperative + + + onPaint: { + var ctxside = canvasmiddlegraphics.getContext('2d'); + var hCenter = width * 0.5 + var vCenter = height * 0.5 + var size = 12 + var period = 15; + var dotSpeed = 5; + + function draw_line(i){ + var oStartx=0; + var oStarty=( height / 2 ) + ctxside.beginPath(); + ctxside.moveTo( oStartx, oStarty + amplitude * Math.sin( x / period + ( i / 5 ) ) ); + ctxside.lineWidth = 1; + ctxside.strokeStyle = 'steelblue'; + + for(var Vx = oStartx; Vx < width * 1; Vx++) { + + var Vy = amplitude * Math.sin( Vx / period + ( i / 5 + Math.floor(Math.random() * 2) + 0)); + ctxside.lineTo( oStartx + Vx, oStarty + Vy); + } + + ctxside.stroke(); + } + + function render(){ + var st = i + ctxside.clearRect(0, 0, width, height); + draw_line(st) + + } + render(); + } + + } + +} diff --git a/Weather.qml b/Weather.qml deleted file mode 100644 index 7010f05..0000000 --- a/Weather.qml +++ /dev/null @@ -1,212 +0,0 @@ -import QtQuick 2.0 - -Item { - anchors.fill: parent - property alias currentweatherparam: weatherwidgetcurrenttemp.text - property alias highweatherparam: weatherwidgethightemp.text - property alias lowweatherparam: weatherwidgetlowtemp.text - property alias forcasttext: weatherwidgetcurrenttemplabel.text - property alias forcastdegree: weatherwidgetcurrenttempdegrees.text - property alias weatherbackgroundimage: weatheranimation.source - - Image { - id: imageweatherbackground - anchors.fill: parent - //source: "bluesky.png" - - AnimatedImage { - id: weatheranimation - anchors.fill: parent - source: "images/clearsky.gif" - } - - Rectangle { - id: bgweatherlayer - anchors.fill: parent - color: "#80000000" - - Rectangle { - id: weatherwidgetrectangletop - color: "#00000000" - anchors.top: parent.top - anchors.topMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - anchors.right: parent.right - anchors.rightMargin: 0 - - Text { - id: weatherwidgetcurrenttemp - color: "#ffffff" - text: qsTr(" "); - anchors.top: parent.top - anchors.topMargin: 30 - font.bold: true - font.italic: false - font.family: "Courier" - horizontalAlignment: Text.AlignHCenter - anchors.left: parent.left - anchors.leftMargin: 0 - anchors.right: parent.right - anchors.rightMargin: 0 - - font.pixelSize: 83 - - Text { - id: weatherwidgetcurrenttempdegrees - color: "#ffffff" - text: qsTr("°") - font.family: "Courier" - styleColor: "#ffeeee" - anchors.verticalCenterOffset: -15 - horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 115 - font.pixelSize: 34 - } - } - - Text { - id: weatherwidgetcurrenttemplabel - color: "#ffffff" - text: qsTr("Current Weather") - anchors.right: parent.right - anchors.rightMargin: 0 - horizontalAlignment: Text.AlignHCenter - anchors.left: parent.left - anchors.leftMargin: 0 - font.pixelSize: 26 - } - } - - Rectangle { - id: weatherwidgetrectanglebottom - height: 220 - color: "#00000000" - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - - Rectangle { - id: weatherwidgetrectanglebottomleft - color: "#00000000" - anchors.left: parent.left - anchors.leftMargin: 0 - anchors.right: parent.right - anchors.rightMargin: 320 - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - anchors.top: parent.top - anchors.topMargin: 0 - - Text { - id: weatherwidgethightemp - color: "#ffffff" - text: qsTr(" ") - horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - font.pixelSize: 40 - - Text { - id: weatherwidgethightempdegree - color: "#ffffff" - text: qsTr("°") - font.family: "Courier" - styleColor: "#ffeeee" - anchors.verticalCenterOffset: 0 - horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 80 - font.pixelSize: 34 - } - } - - Text { - id: weatherwidgethightemplabel - color: "#ffffff" - text: qsTr("HIGH") - font.family: "Courier" - font.bold: true - horizontalAlignment: Text.AlignHCenter - anchors.top: parent.top - anchors.topMargin: 25 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - font.pixelSize: 28 - } - } - - Rectangle { - id: weatherwidgetrectanglebottomright - color: "#00000000" - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - anchors.top: parent.top - anchors.topMargin: 0 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: weatherwidgetrectanglebottomleft.right - anchors.leftMargin: 100 - - Text { - id: weatherwidgetlowtemp - color: "#ffffff" - text: qsTr(" ") - horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - font.pixelSize: 40 - - Text { - id: weatherwidgetlowtempdegree - color: "#ffffff" - text: qsTr("°") - font.family: "Courier" - styleColor: "#ffeeee" - anchors.verticalCenterOffset: 0 - horizontalAlignment: Text.AlignHCenter - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 80 - font.pixelSize: 34 - } - } - - Text { - id: weatherwidgetlowtemplabel - color: "#ffffff" - text: qsTr("LOW") - font.family: "Courier" - font.bold: true - horizontalAlignment: Text.AlignHCenter - anchors.top: parent.top - anchors.topMargin: 25 - anchors.right: parent.right - anchors.rightMargin: 0 - anchors.left: parent.left - anchors.leftMargin: 0 - font.pixelSize: 28 - } - } - } - } - } -} diff --git a/WebViewType.qml b/WebViewType.qml new file mode 100644 index 0000000..7cc47d3 --- /dev/null +++ b/WebViewType.qml @@ -0,0 +1,40 @@ +import QtQuick 2.5 +import QtQml.Models 2.2 +import QtQuick.Controls 2.0 +import QtWebKit 3.0 +import QtWebKit.experimental 1.0 + +Column { + spacing: 6 + anchors.right: parent.right + + Row { + id: messageRow + spacing: 6 + + Rectangle { + id: messageRect + width: cbwidth + radius: 2 + height: newikiFlick.height + color: "#111" + + Flickable { + id: newikiFlick + width: messageRect.width + height: 250 + + WebView { + id: wikiview + anchors.fill: parent + url: "file:///" + model.InputQuery + experimental.userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3" + + onLoadingChanged: { + console.log(wikiview.url) + } + } + } + } + } + } diff --git a/Welcome.qml b/Welcome.qml index 1f7fa13..76cfea3 100644 --- a/Welcome.qml +++ b/Welcome.qml @@ -1,11 +1,11 @@ -import QtQuick 2.0 +import QtQuick 2.5 Rectangle { color: "#e63d8ac6" Image { anchors.fill: parent - source: "images/bluesky.png" + source: "images/whitespace.jpg" Rectangle { id: rectangle1 diff --git a/filereader.cpp b/filereader.cpp new file mode 100644 index 0000000..dadb42f --- /dev/null +++ b/filereader.cpp @@ -0,0 +1,20 @@ +#include "filereader.h" +#include + +FileReader::FileReader(QObject *parent) + : QObject(parent) +{ +} + +QByteArray FileReader::read(const QString &filename) +{ + QFile file(filename); + if (!file.open(QIODevice::ReadOnly)) + return QByteArray(); + + return file.readAll(); +} + +bool FileReader::file_exists_local(const QString &filename) { + return QFile(filename).exists(); +} diff --git a/filereader.h b/filereader.h new file mode 100644 index 0000000..3f1431e --- /dev/null +++ b/filereader.h @@ -0,0 +1,19 @@ +#ifndef FILEREADER_H +#define FILEREADER_H + +#include +#include + +class FileReader : public QObject +{ + Q_OBJECT + +public: + explicit FileReader(QObject *parent = Q_NULLPTR); + +public Q_SLOTS: + QByteArray read(const QString &filename); + bool file_exists_local(const QString &filename); +}; + +#endif // FILEREADER_H diff --git a/images/.directory b/images/.directory new file mode 100644 index 0000000..b67a8b5 --- /dev/null +++ b/images/.directory @@ -0,0 +1,4 @@ +[Dolphin] +PreviewsShown=true +Timestamp=2017,8,21,10,35,32 +Version=4 diff --git a/images/alarm.png b/images/alarm.png new file mode 100644 index 0000000..cb321f1 Binary files /dev/null and b/images/alarm.png differ diff --git a/images/climatesc.jpg b/images/climatesc.jpg new file mode 100644 index 0000000..004210d Binary files /dev/null and b/images/climatesc.jpg differ diff --git a/images/dateandtime.png b/images/dateandtime.png new file mode 100644 index 0000000..8ee9219 Binary files /dev/null and b/images/dateandtime.png differ diff --git a/images/desktop.png b/images/desktop.png new file mode 100644 index 0000000..912d77f Binary files /dev/null and b/images/desktop.png differ diff --git a/images/hint.svg b/images/hint.svg new file mode 100644 index 0000000..73cbee1 --- /dev/null +++ b/images/hint.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/images/home.svg b/images/home.svg new file mode 100644 index 0000000..944a3d4 --- /dev/null +++ b/images/home.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/images/installer.svg b/images/installer.svg new file mode 100644 index 0000000..182a9e3 --- /dev/null +++ b/images/installer.svg @@ -0,0 +1,14 @@ + + + + + + diff --git a/images/joke.png b/images/joke.png new file mode 100644 index 0000000..9ad5222 Binary files /dev/null and b/images/joke.png differ diff --git a/images/mmidanim.png b/images/mmidanim.png index cf7a428..4e3a6f6 100644 Binary files a/images/mmidanim.png and b/images/mmidanim.png differ diff --git a/images/mycroft-plasma-appicon.png b/images/mycroft-plasma-appicon.png new file mode 100644 index 0000000..4881c1a Binary files /dev/null and b/images/mycroft-plasma-appicon.png differ diff --git a/images/mycroft-plasma-appicon.svg b/images/mycroft-plasma-appicon.svg index 46f4f83..1bcaec0 100644 --- a/images/mycroft-plasma-appicon.svg +++ b/images/mycroft-plasma-appicon.svg @@ -10,13 +10,27 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="32" + id="svg3397" version="1.1" + inkscape:version="0.91 r13725" + width="32" height="32" - id="svg20" - sodipodi:docname="mycroft-plasma-appicon.svg" viewBox="0 0 32 32" - inkscape:version="0.92pre3 r"> + sodipodi:docname="mycroft-plasma-appicon.svg"> + + + + image/svg+xml + + + + + + - - - - - image/svg+xml - - - - - + inkscape:current-layer="svg3397" /> + - + id="g3730"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/oldmmidanim.png b/images/oldmmidanim.png new file mode 100644 index 0000000..cf7a428 Binary files /dev/null and b/images/oldmmidanim.png differ diff --git a/images/settings.svg b/images/settings.svg new file mode 100644 index 0000000..33eae8c --- /dev/null +++ b/images/settings.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/images/spell.png b/images/spell.png new file mode 100644 index 0000000..4128107 Binary files /dev/null and b/images/spell.png differ diff --git a/images/view-fullscreen.svg b/images/view-fullscreen.svg new file mode 100644 index 0000000..c3e2845 --- /dev/null +++ b/images/view-fullscreen.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/images/weather.png b/images/weather.png new file mode 100644 index 0000000..805d3d0 Binary files /dev/null and b/images/weather.png differ diff --git a/images/whitespace.jpg b/images/whitespace.jpg new file mode 100644 index 0000000..b1b13a1 Binary files /dev/null and b/images/whitespace.jpg differ diff --git a/images/wikip.png b/images/wikip.png new file mode 100644 index 0000000..781c6f2 Binary files /dev/null and b/images/wikip.png differ diff --git a/images/wolfram.png b/images/wolfram.png new file mode 100644 index 0000000..bf35935 Binary files /dev/null and b/images/wolfram.png differ diff --git a/main.cpp b/main.cpp index 687746d..3a7f115 100644 --- a/main.cpp +++ b/main.cpp @@ -4,16 +4,22 @@ #include "scriptlauncher.h" #include "iconscriptlauncher.h" #include +#include #include #include #include #include +#include +#include "msmapp.h" +#include "filereader.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); - QApplication::setWindowIcon(QIcon(":/images/mycroft-plasma-appicon.svg")); + QApplication::setWindowIcon(QIcon(":/images/mycroft-plasma-appicon.png")); qmlRegisterType("MycroftLauncher", 1, 0, "ScriptLauncher"); + qmlRegisterType("MsmInstaller", 1, 0, "MsmApp"); + qmlRegisterType("MsmFileReader", 1, 0, "FileReader"); if (!QSystemTrayIcon::isSystemTrayAvailable()) { QMessageBox::critical(0, QObject::tr("Systray"), @@ -23,6 +29,8 @@ int main(int argc, char *argv[]) } QApplication::setQuitOnLastWindowClosed(false); iconscriptlauncher imlauncher; + QWebSocket imsocket; + QQuickStyle::setStyle("Material"); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); QObject *root = 0; @@ -44,7 +52,7 @@ int main(int argc, char *argv[]) QSystemTrayIcon *trayIcon = new QSystemTrayIcon(root); trayIcon->setContextMenu(trayIconMenu); - trayIcon->setIcon(QIcon(":/images/mycroft-plasma-appicon.svg")); + trayIcon->setIcon(QIcon(":/images/mycroft-plasma-appicon.png")); trayIcon->show(); trayIcon->connect(restoreAction, SIGNAL(triggered()), root, SLOT(showNormal())); } diff --git a/main.qml b/main.qml index ef54a45..e3833e9 100644 --- a/main.qml +++ b/main.qml @@ -1,274 +1,166 @@ -import QtQuick 2.0 +import QtQuick 2.5 +import QtQuick.Window 2.0 import QtQml.Models 2.2 -import QtQuick.Controls 1.0 -import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.1 import Qt.WebSockets 1.0 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls.Material 2.0 import MycroftLauncher 1.0 +import MsmInstaller 1.0 +import MsmFileReader 1.0 +import Qt.labs.settings 1.0 ApplicationWindow { id: root signal submitTextField(string text) signal senddbussignal(string text) minimumWidth: 450 - minimumHeight: 250 - maximumHeight: minimumHeight - maximumWidth: minimumWidth + minimumHeight: 300 visible: true color: "#1a1a1a" title: qsTr("Mycroft QtApplication") - property alias textinputsize: qboxoutput.font.pixelSize - - ScriptLauncher { id: myLauncher } - - WebSocket { - id: socket - url: settingswidgetloader.wspath - onTextMessageReceived: { - //console.log(message) - var somestring = JSON.parse(message) - var msgType = somestring.type; - if (msgType === "speak") { - var post = somestring.data.utterance; - var componentweather = Qt.createComponent("Weather.qml") - var loadwin = componentweather.createObject(weatherloader) - - var componentstock = Qt.createComponent("Stockwidget.qml") - var loadstock = componentstock.createObject(stockwidgetloader) - suggestionswidgetloader.visible = false; - - //console.log(post) - qboxoutput.text = post; - if (qboxoutput.text.indexOf("Register") != -1 && qboxoutput.text.indexOf("your") != -1 || qboxoutput.text.indexOf("Log") != -1 && qboxoutput.text.indexOf("in") != -1){ - regisbutton.visible=true; - } - else { - regisbutton.visible=false; - } - - if (qboxoutput.text.indexOf("With") != -1 && qboxoutput.text.indexOf("a") != -1 && qboxoutput.text.indexOf("high") && qboxoutput.text.indexOf("of") != -1 && qboxoutput.text.indexOf("degrees") != -1) { - var totalnumbclimstatementa = qboxoutput.text.match(/\d/g) - - var hightempclimstatementa = totalnumbclimstatementa.toString().substring(0, 3) - hightempclimstatementa = hightempclimstatementa.replace(/\,/g,"") - //console.log(hightempclimstatementa) - - var lowtempclimstatementa = totalnumbclimstatementa.toString().substring(4,7) - lowtempclimstatementa = lowtempclimstatementa.replace(/\,/g,"") - //console.log(lowtempclimstatementa) - - var currenttempclimstatementa = totalnumbclimstatementa.toString().substring(8,11) - currenttempclimstatementa = currenttempclimstatementa.replace(/\,/g,"") - //console.log(currenttempclimstatementa) - - loadwin.currentweatherparam = currenttempclimstatementa - loadwin.highweatherparam = hightempclimstatementa - loadwin.lowweatherparam = lowtempclimstatementa - weatherloader.visible = true; - qboxoutput.visible = false; - - if (currenttempclimstatementa <= "60") { - loadwin.weatherbackgroundimage = "images/snow.gif" - } - - else if (currenttempclimstatementa <= "60" && qboxoutput.text.indexOf("mist") != -1 || qboxoutput.text.indexOf("light") != -1 && qboxoutput.text.indexOf("intensity") != -1 && qboxoutput.text.indexOf("drizzle") != -1) { - loadwin.weatherbackgroundimage = "images/rain.gif" - } - - else if (currenttempclimstatementa >= "61") { - loadwin.weatherbackgroundimage = "images/clearsky.gif" - } - - else if (currenttempclimstatementa >= "61" && qboxoutput.text.indexOf("mist") != -1 || qboxoutput.text.indexOf("light") != -1 && qboxoutput.text.indexOf("intensity") != -1 && qboxoutput.text.indexOf("drizzle") != -1) { - loadwin.weatherbackgroundimage = "images/rain.gif" - } - - } - - else if (qboxoutput.text.indexOf("It's") != -1 && qboxoutput.text.indexOf("currently") != -1 && qboxoutput.text.indexOf("degrees") != -1 && qboxoutput.text.indexOf("Today's") != -1 && qboxoutput.text.indexOf("forecast") != -1 && qboxoutput.text.indexOf("high") != -1 && qboxoutput.text.indexOf("low") != -1) { - - var totalnumbclimstatementb = qboxoutput.text.match(/\d/g) - - var hightempclimstatementb = totalnumbclimstatementb.toString().substring(4,7) - hightempclimstatementb = hightempclimstatementb.replace(/\,/g,"") - //console.log(hightempclimstatementb) //current - - var lowtempclimstatementb = totalnumbclimstatementb.toString().substring(8,11) - lowtempclimstatementb = lowtempclimstatementb.replace(/\,/g,"") - //console.log(lowtempclimstatementb) //high - - var currenttempclimstatementb = totalnumbclimstatementb.toString().substring(0,3) - currenttempclimstatementb = currenttempclimstatementb.replace(/\,/g,"") - //console.log(currenttempclimstatementb) //low - - loadwin.currentweatherparam = currenttempclimstatementb - loadwin.highweatherparam = hightempclimstatementb - loadwin.lowweatherparam = lowtempclimstatementb - weatherloader.visible = true; - qboxoutput.visible = false; - - if (currenttempclimstatementa <= "60") { - loadwin.weatherbackgroundimage = "images/snow.gif" - } - - else if (currenttempclimstatementa <= "60" && qboxoutput.text.indexOf("mist") != -1 || qboxoutput.text.indexOf("light") != -1 && qboxoutput.text.indexOf("intensity") != -1 && qboxoutput.text.indexOf("drizzle") != -1) { - loadwin.weatherbackgroundimage = "images/rain.gif" - } - - else if (currenttempclimstatementa >= "61") { - loadwin.weatherbackgroundimage = "images/clearsky.gif" - } - - else if (currenttempclimstatementa >= "61" && qboxoutput.text.indexOf("mist") != -1 || qboxoutput.text.indexOf("light") != -1 && qboxoutput.text.indexOf("intensity") != -1 && qboxoutput.text.indexOf("drizzle") != -1) { - loadwin.weatherbackgroundimage = "images/rain.gif" - } - - - } - - else if (qboxoutput.text.indexOf("Right") != -1 && qboxoutput.text.indexOf("now") != -1 && qboxoutput.text.indexOf("and") != -1 && qboxoutput.text.indexOf("degrees") != -1 && qboxoutput.text.indexOf("for") != -1 && qboxoutput.text.indexOf("a") != -1 && qboxoutput.text.indexOf("high") != -1 && qboxoutput.text.indexOf("low") != -1) { - - var totalnumbclimstatementc = qboxoutput.text.match(/\d/g) - - var hightempclimstatementc = totalnumbclimstatementc.toString().substring(4,7) - hightempclimstatementc = hightempclimstatementc.replace(/\,/g,"") - //console.log(hightempclimstatementc) //low - - var lowtempclimstatementc = totalnumbclimstatementc.toString().substring(8,11) - lowtempclimstatementc = lowtempclimstatementc.replace(/\,/g,"") - //console.log(lowtempclimstatementc) //current - - var currenttempclimstatementc = totalnumbclimstatementc.toString().substring(0,3) - currenttempclimstatementc = currenttempclimstatementc.replace(/\,/g,"") - //console.log(currenttempclimstatementc) //high - - loadwin.currentweatherparam = currenttempclimstatementc - loadwin.highweatherparam = hightempclimstatementc - loadwin.lowweatherparam = lowtempclimstatementc - weatherloader.visible = true; - qboxoutput.visible = false; - - if (currenttempclimstatementa <= "60") { - loadwin.weatherbackgroundimage = "images/snow.gif" - } + property alias cbwidth: rectangle2.width + property var smintent + property var dataContent + property var skillList: [] + property alias strscript: textField1.text + property alias stpscript: textField2.text + property alias wspath: textField3.text + + Material.theme: Material.Dark + Material.accent: Material.Cyan + + property bool fullscreen: false + onFullscreenChanged: root.visibility = (fullscreen ? Window.FullScreen : Window.Windowed) + + function filterSpeak(msg){ + convoLmodel.append({ + "itemType": "NonVisual", + "InputQuery": msg + }) + inputlistView.positionViewAtEnd(); + } - else if (currenttempclimstatementa <= "60" && qboxoutput.text.indexOf("mist") != -1 || qboxoutput.text.indexOf("light") != -1 && qboxoutput.text.indexOf("intensity") != -1 && qboxoutput.text.indexOf("drizzle") != -1) { - loadwin.weatherbackgroundimage = "images/rain.gif" - } + function filterincoming(intent, metadata) { + var intentVisualArray = ['WeatherSkill:CurrentWeatherIntent']; + var itemType - else if (currenttempclimstatementa >= "61") { - loadwin.weatherbackgroundimage = "images/clearsky.gif" + if (intentVisualArray.indexOf(intent) !== -1) { + switch (intent){ + case "WeatherSkill:CurrentWeatherIntent": + itemType = "CurrentWeather" + break; } - else if (currenttempclimstatementa >= "61" && qboxoutput.text.indexOf("mist") != -1 || qboxoutput.text.indexOf("light") != -1 && qboxoutput.text.indexOf("intensity") != -1 && qboxoutput.text.indexOf("drizzle") != -1) { - loadwin.weatherbackgroundimage = "images/rain.gif" + convoLmodel.append({"itemType": itemType, "itemData": metadata}) } - } - - else if (qboxoutput.text.indexOf("Tomorrow,") != -1 && qboxoutput.text.indexOf("will") != -1 && qboxoutput.text.indexOf("have") != -1 && qboxoutput.text.indexOf("a") != -1 && qboxoutput.text.indexOf("high") != -1 && qboxoutput.text.indexOf("low") != -1 && qboxoutput.text.indexOf("of") != -1) { - - var totalnumbclimstatementd = qboxoutput.text.match(/\d/g) - - var hightempclimstatementd = totalnumbclimstatementd.toString().substring(0, 3) - hightempclimstatementd = hightempclimstatementd.replace(/\,/g,"") - //console.log(hightempclimstatementd) - - var lowtempclimstatementd = totalnumbclimstatementd.toString().substring(4,7) - lowtempclimstatementd = lowtempclimstatementd.replace(/\,/g,"") - //console.log(lowtempclimstatementd) - - var currenttempclimstatementd = totalnumbclimstatementd.toString().substring(8,11) - currenttempclimstatementd = currenttempclimstatementd.replace(/\,/g,"") - //console.log(currenttempclimstatementd) - - loadwin.currentweatherparam = currenttempclimstatementd - loadwin.highweatherparam = hightempclimstatementd - loadwin.lowweatherparam = lowtempclimstatementd - loadwin.forcasttext = "Forecast" - loadwin.forcastdegree = " " - weatherloader.visible = true; - qboxoutput.visible = false; - } - - - else if (qboxoutput.text.indexOf("Tomorrow,") != -1 && qboxoutput.text.indexOf("it") != -1 && qboxoutput.text.indexOf("will") != -1 && qboxoutput.text.indexOf("be") != -1 && qboxoutput.text.indexOf("a") != -1 && qboxoutput.text.indexOf("high") != -1 && qboxoutput.text.indexOf("low") != -1 && qboxoutput.text.indexOf("of") != -1) { - - var totalnumbclimstatemente = qboxoutput.text.match(/\d/g) + else { + convoLmodel.append({"itemType": "WebViewType", "InputQuery": metadata.url}) + } + } - var hightempclimstatemente = totalnumbclimstatemente.toString().substring(0, 3) - hightempclimstatemente = hightempclimstatemente.replace(/\,/g,"") - //console.log(hightempclimstatemente) + function clearList() { + inputlistView.clear() + } - var lowtempclimstatemente = totalnumbclimstatemente.toString().substring(4,7) - lowtempclimstatemente = lowtempclimstatemente.replace(/\,/g,"") - //console.log(lowtempclimstatemente) + function getFileExtenion(filePath){ + var ext = filePath.split('.').pop(); + return ext; + } - var currenttempclimstatemente = totalnumbclimstatemente.toString().substring(8,11) - currenttempclimstatemente = currenttempclimstatemente.replace(/\,/g,"") - //console.log(currenttempclimstatemente) + function validateFileExtension(filePath) { + var ext = filePath.split('.').pop(); + return ext === "jpg" || ext === "png" || ext === "jpeg" || ext === 'mp3' || ext === 'wav' || ext === 'mp4' + } - loadwin.currentweatherparam = currenttempclimstatemente - loadwin.highweatherparam = hightempclimstatemente - loadwin.lowweatherparam = lowtempclimstatemente - loadwin.forcasttext = "Forecast" - loadwin.forcastdegree = " " - weatherloader.visible = true; - qboxoutput.visible = false; + function getSkillByName(skillName){ + var tempSN=[]; + for(var i = 0; i Skill:' + Skill) + } + + Rectangle { + id: skilltipsimage + anchors.left: parent.left + anchors.top: innerskllname.bottom + anchors.bottom: parent.bottom + width: 16 + color: "#222" + + Image { + id: innerskImg + source: Pic + width: 16 + height: 16 + anchors.centerIn: parent + } + } + + Rectangle { + id: skilltipsinner + anchors.left: skilltipsimage.right + anchors.leftMargin: 10 + anchors.right: parent.right + color: "#222" + anchors.top: innerskllname.bottom + anchors.bottom: parent.bottom + + Column{ + id: innerskillscolumn + spacing: 2 + + Label {wrapMode: Text.WordWrap; width: root.width; text: qsTr('Command: ' + CommandList.get(0).Commands)} + Label {wrapMode: Text.WordWrap; width: root.width; text: qsTr('Command: ' + CommandList.get(1).Commands)} + } + } + } + } + } + } + + ListView { + id: skillslistmodelview + anchors.top: parent.top + anchors.topMargin: 5 + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + model: SkillModel{} + delegate: skillDelegate + spacing: 4 + focus: false + interactive: true + clip: true; + } + + } } + Page { + id: settingspage + Rectangle { - id: stockwidgetloader + id: rectangle1 + color: "#1e4e62" anchors.fill: parent - visible: false; + + Flickable { + id: rect1flickable + anchors.fill: parent + contentHeight: parent.height + 150 + contentWidth: parent.width + + Item { + id: settingstabcolumntop3 + anchors.top: parent.top + anchors.topMargin: 40 + + Switch { + id: welcomeintroswitch + x: 0 + y: -25 + height: 25 + text: qsTr("Enable / Disable Intro Animation") + checked: true + + } + + } + + + Item { + id: settingstabcolumnbottom + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.top: settingstabcolumntop3.bottom + anchors.topMargin: 50 + + Label { + id: fontsizelabelfld + x: 0 + y: -38 + text: qsTr("Text Font Size: ") + font.bold: true + } + + TextField { + id: fontsizetextfld + width: 28 + height: 46 + text: qsTr("12") + anchors.left: fontsizelabelfld.right + anchors.verticalCenter: fontsizelabelfld.verticalCenter + anchors.leftMargin: 6 + } + + Button { + id: button1 + width: 102 + height: 42 + text: qsTr("Apply") + anchors.verticalCenterOffset: -33 + anchors.verticalCenter: fontsizetextfld.verticalCenter + anchors.left: label2.right + anchors.leftMargin: 177 + + onClicked: { + textinputsize = fontsizetextfld.text + } + } + + TextField { + id: textField1 + width: 274 + height: 43 + text: qsTr("/home/Aix/mycroft-core/mycroft.sh") + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenterOffset: 162 + anchors.horizontalCenter: fontsizetextfld.horizontalCenter + anchors.top: fontsizetextfld.bottom + anchors.topMargin: 2 + } + + TextField { + id: textField2 + width: 275 + height: 40 + text: qsTr("/home/Aix/mycroft-core/mycroft.sh") + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenter: textField1.horizontalCenter + anchors.top: textField1.bottom + anchors.topMargin: -1 + } + + TextField { + id: textField3 + width: 273 + height: 40 + text: qsTr("ws://0.0.0.0:8181/core") + anchors.horizontalCenterOffset: 1 + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenter: textField1.horizontalCenter + anchors.top: textField2.bottom + anchors.topMargin: -3 + } + + TextField { + id: textField4 + width: 273 + height: 40 + text: qsTr("/home/aix/mycroft-core/msm/msm") + anchors.horizontalCenterOffset: 1 + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenter: textField1.horizontalCenter + anchors.top: textField3.bottom + anchors.topMargin: -3 + } + + TextField { + id: textField5 + width: 273 + height: 40 + text: qsTr("search image url") + anchors.horizontalCenterOffset: 1 + horizontalAlignment: Text.AlignHCenter + anchors.horizontalCenter: textField1.horizontalCenter + anchors.top: textField4.bottom + anchors.topMargin: -3 + } + + Label { + id: label1 + text: qsTr("Mycroft Start Script") + font.bold: true + anchors.top: fontsizelabelfld.bottom + anchors.topMargin: 28 + } + + Label { + id: label2 + x: -10 + text: qsTr("Mycroft Stop Script") + font.bold: true + anchors.horizontalCenter: label1.horizontalCenter + anchors.top: label1.bottom + anchors.topMargin: 14 + } + + Label { + id: label3 + text: qsTr("Mycroft WS IP") + textFormat: Text.AutoText + font.bold: true + anchors.top: label2.bottom + anchors.topMargin: 18 + } + + Label { + id: label4 + text: qsTr("MSM Installer Script") + textFormat: Text.AutoText + font.bold: true + anchors.top: label3.bottom + anchors.topMargin: 18 + } + + Label { + id: label5 + text: qsTr("Custom Recognition") + textFormat: Text.AutoText + font.bold: true + anchors.top: label4.bottom + anchors.topMargin: 18 + } + + } + } + Settings { + id: innerset + property alias wsip: textField3.text + property alias customlocstart: textField1.text + property alias customlocstop: textField2.text + property alias fntsize: fontsizetextfld.text + property alias msmloc: textField4.text + property alias customrecog: textField5.text + } + } + } - Image { - id: image1 - x: 156 - y: 35 - opacity: 0.1 - width: 138 - height: 100 - source: "images/background.png" - - SequentialAnimation { - id: anim1 - PropertyAnimation { - target: image1 - property: "opacity" - to: "0.6" - duration: 1 - } + Page { + id: installerPage - PropertyAnimation { - target: image1 - property: "opacity" - to: "0.1" - duration: 1000 - } + Item { + id: msmtabtopbar + width: parent.width + anchors.left: parent.left + anchors.right: parent.right + height: 50 - } + TextField { + id: msmsearchfld + anchors.left: parent.left + anchors.top: parent.top + anchors.topMargin: 5 + anchors.bottom: parent.bottom + anchors.right: getskillsbx.left + placeholderText: qsTr("Search Skills") + + onTextChanged: { + if(text.length > 0 ) { + msmskillsModel.applyFilter(text.toLowerCase()); + } else { + msmskillsModel.reload(); + } } + } + ToolButton { + id: getskillsbx + anchors.right: parent.right + anchors.top: parent.top + anchors.bottom: parent.bottom + text: "\u27F3" + flat: true + width: Math.round(30) + height: width + z: 102 - Text { - id: qboxinput - x: 0 - y: 18 - width: 450 - height: 60 - color: "#ffffff" - text: qsTr(" ") - textFormat: Text.PlainText - elide: Text.ElideMiddle - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignTop - font.pixelSize: 12 - wrapMode: Text.WordWrap + onClicked: { + msmskillsModel.clear(); + refreshAllSkills(); + } + } } - Text { - id: qboxoutput - x: 0 - y: 50 - width: 450 - height:60 - color: "#ffffff" - wrapMode: Text.WordWrap - elide: Text.ElideMiddle - text: qsTr(" ") - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - font.pixelSize: 12 + ListModel { + id: msmskillsModel + + Component.onCompleted: { + reload(); + //console.log('Completing too early?'); + } + + function reload() { + var skList = getAllSkills(); + msmskillsModel.clear(); + for( var i=0; i < skList.length ; ++i ) { + msmskillsModel.append(skList[i]); + } + } + + function applyFilter(skName) { + var skList = getSkillByName(skName); + msmskillsModel.clear(); + for( var i=0; i < skList.length ; ++i ) { + msmskillsModel.append(skList[i]); + } + } } - Button { - id: regisbutton - text:"Visit Mycroft@Home" - visible: false; - anchors.top: qboxoutput.bottom - anchors.topMargin: -50 - anchors.horizontalCenter: rectangleresultbox.horizontalCenter - onClicked: Qt.openUrlExternally("http://home.mycroft.ai"); + ListView { + id: msmlistView + anchors.top: msmtabtopbar.bottom + anchors.topMargin: 5 + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + model: msmskillsModel + delegate: MsmView{} + spacing: 4 + focus: false + interactive: true + clip: true; + } + + } - } - Rectangle { + } +} + + footer: Rectangle { id: rectanglebottombar - x: 0 - y: 214 - width: 450 - height: 36 + //anchors.bottom: parent.bottom + width: parent.width + height: 40 color: "#1b1b1b" radius: 0 border.color: "#80000000" @@ -484,40 +720,27 @@ ApplicationWindow { TextField { id: qinput - x: 1 - y: 4 - width: 323 - height: 27 + anchors.left: parent.left + anchors.right: qinputbutton.left + height: parent.height placeholderText: qsTr("Enter Query or Say 'Hey Mycroft'") onAccepted: { rectangleresultbox.visible = true; - suggestionswidgetloader.visible = false; var socketmessage = {}; socketmessage.type = "recognizer_loop:utterance"; socketmessage.data = {}; socketmessage.data.utterances = [qinput.text]; socket.sendTextMessage(JSON.stringify(socketmessage)); - //qinput.text = - anim1.running = true } } Button { id: qinputbutton - x: 322 - y: 1 - width: 128 - height: 33 - text: qsTr(" ") - activeFocusOnPress: false - iconSource: "images/appicon.png" - - style: ButtonStyle { - background: Rectangle { - color: "#0b0b0b"; - - } - } + width: 150 + anchors.right: parent.right + height: parent.height + text: qsTr("Enter Query") + //Material.theme: Material.Dark MouseArea { id: mouseArea3 @@ -528,184 +751,175 @@ ApplicationWindow { hoverEnabled: false onClicked: { rectangleresultbox.visible = true; - suggestionswidgetloader.visible = false; var socketmessage = {}; socketmessage.type = "recognizer_loop:utterance"; socketmessage.data = {}; socketmessage.data.utterances = [qinput.text]; socket.sendTextMessage(JSON.stringify(socketmessage)); - //qinput.text = "" - anim1.running = true - } - - Text { - id: text1 - x: 37 - y: 9 - width: 75 - height: 12 - color: "#ffffff" - text: qsTr(" Enter Query") - font.pixelSize: 12 } } } } - Rectangle { + header: Rectangle { id: rectangletopbar - x: 0 - y: 0 - width: 450 + anchors.left: parent.left + anchors.right: parent.right height: 37 color: "#1d1d1d" border.width: 0 border.color: "#80000000" Button { - id: startmycservice - x: 0 - y: 0 - width: 154 + id: fullscreenbutton + anchors.left: parent.left + anchors.leftMargin: 2 + width: 32 height: 36 - text: qsTr("") + onClicked: fullscreen = !fullscreen + + Image { + id: fullscreenimg + source: "images/view-fullscreen.svg" + width: 16 + height: 16 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + } - style: ButtonStyle { - background: Rectangle { - color: "#0b0b0b"; + SwitchButton { + id: startmycservice + checked: false + height: 36 + anchors.left: fullscreenbutton.right + anchors.leftMargin: 5 + + onClicked: { + if (startmycservice.checked === true) { + var strt = innerset.customlocstart + " " + "start" + //console.log(strt) + myLauncher.launchScript(strt) + welcomewidgetloader.active = false; + delay(12000, function() { + socket.active = true + }) + } + if (startmycservice.checked === false) { + var stpsc = innerset.customlocstop + " " + "stop" + myLauncher.launchScript(stpsc) + welcomewidgetloader.active = true; + socket.active = false } } + } + Rectangle { + id: seperaterlinea + width: 1 + anchors.left: startmycservice.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: 5 + color: "#99cccccc" + } - // Settings { - // id: getstngs - // visible: false - //} - - MouseArea { - id: mouseArea1 - x: 0 - y: 0 - width: 149 - height: 36 - hoverEnabled: false - - onClicked: { - var strt = settingswidgetloader.strscript + " " + "start" - myLauncher.launchScript(strt) - welcomewidgetloader.active = false; - suggestionswidgetloader.visible = true; - //connectws.text = qsTr("Starting..."); - anim1.running = true - delay(12000, function() { - socket.active = true - //connectws.text = qsTr("Connected") - anim1.running = true - }) - } + Text { + id: connectws + x: 304 + y: 0 + anchors.top: parent.top + anchors.topMargin: 10 + anchors.left: seperaterlinea.right + anchors.leftMargin: 10 + color: "#ffffff" + height: 36 + text: qsTr("Disabled") + } - Text { - id: text2 - x: 8 - y: 11 - width: 133 - height: 17 - color: "#ffffff" - text: qsTr("Start Mycroft Service") - horizontalAlignment: Text.AlignHCenter - font.pixelSize: 12 - } + Rectangle { + id: seperaterlineb + width: 1 + anchors.left: connectws.right + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.leftMargin: 10 + color: "#99cccccc" + } - } + TopBarAnim { + id: midbarAnim + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: 7 + anchors.left: seperaterlineb.left + anchors.right: bar.right + height: parent.height } - Button { - id: stopmycservice - x: 155 - y: 0 - width: 148 + TabBar { + id: bar + width: 138 + anchors.right: parent.right height: 36 - text: qsTr(" ") + currentIndex: swipeView.currentIndex - style: ButtonStyle { - background: Rectangle { - color: "#0b0b0b"; + TabButton { + width: 32 + height: 36 + Image { + id: tabimage1 + source: "images/home.svg" + width: 16 + height: 16 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + } + + TabButton { + width: 32 + height: 36 + Image { + id: tabimage2 + source: "images/hint.svg" + width: 16 + height: 16 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter } } - MouseArea { - id: mouseArea2 - x: 0 - y: 0 - width: 143 + TabButton { + width: 32 height: 36 - hoverEnabled: false - - onClicked: { - var stpsc = settingswidgetloader.stpscript + " " + "stop" - //console.log(stpsc) - myLauncher.launchScript(stpsc) - welcomewidgetloader.active = true; - suggestionswidgetloader.visible = false; - rectangleresultbox.visible = false; - //connectws.text = qsTr("Stopped"); - socket.active = false - anim1.running = true + Image { + id: tabimage3 + source: "images/settings.svg" + width: 16 + height: 16 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter } + } - Text { - id: text3 - x: 12 - y: 11 - width: 122 - height: 15 - color: "#ffffff" - text: qsTr("Stop Mycroft Service") - font.pixelSize: 12 + TabButton { + width: 32 + height: 36 + Image { + id: tabimage4 + source: "images/installer.svg" + width: 16 + height: 16 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } } } } - Text { - id: connectws - x: 304 - y: 0 - anchors.top: parent.top - anchors.topMargin: 10 - anchors.left: stopmycservice.right - anchors.leftMargin: 10 - color: "#ffffff" - width: 86 - height: 36 - text: qsTr("Not Started") - } - Button { - id: apsettings - width: 50 - height: 36 - anchors.left: connectws.right - iconSource: "images/settings-icon.png" - iconName: "settings-icon.png" - - onClicked: { - if (settingswidgetloader.visible === false) { - welcomewidgetloader.active = false - suggestionswidgetloader.active = false - rectangleresultbox.visible = false - settingswidgetloader.visible = true - } - else if (settingswidgetloader.visible === true) - { - settingswidgetloader.visible = false - suggestionswidgetloader.active = true - rectangleresultbox.visible = true - } - } - } - } } diff --git a/msmapp.cpp b/msmapp.cpp new file mode 100644 index 0000000..028b865 --- /dev/null +++ b/msmapp.cpp @@ -0,0 +1,19 @@ +#include "msmapp.h" + +#include + +MsmApp::MsmApp(QObject *parent) : + QObject(parent), + m_process(new QProcess(this)) +{ +} + +QString MsmApp::msmapp(const QString &program) +{ + m_process->start(program); + m_process->waitForFinished(-1); + QByteArray bytes = m_process->readAllStandardOutput(); + QString output = QString::fromLocal8Bit(bytes); + return output; +} + diff --git a/msmapp.h b/msmapp.h new file mode 100644 index 0000000..2afb2f7 --- /dev/null +++ b/msmapp.h @@ -0,0 +1,18 @@ +#ifndef MSMAPP_H +#define MSMAPP_H + +#include +#include + +class MsmApp : public QObject +{ + Q_OBJECT +public: + explicit MsmApp(QObject *parent = 0); + Q_INVOKABLE QString msmapp(const QString &program); + +private: + QProcess *m_process; +}; + +#endif // MSMAPP_H diff --git a/mycroft-qtapplication.pro b/mycroft-qtapplication.pro index 7df0dd9..98846b3 100644 --- a/mycroft-qtapplication.pro +++ b/mycroft-qtapplication.pro @@ -1,11 +1,14 @@ TEMPLATE = app CONFIG += c++11 -QT += core qml quick widgets +QT += core qml quick widgets quickcontrols2 +QT += webkit websockets xml SOURCES += main.cpp \ scriptlauncher.cpp \ - iconscriptlauncher.cpp + iconscriptlauncher.cpp \ + msmapp.cpp \ + filereader.cpp RESOURCES += qml.qrc @@ -17,4 +20,9 @@ include(deployment.pri) HEADERS += \ scriptlauncher.h \ - iconscriptlauncher.h + iconscriptlauncher.h \ + msmapp.h \ + filereader.h + +DISTFILES += \ + qtquickcontrols2.conf diff --git a/mycroft-qtapplication.pro.user b/mycroft-qtapplication.pro.user index bc09f3a..93fdfd1 100644 --- a/mycroft-qtapplication.pro.user +++ b/mycroft-qtapplication.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {eda1ae5f-5baa-464c-9338-25a2454994b8} + {0d466d30-d35a-45de-b042-d2364e70daa1} ProjectExplorer.Project.ActiveTarget @@ -61,19 +61,19 @@ Desktop Desktop - {309709de-0feb-4c45-9daf-336eb8a326a1} + {4c199ca8-6d20-4c12-a700-ac2834219182} 0 0 0 - /home/aix/build-mycroft-plasma-qtapplication-Desktop-Debug + /home/aix/build-mycroft-qtapplication-Desktop-Debug true qmake QtProjectManager.QMakeBuildStep - false + true false false @@ -126,7 +126,7 @@ true - /home/aix/build-mycroft-plasma-qtapplication-Desktop-Release + /home/aix/build-mycroft-qtapplication-Desktop-Release true @@ -185,7 +185,67 @@ 0 true - 2 + + /home/aix/build-mycroft-qtapplication-Desktop-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 0 @@ -244,13 +304,13 @@ mycroft-qtapplication - Qt4ProjectManager.Qt4RunConfiguration:/home/aix/Projects/Mycroft-Ai-QtApplication/mycroft-qtapplication.pro + Qt4ProjectManager.Qt4RunConfiguration:/home/aix/Mycroft-Ai-QtApplication/mycroft-qtapplication.pro true mycroft-qtapplication.pro false - /home/aix/build-mycroft-plasma-qtapplication-Desktop-Debug + 3768 false true diff --git a/qml.qrc b/qml.qrc index 4f5eb13..896addc 100644 --- a/qml.qrc +++ b/qml.qrc @@ -2,10 +2,7 @@ main.qml images/trayicon.png - Weather.qml - Stockwidget.qml Options.qml - Suggestions.qml Welcome.qml images/10.jpg images/appicon.png @@ -19,7 +16,6 @@ images/mleftanim.png images/mleftmidanim.png images/mleftsmallanim.png - images/mmidanim.png images/mycicon.png images/Mycroft-Logo-square.png images/rain.gif @@ -29,5 +25,28 @@ images/stocks.png images/weathericon.png images/mycroft-plasma-appicon.svg + SimpleMessageType.qml + WebViewType.qml + images/hint.svg + images/installer.svg + images/settings.svg + images/home.svg + SkillModel.qml + images/alarm.png + images/desktop.png + images/dateandtime.png + images/joke.png + images/view-fullscreen.svg + images/whitespace.jpg + SwitchButton.qml + TopBarAnim.qml + MsmView.qml + images/mmidanim.png + images/wikip.png + images/wolfram.png + images/weather.png + images/spell.png + images/climatesc.jpg + images/mycroft-plasma-appicon.png diff --git a/qtquickcontrols2.conf b/qtquickcontrols2.conf new file mode 100644 index 0000000..98a0c8e --- /dev/null +++ b/qtquickcontrols2.conf @@ -0,0 +1,12 @@ +[Controls] +Style=Material + +[Universal] +Theme=Dark +Accent=Cyan +Primary=BlueGrey + +[Material] +Theme=Dark +Accent=Cyan +Primary=BlueGrey