29
30
colorGroup: SystemPalette.Active
32
function showCategoriesView()
34
console.log("showCategoryView")
37
// FIXME: would be nice to do this somewhere else
38
pkglistmodel.setCategory("")
41
function showListView()
43
console.log("showListView")
44
catview.x = 0 - listview.width
47
function showDetailsView()
49
console.log("showDetailsView")
50
catview.x = 0 - listview.width - detailsview.width
52
// FIXME: actually we could do this on a property change event
53
// for listview.x, if it changes to "0" trigger load
54
reviewslistmodel.getReviews(list.currentItem.pkgname)
59
35
anchors.left: parent.left
60
36
anchors.right: parent.right
61
37
anchors.top: parent.top
63
KeyNavigation.down: (listview.x == 0) ? list : null
39
KeyNavigation.down: (switcher.currentFrame() == listview) ? switcher : null
41
property string searchResults: qsTr("Search Results")
43
property string categoryKey: "category"
44
property string searchresultsKey: "searchresults"
66
47
target: pkglistmodel
68
49
value: navigation.searchQuery
71
onSearchQueryChanged: if (searchQuery.length > 0) showListView()
72
onSearchActivated: showListView()
52
Component.onCompleted: breadcrumbs.addCrumb(qsTr("Get Software"), catview, "")
56
(index == 1 && navigation.breadcrumbs.model.get(1).key == categoryKey)) {
59
switcher.goToFrame(navigation.breadcrumbs.model.get(index).view)
62
searchBoxVisible: switcher.currentFrame() != detailsview
65
if (searchQuery.length > 0) {
66
var bc = navigation.breadcrumbs
68
(bc.count == 2 && bc.model.get(1).key == categoryKey)) {
69
bc.addCrumb(searchResults, listview, searchresultsKey)
71
switcher.goToFrame(listview)
74
onSearchQueryChanged: doSearch()
75
onSearchActivated: doSearch()
80
anchors.left: parent.left
81
anchors.right: parent.right
82
anchors.top: navigation.bottom
83
anchors.bottom: parent.bottom
79
anchors.top: navigation.bottom
82
NumberAnimation { duration: 180 }
86
pkglistmodel.setCategory(catname)
94
pkglistmodel.setCategory(catname)
95
navigation.breadcrumbs.addCrumb(catname, listview, navigation.categoryKey)
96
switcher.goToFrame(listview)
95
anchors.left: catview.right
96
anchors.top: navigation.bottom
97
anchors.bottom: parent.bottom
100
NumberAnimation { duration: 180 }
105
107
model: pkglistmodel
106
108
anchors.left: parent.left
107
109
anchors.right: parent.right
109
111
anchors.bottom: statusframe.top
111
113
KeyNavigation.up: navigation
116
navigation.breadcrumbs.addCrumb(currentItem.appname, detailsview, "")
117
switcher.goToFrame(detailsview)
142
anchors.left: listview.right
143
anchors.top: navigation.bottom
144
anchors.bottom: parent.bottom
147
NumberAnimation { duration: 180 }
154
navigation.breadcrumbs.removeCrumb()
155
switcher.goToFrame(listview)
158
onShown: { details.loadThumbnail();
159
details.loadReviews();
161
onHidden: details.unloadThumbnail()
164
Component.onCompleted: {
165
switcher.pushFrame(catview)
166
switcher.pushFrame(listview)
167
switcher.pushFrame(detailsview)