18 import Ubuntu.Components 0.1
19 import
"../Components"
25 property alias cacheBuffer: carousel.cacheBuffer
26 property alias itemComponent: carousel.itemComponent
27 property alias minimumTileWidth: carousel.minimumTileWidth
28 property alias selectedItemScaleFactor: carousel.selectedItemScaleFactor
29 property alias tileAspectRatio: carousel.tileAspectRatio
31 currentItem: carousel.currentItem
32 height: carousel.implicitHeight + units.gu(6)
33 verticalSpacing: units.gu(3)
38 tileAspectRatio: cardCarousel.components && cardCarousel.components[
"art"][
"aspect-ratio"] || 1.0
41 minimumTileWidth: cardTool.cardWidth / selectedItemScaleFactor
42 selectedItemScaleFactor: cardTool.carouselSelectedItemScaleFactor
44 model: cardCarousel.
model
46 onClicked: cardCarousel.clicked(index, itemY)
47 onPressAndHold: cardCarousel.pressAndHold(index, itemY)
49 property real fontScale: 1 / selectedItemScaleFactor
50 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
52 itemComponent: Loader {
55 property bool explicitlyScaled
59 sourceComponent: cardTool.cardComponent
61 item.objectName =
"carouselDelegate" + index;
62 item.fixedHeaderHeight = Qt.binding(
function() {
return carousel.headerHeight; });
63 item.height = Qt.binding(
function() {
return cardTool.cardHeight; });
64 item.cardData = Qt.binding(
function() {
return model; });
65 item.template = Qt.binding(
function() {
return cardTool.template; });
66 item.components = Qt.binding(
function() {
return cardTool.components; });
67 item.fontScale = Qt.binding(
function() {
return carousel.fontScale; });
68 item.showHeader = Qt.binding(
function() {
return loader.explicitlyScaled; });
alias model
Model for the Carousel, which has to be a model usable by a ListView.