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 name: "Favorite Feeds"
26 { viewComponent: 'content/view/Categories.qml' } ,
27 { viewComponent: 'content/view/News.qml' },
28 { viewComponent: 'content/view/NewsDetailFromURL.qml' }
36 function getNewsModelItem(prop)
38 var newsIndex = currentPath[2]
40 if( typeof newsModel.get(newsIndex) != "undefined" )
41 if( typeof newsModel.get(newsIndex)[prop] != "undefined" )
42 return newsModel.get(newsIndex)[prop]
47 property variant categoriesModel: FavoriteRssFeeds { }
48 property variant newsModel: RssFeedModel {
49 currentFeed: categoriesModel.get(currentPath[1]).feed
51 property variant newsModelDetail: QtObject {
52 property variant parentModel: newsModel
53 property int sourceDepth: 3
55 property string urllink: getNewsModelItem('link')
56 property string title: getNewsModelItem('title')
57 property string image: getNewsModelItem('image')
60 loading: newsModel.loading
62 settingsComponent: "FavoriteRssConfig.qml"