import QtQuick 1.1
import com.meego 1.0
+import "UIConstants.js" as UIConstants
Page {
id: coversAlternativesPage
}
}
+ Rectangle {
+ id: titleArea
+ anchors.top: coversAlternativesPage.top
+ width: coversAlternativesPage.width
+ height: 70
+ color: UIConstants.COLOR_SELECT
+ Label {
+ platformStyle: LabelStyle { fontFamily: UIConstants.FONT_FAMILY; fontPixelSize: UIConstants.FONT_LARGE;}
+ anchors.fill: parent
+ anchors.leftMargin: UIConstants.DEFAULT_MARGIN
+ id: titleLabel
+ text: "Select a cover:"
+ verticalAlignment: Text.AlignVCenter
+ color: "white"
+ }
+ }
+
+
GridView {
id: coversView
model: coversModel
- anchors.fill : coversAlternativesPage
+ anchors.top: titleArea.bottom
+ anchors.bottom : coversAlternativesPage.bottom
+ anchors.left: coversAlternativesPage.left
+ anchors.right: coversAlternativesPage.right
cellWidth: 160
cellHeight: 160
height: parent.height
cache: false
anchors.centerIn: parent
+ visible: model.cover.url != ""
}
- Text {
- id: t
- text: "xxx"
- visible: (model.cover.url == null)
+ BusyIndicator {
+ id: loadingIndicator
+ platformStyle: BusyIndicatorStyle {size: "small"}
+ running: (model.cover.url == "")
+ visible: (model.cover.url == "")
+ anchors.centerIn: parent
}
MouseArea {
}
}
-
-
-/*
-Row {
- id: coversAlternatives
-
- // This are set on construction
- property alias altmodel: imagesLoop.model
- property variant albumListModel
- property variant mc
-
- // Pass this when an image is clicked
- property int indexInAlbumList
-
- signal done
-
- anchors.horizontalCenter : parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
-
- spacing: parent.width / 16
-
- Repeater {
- id: imagesLoop
- delegate: Component {
- ClickeableImage {
- source: model.cover.url
- width: 120
- height: 120
- onClicked: {
- console.log (model.cover.url)
- mc.coverSelected (model.cover, albumListModel, indexInAlbumList)
- coversAlternatives.done ()
- }
- }
- }
- }
-}
-
-*/