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 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
43 import QtQuick.Particles 2.0
47 id: screen; width: 320; height: 480
48 property bool inGridView : false
52 anchors.fill: parent; color: "#343434";
54 Image { source: "content/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
61 source: "content/images/particle.png"
73 speed: PointDirection{
81 emitRatePerParticle: 18
90 emitShape: EllipseShape{}
95 delegate: UnifiedDelegate{}
96 model: RssModel { id: rssModel }
102 anchors.top: titleBar.bottom; anchors.bottom: toolBar.top
105 id: photoGridView; model: vdm.parts.grid
107 cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height
112 model: vdm.parts.stream
113 width: parent.width; height: parent.height
117 name: "GridView"; when: screen.inGridView == true
120 transitions: Transition {
121 NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
124 ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height }
126 Item { id: foreground; anchors.fill: parent }
129 TitleBar { id: titleBar; width: parent.width; height: 40; opacity: 0.9 }
133 height: 40; anchors.bottom: parent.bottom; width: parent.width; opacity: 0.9
134 button1Label: "Update"; button2Label: "View mode"
135 onButton1Clicked: rssModel.reload()
136 onButton2Clicked: if (screen.inGridView == true) screen.inGridView = false; else screen.inGridView = true
142 if (background.state == "DetailedView") {
143 background.state = '';
144 imageDetails.photoUrl = "";
151 PropertyChanges { target: views; x: -parent.width }
152 PropertyChanges { target: toolBar; button1Label: "View..." }
155 onButton1Clicked: if (imageDetails.state=='') imageDetails.state='Back'; else imageDetails.state=''
157 PropertyChanges { target: toolBar; button2Label: "Back" }
158 PropertyChanges { target: toolBar; onButton2Clicked: imageDetails.closed() }
161 transitions: Transition {
162 NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }