~andreagrandi/unity-2d/unity-2d-unused-dep

« back to all changes in this revision

Viewing changes to places/PlaceEntryView.qml

[dash] Implemented keyboard navigation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import QtQuick 1.0
20
20
import Unity2d 1.0 /* Necessary for SortFilterProxyModel */
21
21
 
22
 
Item {
 
22
FocusScope {
23
23
    id: placeEntryView
24
24
 
25
25
    /* An instance of PlaceEntryModel */
33
33
        var placeEntry, i
34
34
        for (i=0; i<placeEntryView.model.entryGroupsModel.count; i=i+1) {
35
35
            firstGroupModel.groupId = i
36
 
            if (firstGroupModel.count() != 0) {
 
36
            if (firstGroupModel.count != 0) {
37
37
                var firstResult = firstGroupModel.get(0)
38
38
                /* Places give back the uri of the item in 'column_0' per specification */
39
39
                var uri = firstResult.column_0
62
62
    ListViewWithScrollbar {
63
63
        id: results
64
64
 
 
65
        focus: true
65
66
        anchors.fill: parent
66
67
 
67
68
        /* The group's delegate is chosen dynamically depending on what
112
113
            Binding { target: item; property: "groupId"; value: groupId }
113
114
            Binding { target: item; property: "group_model"; value: group_model }
114
115
            Binding { target: item; property: "placeEntryModel"; value: placeEntryView.model }
 
116
 
 
117
            onLoaded: item.focus = true
115
118
        }
116
119
 
117
120
        headerDelegate: GroupHeader {