3 import "content/modelimpl"
4 import "content/modelitf"
8 //anchors.fill: parent // use this little trick to always adapt itself to the screen
9 width: 800; height: 480
11 property int currentSourceIndex: 0
13 property list<SourceModel> listSourceModel: [
15 GoogleReaderSourceModel{},
16 FavoriteFeedsSourceModel{},
20 property variant currentSource: listSourceModel[currentSourceIndex]
21 property bool loading: currentSource.loading
22 property alias windowViewsModel: viewsModel
23 property alias windowViewsList: viewsList
24 property alias currentContentX: viewsList.contentX
29 ListElement { component: "content/view/Sources.qml"; componentDepth: 0 }
37 orientation: ListView.Horizontal
38 snapMode: ListView.SnapOneItem
39 flickDeceleration: 500
40 cacheBuffer: 1600 // so that the next delegate gets actually loaded...
41 preferredHighlightBegin: window.x
42 preferredHighlightEnd: window.width
43 highlightRangeMode: ListView.StrictlyEnforceRange
44 boundsBehavior: Flickable.StopAtBounds
46 Behavior on contentX {
47 NumberAnimation { duration: 500; easing.type: Easing.InOutCubic }
56 viewsList.contentX = componentDepth*window.width
57 //viewsList.currentIndex = componentDepth // doesn't work well with Qt 4.7.3 on Maemo...
62 function showConfigDialog(index) {
63 configDialog.configModel = listSourceModel[index]
64 configDialog.state = "showSourceConfig"
75 id: quitButtonDelegate
77 width: parent.width; height: 60
80 font { family: "Helvetica"; pixelSize: 16; bold: true }
82 left: parent.left; leftMargin: 15
83 verticalCenter: parent.verticalCenter