18 import Ubuntu.Components 0.1
20 import
"../Components"
21 import "Previews" as Previews
26 property var scope: null
27 property var pageHeader: null
29 property alias open: previewListView.open
30 property alias model: previewListView.model
31 property alias currentIndex: previewListView.currentIndex
32 property alias currentItem: previewListView.currentItem
33 property alias count: previewListView.count
37 objectName: root.objectName +
"_pageHeader"
39 searchEntryEnabled:
false
43 onBackClicked: root.open =
false
50 verticalCenter: parent.verticalCenter
52 text: scope ? scope.name :
""
56 font.weight: Font.Light
58 elide: Text.ElideRight
64 objectName: root.objectName +
"_listView"
71 orientation: ListView.Horizontal
72 highlightRangeMode: ListView.StrictlyEnforceRange
73 snapMode: ListView.SnapOneItem
74 boundsBehavior: Flickable.DragAndOvershootBounds
75 highlightMoveDuration: 250
76 flickDeceleration: units.gu(625)
77 maximumFlickVelocity: width * 5
81 property string categoryId:
""
86 property bool init:
true
88 property bool open:
false
95 if (previewListView.currentItem && previewListView.currentItem.previewData !== undefined) {
96 previewListView.currentItem.previewData.cancelAction();
98 scope.cancelActivation();
104 objectName:
"previewItem" + index
105 height: previewListView.height
106 width: previewListView.width
108 readonly
property bool ready: preview.previewModel.loaded
112 objectName:
"preview" + index
115 isCurrent: parent.ListView.isCurrentItem
118 var previewStack = root.scope.preview(result);
119 return previewStack.getPreviewModel(0);
124 id: processingMouseArea
125 objectName:
"processingMouseArea"
127 enabled: !preview.previewModel.loaded || preview.previewModel.processingAction
130 anchors.centerIn: parent
131 visible: root.open && parent.enabled