Skip to content

Commit 0a870a3

Browse files
Merge pull request #1 from BenjaminHCCarr/osx
Merge to keep current
2 parents 143e805 + cffb6fc commit 0a870a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2232
-1237
lines changed

MsmView.qml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import QtQuick 2.5
2+
import QtQuick.Controls 2.0
3+
import QtQuick.Controls.Material 2.0
4+
import QtQuick.Layouts 1.1
5+
6+
Rectangle {
7+
id: skillcontent
8+
width: cbwidth
9+
anchors { left: parent.left; right: parent.right }
10+
height: 60
11+
border.width: 0
12+
border.color: "lightsteelblue"
13+
radius: 2
14+
color: "#222"
15+
16+
// function getSkillInfoLocal() {
17+
// var customFold = '/opt/mycroft/skills/'
18+
// var skillPath = customFold + model.name +'/__init__.py'
19+
// if(myReader.file_exists_local(skillPath)){
20+
// msminstllbtn.visible = false
21+
// instlabel.color = "Green"
22+
// instlabel.text = "Installed"
23+
// }
24+
// else {
25+
// //console.log(skillPath)
26+
// instlabel.text = "Not Installed"
27+
// }
28+
// }
29+
30+
function exec(msmparam) {
31+
var bscrpt = innerset.msmloc
32+
return launchinstaller.msmapp("x-terminal-emulator --hold -e" + " " + bscrpt + " install " + model.url)
33+
}
34+
35+
Component.onCompleted: {
36+
//getSkillInfoLocal()
37+
//msmSkillInstallProgBar.visible = false;
38+
}
39+
40+
Column {
41+
id: skillcolumn
42+
width: parent.width / 80
43+
44+
Label {
45+
font.capitalization: Font.AllUppercase
46+
wrapMode: Text.WordWrap
47+
text: model.name
48+
}
49+
50+
Label {
51+
font.pointSize: 8
52+
wrapMode: Text.WordWrap
53+
text: model.url
54+
}
55+
}
56+
57+
// Label {
58+
// id: instlabel
59+
// font.pointSize: 8
60+
// wrapMode: Text.WordWrap
61+
// anchors.right: msminstllbtn.left
62+
// anchors.rightMargin: 5
63+
// text: ""
64+
// }
65+
66+
Button {
67+
anchors.right: parent.right
68+
anchors.rightMargin: 10
69+
anchors.verticalCenter: parent.verticalCenter
70+
id: msminstllbtn
71+
visible: true
72+
text: "\u25BC Install"
73+
flat: true
74+
checked: false
75+
focus: false
76+
width: 120
77+
height: 42
78+
Material.background: Material.Grey
79+
Material.foreground: Material.BlueGrey
80+
81+
onClicked: {
82+
console.log(model.url)
83+
var msmprogress = exec()
84+
// var getcurrentprogress = msmprogress.split("\n")
85+
// console.log(getcurrentprogress);
86+
// if(getcurrentprogress.indexOf("Cloning repository") != -1)
87+
// {
88+
// msmSkillInstallProgBar.visible = true;
89+
// msmSkillInstallProgBar.indeterminate = true;
90+
// }
91+
// if(getcurrentprogress.indexOf("Skill installed!") != -1)
92+
// {
93+
// msmSkillInstallProgBar.indeterminate = false;
94+
// msmSkillInstallProgBar.value = 100;
95+
// instlabel.color = "Green"
96+
// instlabel.text = "Installed"
97+
// }
98+
}
99+
100+
}
101+
102+
// ProgressBar {
103+
// anchors.right: parent.right
104+
// anchors.rightMargin: 2
105+
// anchors.bottom: parent.bottom
106+
// width: 40
107+
// id: msmSkillInstallProgBar
108+
// visible: false
109+
// indeterminate: false
110+
// }
111+
112+
}

Options.qml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import QtQuick 2.0
1+
import QtQuick 2.5
22
import QtQuick.Controls 2.0
3-
import QtQuick.Layouts 1.0
3+
import QtQuick.Layouts 1.1
44
import Qt.labs.settings 1.0
55

66
Rectangle {
77
id: rectangle1
8-
color: "#0e884b"
8+
color: "#0e7f86"
99
anchors.fill: parent
1010
property alias strscript: textField1.text
1111
property alias stpscript: textField2.text
@@ -51,20 +51,20 @@ Rectangle {
5151

5252
TextField {
5353
id: fontsizetextfld
54-
width: 36
55-
height: 26
54+
width: 28
55+
height: 46
5656
text: qsTr("12")
5757
anchors.left: fontsizelabelfld.right
5858
anchors.verticalCenter: fontsizelabelfld.verticalCenter
59-
anchors.leftMargin: 10
59+
anchors.leftMargin: 6
6060
}
6161

6262
Button {
6363
id: button1
64-
width: 100
65-
height: 18
64+
width: 102
65+
height: 42
6666
text: qsTr("Apply")
67-
anchors.verticalCenterOffset: -42
67+
anchors.verticalCenterOffset: -33
6868
anchors.verticalCenter: fontsizetextfld.verticalCenter
6969
anchors.left: label2.right
7070
anchors.leftMargin: 177
@@ -76,36 +76,37 @@ Rectangle {
7676

7777
TextField {
7878
id: textField1
79-
width: 262
80-
height: 26
79+
width: 274
80+
height: 43
8181
text: qsTr("/home/Aix/mycroft-core/mycroft.sh")
8282
horizontalAlignment: Text.AlignHCenter
83-
anchors.horizontalCenterOffset: 140
83+
anchors.horizontalCenterOffset: 162
8484
anchors.horizontalCenter: fontsizetextfld.horizontalCenter
8585
anchors.top: fontsizetextfld.bottom
86-
anchors.topMargin: 14
86+
anchors.topMargin: 2
8787
}
8888

8989
TextField {
9090
id: textField2
91-
width: 263
92-
height: 25
91+
width: 275
92+
height: 40
9393
text: qsTr("/home/Aix/mycroft-core/mycroft.sh")
9494
horizontalAlignment: Text.AlignHCenter
9595
anchors.horizontalCenter: textField1.horizontalCenter
9696
anchors.top: textField1.bottom
97-
anchors.topMargin: 10
97+
anchors.topMargin: -1
9898
}
9999

100100
TextField {
101101
id: textField3
102-
width: 263
103-
height: 25
102+
width: 273
103+
height: 40
104104
text: qsTr("ws://0.0.0.0:8181/core")
105+
anchors.horizontalCenterOffset: 1
105106
horizontalAlignment: Text.AlignHCenter
106107
anchors.horizontalCenter: textField1.horizontalCenter
107108
anchors.top: textField2.bottom
108-
anchors.topMargin: 10
109+
anchors.topMargin: -3
109110
}
110111

111112
Label {
@@ -129,6 +130,7 @@ Rectangle {
129130
Label {
130131
id: label3
131132
text: qsTr("Mycroft WS IP")
133+
textFormat: Text.AutoText
132134
font.bold: true
133135
anchors.top: label2.bottom
134136
anchors.topMargin: 18

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1-
# Mycroft Ai QT Standalone Application
2-
This application provides Mycroft with Standalone GUI interface for OS/Desktops which do not support native desktop integration interfaces.
1+
## Mycroft AI Standalone GUI Client Version 1.3
2+
##### Standalone GUI client for Mycroft written in QT, support for all Desktop Environments
3+
###### Appimage Release - Comes bundled with all the QT/GUI Dependencies
4+
5+
What's New:
6+
* added: Fullscreen support, ability to resize in windowed mode
7+
* added: New conversation model allows visual feedback for skill results
8+
* added: Web-view integration for skills with HTML type data
9+
* added: New conversation animation
10+
* added: Inbuilt Installation feature for all skills listed in mycroft-skills directly from the application using MSM Skill Installer
11+
* added: Drag and Drop to conversation area for Image/File Recognition type skills
12+
* added: To settings ability to set custom drag and drop (Image/File) recognition command
13+
* changed: Redesign for better space management and dedicated animations bar
314

415
#### AppImage:
5-
* Appimage for the Qt Application for any desktop environment (Linux).
16+
* Appimage for the Qt Application for any desktop environment (Linux)
617
* Download -> chmod +x mycroft-qtapplication.AppImage -> Run
18+
* Go To Settings and Set the Start and Stop path to your Mycroft.sh file in the Mycroft-Core folder
19+
* Toggle The Switch on The Top Left Corner to Start Mycroft
720

821
### Building From Source:
922

1023
#### QT5 Requirements:
1124
* Qt5
1225
* QtQuick 2.0
1326
* QtQml Models 2.2
14-
* QtQuick Controls 1.0
15-
* QtQuick Layouts 1.0
27+
* QtQuick Controls 2.0
28+
* QtQuick Layouts 1.3
1629
* Qt Websockets 1.0
30+
* Qt Webkit 3.0
31+
* Qt Webkit Experimental 1.0
1732
* QtQuick Controls Styles 1.4
1833
* Qt Creator (QT IDE FOR APP DEVELOPMENT)
1934

SimpleMessageType.qml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import QtQuick 2.5
2+
import QtQml.Models 2.2
3+
import QtQuick.Controls 2.0
4+
5+
Column {
6+
spacing: 6
7+
anchors.right: parent.right
8+
9+
readonly property bool sentByMe: model.recipient !== "User"
10+
property alias mssg: messageText.text
11+
12+
Row {
13+
id: messageRow
14+
spacing: 6
15+
16+
Rectangle {
17+
id: messageRect
18+
width: cbwidth
19+
radius: 2
20+
height: messageText.implicitHeight + 24
21+
color: "#111"
22+
23+
Label {
24+
id: messageText
25+
text: model.InputQuery
26+
anchors.fill: parent
27+
anchors.margins: 12
28+
wrapMode: Label.Wrap
29+
font.pixelSize: innerset.fntsize
30+
color: "#fff"
31+
32+
}
33+
}
34+
}
35+
}

SkillModel.qml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import QtQuick 2.5
2+
3+
ListModel {
4+
id: skillshintmodel
5+
ListElement {
6+
Pic: "images/alarm.png"
7+
Skill: "Alarm"
8+
CommandList: [
9+
ListElement { Commands: "Hey Mycroft, Set alarm for %time" },
10+
ListElement { Commands: "Hey Mycroft, Set alarm for %time on %date" }
11+
]
12+
}
13+
14+
ListElement {
15+
Pic: "images/dateandtime.png"
16+
Skill: "Date & Time"
17+
CommandList: [
18+
ListElement { Commands: "Hey Mycroft, What is the current time" },
19+
ListElement { Commands: "Hey Mycroft, Current date in London" }
20+
]
21+
}
22+
23+
ListElement {
24+
Pic: "images/desktop.png"
25+
Skill: "Desktop"
26+
CommandList: [
27+
ListElement { Commands: "Hey Mycroft, Open Firefox"},
28+
ListElement { Commands: "Hey Mycroft, Open Konsole"}
29+
]
30+
}
31+
32+
ListElement {
33+
Pic: "images/joke.png"
34+
Skill: "Joke"
35+
CommandList: [
36+
ListElement {Commands: "Hey Mycroft, Tell me a joke"},
37+
ListElement {Commands: "Hey Mycroft, Meaning of life"}
38+
]
39+
}
40+
41+
ListElement {
42+
Pic: "images/spell.png"
43+
Skill: "Spell"
44+
CommandList: [
45+
ListElement {Commands: "Hey Mycroft, Spell Hello"},
46+
ListElement {Commands: "Hey Mycroft, Spell Mycroft"}
47+
]
48+
}
49+
50+
ListElement {
51+
Pic: "images/wikip.png"
52+
Skill: "WiKi"
53+
CommandList: [
54+
ListElement {Commands: "Hey Mycroft, Wiki the Moon"},
55+
ListElement {Commands: "Hey Mycroft, Define Relativity"}
56+
]
57+
}
58+
59+
ListElement {
60+
Pic: "images/wolfram.png"
61+
Skill: "Wolfram Alpha"
62+
CommandList: [
63+
ListElement {Commands: "Hey Mycroft, Calculate the Pi"},
64+
ListElement {Commands: "Hey Mycroft, What is 2+2"}
65+
]
66+
}
67+
68+
ListElement {
69+
Pic: "images/weather.png"
70+
Skill: "Weather"
71+
CommandList: [
72+
ListElement {Commands: "Hey Mycroft, What is the current weather"},
73+
ListElement {Commands: "Hey Mycroft, Current weather in Tokyo"}
74+
]
75+
}
76+
}

SplitView.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import QtQuick 2.0
2+
3+
Item {
4+
5+
}

0 commit comments

Comments
 (0)