18 import Ubuntu.Components 0.1
19 import
"../Components"
24 property alias cacheBuffer: carousel.cacheBuffer
25 property alias itemComponent: carousel.itemComponent
26 property alias minimumTileWidth: carousel.minimumTileWidth
27 property alias selectedItemScaleFactor: carousel.selectedItemScaleFactor
28 property alias tileAspectRatio: carousel.tileAspectRatio
30 height: carousel.implicitHeight + units.gu(6)
35 tileAspectRatio: cardTool.components && cardTool.components[
"art"][
"aspect-ratio"] || 1.0
38 minimumTileWidth: cardTool.cardWidth / selectedItemScaleFactor
39 selectedItemScaleFactor: cardTool.carouselSelectedItemScaleFactor
41 model: cardCarousel.
model
43 property real fontScale: 1 / selectedItemScaleFactor
44 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
46 itemComponent: Loader {
49 property bool explicitlyScaled
54 objectName:
"carouselDelegate" + index
56 function clicked() { cardCarousel.clicked(index, model.result) }
57 function pressAndHold() { cardCarousel.pressAndHold(index, model.result) }
59 sourceComponent: cardTool.cardComponent
61 item.fixedHeaderHeight = Qt.binding(
function() {
return carousel.headerHeight; });
62 item.height = Qt.binding(
function() {
return cardTool.cardHeight; });
63 item.cardData = Qt.binding(
function() {
return model; });
64 item.template = Qt.binding(
function() {
return cardTool.template; });
65 item.components = Qt.binding(
function() {
return cardTool.components; });
66 item.fontScale = Qt.binding(
function() {
return carousel.fontScale; });
67 item.showHeader = Qt.binding(
function() {
return loader.explicitlyScaled; });
68 item.artShapeBorderSource =
"none";
69 item.scopeStyle = cardCarousel.scopeStyle;
78 source:
"graphics/carousel_dropshadow.sci"
alias model
Model for the Carousel, which has to be a model usable by a ListView.