1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: http://www.qt-project.org/
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 : true
52 anchors.fill: parent; color: "#343434";
54 Image { source: "content/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
60 source: "content/images/particle.png"
72 speed: PointDirection{
79 emitRatePerParticle: 18
87 emitShape: EllipseShape{}
93 delegate: UnifiedDelegate{}
94 model: RssModel { id: rssModel }
100 anchors.top: titleBar.bottom; anchors.bottom: toolBar.top
103 id: photoGridView; model: vdm.parts.grid
105 cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height
109 name: "GridView"; when: state.inGridView == true
112 transitions: Transition {
113 NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
116 ImageDetails { id: imageDetails; width: parent.width; anchors.left: views.right; height: parent.height }
118 Item { id: foreground; anchors.fill: parent }
121 TitleBar { id: titleBar; width: parent.width; height: 40; opacity: 0.9 }
125 height: 40; anchors.bottom: parent.bottom; width: parent.width; opacity: 0.9
126 button1Label: "Update"; button2Label: "View mode"
127 onButton1Clicked: rssModel.reload()
128 onButton2Clicked: if (screen.inGridView == true) screen.inGridView = false; else screen.inGridView = true
134 if (background.state == "DetailedView") {
135 background.state = '';
136 imageDetails.photoUrl = "";
143 PropertyChanges { target: views; x: -parent.width }
144 PropertyChanges { target: toolBar; button1Label: "View..." }
147 onButton1Clicked: if (imageDetails.state=='') imageDetails.state='Back'; else imageDetails.state=''
149 PropertyChanges { target: toolBar; button2Label: "Back" }
150 PropertyChanges { target: toolBar; onButton2Clicked: imageDetails.closed() }
153 transitions: Transition {
154 NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }