18 import Ubuntu.Components 0.1
21 property var model: undefined
37 onCountChanged: updateModelTimer.restart()
40 onModelChanged: updateModelTimer.restart()
45 onTriggered: updateModel()
48 function updateModel() {
50 for (var i = 0; i < 5 && i < model.count; ++i) {
51 var itemData = model.get(i)
52 internalModel.append({
"name": itemData.column_1,
"highlights": itemData.column_2,
"context": itemData.column_3,
"contextHighlights": itemData.column_4})
56 signal activated(
int index)
58 height: repeater.height
62 objectName:
"resultListRepeater"
67 height: result.height + separatorLine.height * 2
68 anchors.left: parent.left
69 anchors.right: parent.right
71 onClicked: activated(index)
75 anchors.top: parent.top
76 anchors.left: parent.left
77 anchors.right: parent.right
78 source:
"graphics/divider.sci"
85 anchors.top: separatorLine.bottom
86 anchors.left: parent.left
87 anchors.right: parent.right
90 nameHighlights: highlights
91 contextSnippetText: context
92 contextSnippetHighlights: contextHighlights
96 anchors.top: result.bottom
97 anchors.left: parent.left
98 anchors.right: parent.right
99 source:
"graphics/divider.sci"
102 Component.onCompleted: fadeIn.start()
103 NumberAnimation {
id: fadeIn; target: resultList; alwaysRunToEnd:
true;
property:
"opacity"; duration: 200; from: 0; to: 1 }