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 onClicked: cardCarousel.clicked(index, null)
44 onPressAndHold: cardCarousel.pressAndHold(index)
46 property real fontScale: 1 / selectedItemScaleFactor
47 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
49 itemComponent: Loader {
52 property bool explicitlyScaled
56 sourceComponent: cardTool.cardComponent
58 item.objectName =
"carouselDelegate" + index;
59 item.fixedHeaderHeight = Qt.binding(
function() {
return carousel.headerHeight; });
60 item.height = Qt.binding(
function() {
return cardTool.cardHeight; });
61 item.cardData = Qt.binding(
function() {
return model; });
62 item.template = Qt.binding(
function() {
return cardTool.template; });
63 item.components = Qt.binding(
function() {
return cardTool.components; });
64 item.fontScale = Qt.binding(
function() {
return carousel.fontScale; });
65 item.showHeader = Qt.binding(
function() {
return loader.explicitlyScaled; });
66 item.artShapeBorderSource =
"none";
75 source:
"graphics/carousel_dropshadow.sci"
alias model
Model for the Carousel, which has to be a model usable by a ListView.