forked from AIIX/Mycroft-Ai-QtApplication
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from BenjaminHCCarr/osx
Merge to keep current
- Loading branch information
Showing
43 changed files
with
2,232 additions
and
1,237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
// } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import QtQuick 2.0 | ||
|
||
Item { | ||
|
||
} |
Oops, something went wrong.