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
24 width: window.width; height: window.height
26 function getNewsModelItem(prop)
28 if( typeof currentSource.listModels[componentDepth-1] != "undefined" )
29 if( typeof currentSource.listModels[componentDepth-1][prop] != "undefined" )
30 return currentSource.listModels[componentDepth-1][prop]
35 property string urllink: getNewsModelItem('urllink')
36 property string htmlcontent: getNewsModelItem('htmlcontent')
37 property string title: getNewsModelItem('title')
38 property string image: getNewsModelItem('image')
45 width: newsDetailRect.width
46 height: column.height + 10
51 width: parent.width - 20
62 anchors.verticalCenter: detailImage.verticalCenter
63 text: title; width: column.width - detailImage.width - 10; wrapMode: Text.WordWrap
64 font { bold: true; family: "Helvetica"; pointSize: 16 }
70 text: htmlcontent; width: newsDetailRect.width - 20; wrapMode: Text.WordWrap
71 horizontalAlignment: Text.AlignJustify;
72 font.family: "Helvetica"
80 var currentSourceDepth = currentSource.listModels[componentDepth-1].sourceDepth
82 if (listSourceModel[window.currentSourceIndex].listViews.length >= currentSourceDepth+1)
84 // here we remove everything in viewsModel after index "currentSourceDepth"
85 while(window.windowViewsModel.count>currentSourceDepth+1)
86 window.windowViewsModel.remove(window.windowViewsModel.count-1)
88 var path = listSourceModel[window.currentSourceIndex].currentPath
89 path[currentSourceDepth] = index
90 listSourceModel[window.currentSourceIndex].currentPath = path.slice(0,currentSourceDepth+1)
92 window.windowViewsModel.append({ component: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewComponent,
93 componentDepth: currentSourceDepth+1 })
101 anchors.fill: newsDetailRect
104 ScrollBar { scrollArea: itemListView; height: itemListView.height; width: 8; anchors.right: itemListView.right }