Warning, /libraries/libqmycroft/examples/example.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.12 0002 import QtQuick.Window 2.12 0003 import Libqmycroft 1.0 0004 0005 Window { 0006 width: 640 0007 height: 480 0008 visible: true 0009 title: qsTr("Hello Mycroft!") 0010 property string currentPath: Qt.resolvedUrl(".").substring(7) 0011 0012 SkillManager { 0013 id: skillRegisteration 0014 skillNamespace: "exampleapp" 0015 0016 SkillEntry { 0017 intent: "testoneintent" 0018 voc: currentPath + "/vocab/exampleapp_test_intent_one.intent" 0019 action: "example-action-1" 0020 dialog: "Intent One Successful" 0021 } 0022 0023 SkillEntry { 0024 intent: "testtwointent" 0025 voc: currentPath + "/vocab/exampleapp_test_intent_two.intent" 0026 action: "example-action-2" 0027 dialog: "Intent Two Successful" 0028 } 0029 0030 onSocketReadyChanged: { 0031 if(socketReady){ 0032 skillRegisteration.createSkill() 0033 } 0034 } 0035 0036 onIntentResponse: { 0037 if(action == "example-action-1"){ 0038 rectangleExample1.color = "blue" 0039 } 0040 if(action == "example-action-2"){ 0041 rectangleExample2.color = "green" 0042 } 0043 } 0044 } 0045 0046 Rectangle { 0047 id: rectangleExample1 0048 width: parent.width 0049 height: parent.height /2 0050 color: "green" 0051 } 0052 0053 Rectangle { 0054 id: rectangleExample2 0055 anchors.top: rectangleExample1.bottom 0056 width: parent.width 0057 height: parent.height /2 0058 color: "black" 0059 } 0060 }