2 ** Copyright (C) 2012 Christophe CHAPUIS <chris.chapuis _at_ gmail _dot_ com>
4 ** This package is free software; you can redistribute it and/or modify
5 ** it under the terms of the GNU General Public License as published by
6 ** the Free Software Foundation; either version 2 of the License, or
7 ** (at your option) any later version.
9 ** This package is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ** GNU General Public License for more details.
14 ** You should have received a copy of the GNU General Public License
15 ** along with this package; if not, write to the Free Software
16 ** Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 height: column.height + 40
24 width: delegate.ListView.view.width
29 width: parent.width - 20
33 text: title; width: column.width; wrapMode: Text.WordWrap
34 font { bold: true; family: "Helvetica"; pointSize: 16 }
44 source: (typeof image != "undefined") ? image: ""
48 anchors.verticalCenter: descriptionRow.verticalCenter
49 text: description; width: column.width - detailImage.width - 10; wrapMode: Text.WordWrap
50 font.family: "Helvetica"
56 anchors.fill: delegate
59 var currentSourceDepth = delegate.ListView.view.model.sourceDepth
61 if (listSourceModel[window.currentSourceIndex].listViews.length >= currentSourceDepth+1)
63 // here we remove everything in viewsModel after index "nextSourceDepth"
64 while(window.windowViewsModel.count>currentSourceDepth+1)
65 window.windowViewsModel.remove(window.windowViewsModel.count-1)
67 delegate.ListView.view.currentIndex = index
68 var path = listSourceModel[window.currentSourceIndex].currentPath
69 path[currentSourceDepth] = index
70 listSourceModel[window.currentSourceIndex].currentPath = path.slice(0,currentSourceDepth+1)
72 window.windowViewsModel.append({ component: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewComponent,
73 componentDepth: currentSourceDepth+1 })
79 width: parent.width; height: 1; color: "#cccccc"
80 anchors.bottom: parent.bottom