Warning, /system/mycroft-gui/documentation/skill-example/ui/eventsExample.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.4 0002 import QtQuick.Controls 2.2 0003 import QtQuick.Layouts 1.4 0004 import org.kde.kirigami 2.4 as Kirigami 0005 import Mycroft 1.0 as Mycroft 0006 0007 Mycroft.Delegate { 0008 id: root 0009 property var rectColor: sessionData.fooColor 0010 0011 onRectColorChanged: { 0012 fooRect.color = rectColor 0013 } 0014 0015 Rectangle { 0016 id: fooRect 0017 anchors.fill: parent 0018 color: "#000" 0019 0020 ColumnLayout { 0021 anchors.fill: parent 0022 0023 Button { 0024 id: fooButton 0025 Layout.fillWidth: true 0026 height: Kirigami.Units.gridUnit * 2 0027 text: "blue" 0028 0029 onClicked: { 0030 triggerGuiEvent("skillExample.colorChange", {"color": "#0000ff"}) 0031 } 0032 } 0033 Button { 0034 id: fooButton2 0035 Layout.fillWidth: true 0036 height: Kirigami.Units.gridUnit * 2 0037 text: "red" 0038 0039 onClicked: { 0040 triggerGuiEvent("skillExample.colorChange", {"color": "#ff0000"}) 0041 } 0042 } 0043 Button { 0044 id: fooButton3 0045 Layout.fillWidth: true 0046 height: Kirigami.Units.gridUnit * 2 0047 text: "black" 0048 0049 onClicked: { 0050 triggerGuiEvent("skillExample.colorChange", {"color": "#000000"}) 0051 } 0052 } 0053 } 0054 } 0055 }