Skip to content

Commit

Permalink
Merge pull request #1 from BenjaminHCCarr/osx
Browse files Browse the repository at this point in the history
Merge to keep current
  • Loading branch information
BenjaminHCCarr authored Sep 7, 2017
2 parents 143e805 + cffb6fc commit 0a870a3
Show file tree
Hide file tree
Showing 43 changed files with 2,232 additions and 1,237 deletions.
112 changes: 112 additions & 0 deletions MsmView.qml
Original file line number Diff line number Diff line change
@@ -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
// }

}
40 changes: 21 additions & 19 deletions Options.qml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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
Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
# 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:

#### QT5 Requirements:
* 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)

Expand Down
35 changes: 35 additions & 0 deletions SimpleMessageType.qml
Original file line number Diff line number Diff line change
@@ -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"

}
}
}
}
76 changes: 76 additions & 0 deletions SkillModel.qml
Original file line number Diff line number Diff line change
@@ -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"}
]
}
}
5 changes: 5 additions & 0 deletions SplitView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import QtQuick 2.0

Item {

}
Loading

0 comments on commit 0a870a3

Please sign in to comment.