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 width: delegate.ListView.view.width; height: 60
26 text: listSourceModel[index].name
27 color: delegate.ListView.isCurrentItem ? "white" : "black"
28 font { family: "Helvetica"; pixelSize: 16; bold: true }
30 left: parent.left; leftMargin: 15
31 verticalCenter: parent.verticalCenter
37 on: delegate.ListView.isCurrentItem && window.loading
38 anchors { right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter }
42 width: delegate.width; height: 1; color: "#cccccc"
43 anchors.bottom: delegate.bottom
44 visible: delegate.ListView.isCurrentItem ? false : true
47 width: delegate.width; height: 1; color: "white"
48 visible: delegate.ListView.isCurrentItem ? false : true
52 anchors.fill: delegate
55 // show the configuration for this journal
56 if( listSourceModel[index].hasSettings )
58 window.showConfigDialog(index)
63 if( delegate.ListView.view.currentIndex !== index )
65 // here we remove everything in viewsModel after index our depth
66 while(window.windowViewsModel.count>1)
67 window.windowViewsModel.remove(window.windowViewsModel.count-1)
69 delegate.ListView.view.currentIndex = index
71 listSourceModel[index].currentPath = [index]
72 currentSourceIndex = index
74 window.windowViewsModel.append({ component: listSourceModel[index].listViews[0].viewComponent,
77 //window.currentSourceIndex = index // doesn't work well with Qt 4.7.3 on Maemo...
78 window.currentContentX = 1*window.width