Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/contents/ui/Suggestions.qml
Show All 36 Lines | 29 | MouseArea { | |||
---|---|---|---|---|---|
37 | } | 37 | } | ||
38 | 38 | | |||
39 | onExited: { | 39 | onExited: { | ||
40 | suggestionbutton1.color = "#00000000" | 40 | suggestionbutton1.color = "#00000000" | ||
41 | suggestionbutton1.border.color = "grey" | 41 | suggestionbutton1.border.color = "grey" | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | onClicked: { | 44 | onClicked: { | ||
45 | suggst.visible = false | 45 | suggst.visible = true | ||
46 | conversationInputList.append({"InputQuery": suggestiontext1.text}); | 46 | conversationInputList.append({"InputQuery": suggestiontext1.text}); | ||
47 | inputlistView.positionViewAtEnd(); | 47 | inputlistView.positionViewAtEnd(); | ||
48 | var socketmessage = {}; | 48 | var socketmessage = {}; | ||
49 | socketmessage.type = "recognizer_loop:utterance"; | 49 | socketmessage.type = "recognizer_loop:utterance"; | ||
50 | socketmessage.data = {}; | 50 | socketmessage.data = {}; | ||
51 | socketmessage.data.utterances = [suggestiontext1.text]; | 51 | socketmessage.data.utterances = [suggestiontext1.text]; | ||
52 | socket.sendTextMessage(JSON.stringify(socketmessage)); | 52 | socket.sendTextMessage(JSON.stringify(socketmessage)); | ||
53 | qinput.text = suggestiontext1.text | 53 | qinput.text = suggestiontext1.text | ||
54 | filtersuggest(); | | |||
55 | qinput.text = "" | | |||
56 | } | 54 | } | ||
57 | } | 55 | } | ||
58 | 56 | | |||
59 | PlasmaComponents.Label { | 57 | PlasmaComponents.Label { | ||
60 | id: suggestiontext1 | 58 | id: suggestiontext1 | ||
61 | text: qsTr("Text") | 59 | text: qsTr("Text") | ||
62 | anchors.verticalCenter: parent.verticalCenter | 60 | anchors.verticalCenter: parent.verticalCenter | ||
63 | anchors.horizontalCenter: parent.horizontalCenter | 61 | anchors.horizontalCenter: parent.horizontalCenter | ||
Show All 23 Lines | 76 | MouseArea { | |||
87 | } | 85 | } | ||
88 | 86 | | |||
89 | onExited: { | 87 | onExited: { | ||
90 | suggestionbutton2.color = "#00000000" | 88 | suggestionbutton2.color = "#00000000" | ||
91 | suggestionbutton2.border.color = "grey" | 89 | suggestionbutton2.border.color = "grey" | ||
92 | } | 90 | } | ||
93 | 91 | | |||
94 | onClicked: { | 92 | onClicked: { | ||
95 | suggst.visible = false | 93 | suggst.visible = true | ||
96 | conversationInputList.append({"InputQuery": suggestiontext2.text}); | 94 | conversationInputList.append({"InputQuery": suggestiontext2.text}); | ||
97 | inputlistView.positionViewAtEnd(); | 95 | inputlistView.positionViewAtEnd(); | ||
98 | var socketmessage = {}; | 96 | var socketmessage = {}; | ||
99 | socketmessage.type = "recognizer_loop:utterance"; | 97 | socketmessage.type = "recognizer_loop:utterance"; | ||
100 | socketmessage.data = {}; | 98 | socketmessage.data = {}; | ||
101 | socketmessage.data.utterances = [suggestiontext2.text]; | 99 | socketmessage.data.utterances = [suggestiontext2.text]; | ||
102 | socket.sendTextMessage(JSON.stringify(socketmessage)); | 100 | socket.sendTextMessage(JSON.stringify(socketmessage)); | ||
103 | qinput.text = suggestiontext1.text | 101 | qinput.text = suggestiontext1.text | ||
104 | filtersuggest(); | | |||
105 | qinput.text = "" | | |||
106 | } | 102 | } | ||
107 | } | 103 | } | ||
108 | 104 | | |||
109 | PlasmaComponents.Label { | 105 | PlasmaComponents.Label { | ||
110 | id: suggestiontext2 | 106 | id: suggestiontext2 | ||
111 | text: qsTr("Text") | 107 | text: qsTr("Text") | ||
112 | anchors.verticalCenter: parent.verticalCenter | 108 | anchors.verticalCenter: parent.verticalCenter | ||
113 | anchors.horizontalCenter: parent.horizontalCenter | 109 | anchors.horizontalCenter: parent.horizontalCenter | ||
Show All 22 Lines | 124 | MouseArea { | |||
136 | } | 132 | } | ||
137 | 133 | | |||
138 | onExited: { | 134 | onExited: { | ||
139 | suggestionbutton3.color = "#00000000" | 135 | suggestionbutton3.color = "#00000000" | ||
140 | suggestionbutton3.border.color = "grey" | 136 | suggestionbutton3.border.color = "grey" | ||
141 | } | 137 | } | ||
142 | 138 | | |||
143 | onClicked: { | 139 | onClicked: { | ||
144 | suggst.visible = false | 140 | suggst.visible = true | ||
145 | conversationInputList.append({"InputQuery": suggestiontext3.text}); | 141 | conversationInputList.append({"InputQuery": suggestiontext3.text}); | ||
146 | inputlistView.positionViewAtEnd(); | 142 | inputlistView.positionViewAtEnd(); | ||
147 | var socketmessage = {}; | 143 | var socketmessage = {}; | ||
148 | socketmessage.type = "recognizer_loop:utterance"; | 144 | socketmessage.type = "recognizer_loop:utterance"; | ||
149 | socketmessage.data = {}; | 145 | socketmessage.data = {}; | ||
150 | socketmessage.data.utterances = [suggestiontext3.text]; | 146 | socketmessage.data.utterances = [suggestiontext3.text]; | ||
151 | socket.sendTextMessage(JSON.stringify(socketmessage)); | 147 | socket.sendTextMessage(JSON.stringify(socketmessage)); | ||
152 | qinput.text = suggestiontext1.text | 148 | qinput.text = suggestiontext1.text | ||
153 | filtersuggest(); | | |||
154 | qinput.text = "" | | |||
155 | } | 149 | } | ||
156 | } | 150 | } | ||
157 | 151 | | |||
158 | PlasmaComponents.Label { | 152 | PlasmaComponents.Label { | ||
159 | id: suggestiontext3 | 153 | id: suggestiontext3 | ||
160 | text: qsTr("Text") | 154 | text: qsTr("Text") | ||
161 | anchors.verticalCenter: parent.verticalCenter | 155 | anchors.verticalCenter: parent.verticalCenter | ||
162 | anchors.horizontalCenter: parent.horizontalCenter | 156 | anchors.horizontalCenter: parent.horizontalCenter | ||
163 | font.pixelSize: 12 | 157 | font.pixelSize: 12 | ||
164 | } | 158 | } | ||
165 | } | 159 | } | ||
166 | } | 160 | } | ||
167 | } | 161 | } |