1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the QtDeclarative module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
47 width: 800; height: 480
49 property string currentFeed: "rss.news.yahoo.com/rss/topstories"
50 property bool loading: feedModel.status == XmlListModel.Loading
52 RssFeeds { id: rssFeeds }
56 source: "http://" + window.currentFeed
57 query: "/rss/channel/item"
59 XmlRole { name: "title"; query: "title/string()" }
60 XmlRole { name: "link"; query: "link/string()" }
61 XmlRole { name: "description"; query: "description/string()" }
66 width: 220; height: window.height
74 footer: quitButtonDelegate
75 delegate: CategoryDelegate {}
76 highlight: Rectangle { color: "steelblue" }
77 highlightMoveSpeed: 9999999
80 scrollArea: categories; height: categories.height; width: 8
81 anchors.right: categories.right
86 width: window.width - 220; height: window.height
88 delegate: NewsDelegate {}
92 id: quitButtonDelegate
94 width: categories.width; height: 60
97 font { family: "Helvetica"; pixelSize: 16; bold: true }
99 left: parent.left; leftMargin: 15
100 verticalCenter: parent.verticalCenter
109 ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right }
110 Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" }