author | hgs |
Mon, 23 Aug 2010 18:06:16 +0530 | |
changeset 58 | 383b67fbdb11 |
parent 52 | a3a4c0de738e |
child 62 | 36d93b4dc635 |
permissions | -rw-r--r-- |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: ?Description |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#ifndef GLXCOVERFLOW_H |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#define GLXCOVERFLOW_H |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#define NBR_ICON_ITEM 5 |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <hbeffect.h> |
45 | 26 |
#include <hbwidget.h> |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
//forward declaration |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
class HbIconItem; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
class HbMainWindow; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
class QAbstractItemModel; |
45 | 32 |
class QGestureEvent; |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
typedef enum |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
{ |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
NO_MOVE, |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
TAP_MOVE, |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
LEFT_MOVE, |
58 | 39 |
RIGHT_MOVE |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
} GlxUserMove; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
typedef enum |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
{ |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
TAP_EVENT, //send the signal when user tap on full screen |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
PANNING_START_EVENT, //send the signal when panning of full screen start |
50 | 46 |
EMPTY_ROW_EVENT, //send the signal when model have no data |
47 |
ZOOM_START_EVENT |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
} GlxCoverFlowEvent; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
|
58 | 50 |
/** |
51 |
* Class Description |
|
52 |
* This is cover flow class to show and browse the image in fullscreen mode. |
|
53 |
*/ |
|
40 | 54 |
class GlxCoverFlow : public HbWidget |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
{ |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
Q_OBJECT |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
public : |
58 | 59 |
/** |
60 |
* Constructor |
|
61 |
* @param - QGraphicsItem parent of this widget |
|
62 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
GlxCoverFlow (QGraphicsItem *parent = NULL); |
58 | 64 |
|
65 |
/** |
|
66 |
* Destructor |
|
67 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
~GlxCoverFlow (); |
58 | 69 |
|
70 |
/** |
|
71 |
* setItemSize() - To set the fullscreen image size. |
|
72 |
* @param - size of fullscreen. |
|
73 |
*/ |
|
74 |
void setItemSize( QSize &size ); |
|
75 |
||
76 |
/** |
|
77 |
* setModel() - To set the data provider of the widget. |
|
78 |
* @param - data model pointor |
|
79 |
*/ |
|
80 |
void setModel( QAbstractItemModel *model ); |
|
81 |
||
82 |
/** |
|
83 |
* indexChanged() - Call back to get the focus index change. |
|
84 |
* @param - new focus index. |
|
85 |
*/ |
|
86 |
void indexChanged( int index ); |
|
87 |
||
88 |
/** |
|
89 |
* setUiOn() - Call back to get the ui on/off status. |
|
90 |
* @param - ui on/off status |
|
91 |
*/ |
|
92 |
void setUiOn( bool uiOn ) { mUiOn = uiOn; } |
|
93 |
||
94 |
/** |
|
95 |
* partiallyClean() - To clean all the item except focus one for improved the |
|
96 |
* view transition animation. |
|
97 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
void partiallyClean(); |
58 | 99 |
|
100 |
/* |
|
101 |
* partiallyCreate() - To update the focus item only for improved the view transition |
|
102 |
* animtaion. |
|
103 |
* @param - data model pointer |
|
104 |
* @param - size of fullscreen. |
|
105 |
* @param - image pos in the screen. |
|
106 |
*/ |
|
107 |
void partiallyCreate( QAbstractItemModel *model, QSize itemSize, int posY = 0 ); |
|
108 |
||
109 |
/** |
|
110 |
* setCoverFlow() - To initialise the coverflow. |
|
111 |
*/ |
|
112 |
void setCoverFlow(); |
|
113 |
||
114 |
/** |
|
115 |
* ClearCoverFlow() - To cleanup the memory and connection. |
|
116 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
void ClearCoverFlow(); |
58 | 118 |
|
119 |
/** |
|
120 |
* setMultitouchFilter(() - To Set the widget who is interested in multi touch |
|
121 |
* gesture event. |
|
122 |
* @param - widget pointer |
|
123 |
*/ |
|
124 |
void setMultitouchFilter( QGraphicsItem* multitouchFilter ); |
|
50 | 125 |
|
58 | 126 |
/** |
127 |
* getFocusIndex() - To return the focus index |
|
128 |
* @return - focus index. |
|
50 | 129 |
*/ |
130 |
int getFocusIndex( ); |
|
131 |
||
58 | 132 |
/** |
133 |
* getIcon() - to retuen the full screen icon of the image |
|
134 |
* @param - index of imges which icon is required. |
|
135 |
* @return - icon of the image. |
|
50 | 136 |
*/ |
137 |
HbIcon getIcon( int index ); |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
public slots: |
58 | 140 |
/** |
141 |
* zoomStarted() - Call back about user has start the zooming. |
|
142 |
* @param - focus index. |
|
143 |
*/ |
|
144 |
void zoomStarted( int index ); |
|
145 |
||
146 |
/** |
|
147 |
* zoomFinished() - Call back about user has finished the zoom and come back |
|
148 |
* to coverflow. |
|
149 |
* @param - focus index. |
|
150 |
*/ |
|
151 |
void zoomFinished( int index ); |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
signals : |
58 | 154 |
/** |
155 |
* coverFlowEvent() - To emit signal about coverflow event happen like panning, zomming ( For ui off ), |
|
156 |
* Tap ( for ui on/off ) etc. |
|
157 |
* @param - type of event |
|
158 |
*/ |
|
159 |
void coverFlowEvent( GlxCoverFlowEvent e ); |
|
160 |
||
161 |
/** |
|
162 |
* changeSelectedIndex() - To emit the signal about focus inde change |
|
163 |
* @param - new focus index |
|
164 |
*/ |
|
165 |
void changeSelectedIndex( const QModelIndex &index ); |
|
166 |
||
167 |
/** |
|
168 |
* autoLeftMoveSignal() - Internal signal to move the next image with transition animation. |
|
169 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
void autoLeftMoveSignal(); |
58 | 171 |
|
172 |
/** |
|
173 |
* autoRightMoveSignal() - Internal signal to move the previous image with transition animation. |
|
174 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
void autoRightMoveSignal(); |
58 | 176 |
|
177 |
/** |
|
178 |
* doubleTapEventReceived() - To emit the signal about double tap happen. |
|
179 |
* @param - coordinate of double tap postion with respect of view. |
|
180 |
*/ |
|
181 |
void doubleTapEventReceived( QPointF position ); |
|
182 |
||
183 |
/** |
|
184 |
* moveNextSignal() - Internal signal to handle the buffering logic when user move |
|
185 |
* to prevoius image. |
|
186 |
*/ |
|
187 |
void moveNextSignal(); |
|
188 |
||
189 |
/** |
|
190 |
* movePreviousSignal() - Internal signal to handle the buffernig loigc when user move |
|
191 |
* to previous image. |
|
192 |
*/ |
|
193 |
void movePreviousSignal(); |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
protected slots: |
58 | 196 |
/** |
197 |
* panGesture() - To handle the pan gesture event. |
|
198 |
* @param - user move delta postion. |
|
199 |
*/ |
|
200 |
void panGesture ( const QPointF & delta ) ; |
|
201 |
||
202 |
/** |
|
203 |
* dataChanged() - call back to monitor the widget data changed. |
|
204 |
* @param - start index of data changed. |
|
205 |
* @param - end index of data changed. |
|
206 |
*/ |
|
207 |
void dataChanged( QModelIndex startIndex, QModelIndex endIndex ); |
|
208 |
||
209 |
/** |
|
210 |
* rowsInserted() - call back of new row inserted in the model. |
|
211 |
* @param - Items are inserted under parent. |
|
212 |
* @param - start index of items inserted. |
|
213 |
* @param - end index of items removed. |
|
214 |
*/ |
|
215 |
void rowsInserted( const QModelIndex &parent, int start, int end ); |
|
216 |
||
217 |
/** |
|
218 |
* rowsRemoved() - call back of new row removed in the model. |
|
219 |
* @param - Items are removed from parent item. |
|
220 |
* @param - start index of items inserted. |
|
221 |
* @param - end index of items removed. |
|
222 |
*/ |
|
223 |
void rowsRemoved( const QModelIndex &parent, int start, int end ); |
|
224 |
||
225 |
/** |
|
226 |
* modelDestroyed() - call back to monitor the model destroy. |
|
227 |
*/ |
|
45 | 228 |
void modelDestroyed(); |
58 | 229 |
|
230 |
/** |
|
231 |
* autoLeftMove() - To play the next image move and bounce back transition animation. |
|
232 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
void autoLeftMove(); |
58 | 234 |
|
235 |
/** |
|
236 |
* autoRightMove() - To play the previous image move and bounce back transition animation. |
|
237 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
void autoRightMove(); |
58 | 239 |
|
240 |
/** |
|
241 |
* moveNextImage() - To Handle user next image move for buffering logic, emit the signal about |
|
242 |
* new focus index and set some widget properties. |
|
243 |
*/ |
|
244 |
void moveNextImage(); |
|
245 |
||
246 |
/** |
|
247 |
* movePreviousImage() - To Handle user pervious image move for buffering logic, emit the signal about |
|
248 |
* new focus index and set some widget properties. |
|
249 |
*/ |
|
250 |
void movePreviousImage(); |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
protected: |
58 | 253 |
/** |
254 |
* gestureEvent() - override function to handle the gesture event. |
|
255 |
* @param - pointer of QGestureEvent |
|
256 |
*/ |
|
257 |
void gestureEvent( QGestureEvent *event ); |
|
258 |
||
259 |
/** |
|
260 |
* move() - Change the postion of items for transition animation. |
|
261 |
* @parma - delta move. |
|
262 |
*/ |
|
263 |
void move( int value ); |
|
264 |
||
265 |
/** |
|
266 |
* setRows() - set the number of rows. |
|
267 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
268 |
void setRows() ; |
58 | 269 |
|
270 |
/** |
|
271 |
* setStripLen() - set the virtual strip length of coverflow. |
|
272 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
273 |
void setStripLen(); |
58 | 274 |
|
275 |
/** |
|
276 |
* calculateIndex() - For cyclic cover flow map the index to actual item index. |
|
277 |
* @param - index of the index. |
|
278 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
279 |
int calculateIndex(int index); |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
280 |
|
58 | 281 |
/** |
282 |
* loadIconItems() - Set the icon, size and postion of the icon items. |
|
283 |
*/ |
|
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
284 |
void loadIconItems (); |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
|
58 | 286 |
/** |
287 |
* updateIconItem() - Set the icon, size and postion of the a particular item. |
|
288 |
* It is used to support buffering logic and when user move to next or previous image. |
|
289 |
* @param - image index. |
|
290 |
* @param - item index in array. |
|
291 |
* @param - position of the item. |
|
292 |
*/ |
|
293 |
void updateIconItem ( qint16 selIndex, qint16 selIconIndex, qint16 posX ); |
|
294 |
||
295 |
/** |
|
296 |
* playAnimation() - In the case of animated image, it will play the animation for focus image |
|
45 | 297 |
*/ |
298 |
void playAnimation(); |
|
299 |
||
58 | 300 |
/** |
301 |
* stopAnimation() - To stop the animation |
|
45 | 302 |
*/ |
303 |
void stopAnimation(); |
|
304 |
||
305 |
/* |
|
58 | 306 |
* clearCurrentModel() - clear all the model connection |
45 | 307 |
*/ |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
308 |
void clearCurrentModel(); |
45 | 309 |
|
310 |
/* |
|
58 | 311 |
* initializeNewModel() - add the connection to the model |
45 | 312 |
*/ |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
313 |
void initializeNewModel(); |
45 | 314 |
|
315 |
/* |
|
58 | 316 |
* resetCoverFlow() - reset all the data of cover flow |
45 | 317 |
*/ |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
318 |
void resetCoverFlow(); |
58 | 319 |
|
320 |
/** |
|
321 |
* getSubState() - To get the substate of fullscreen state. |
|
322 |
* @return - return the substate of fullscreen state. |
|
323 |
*/ |
|
26
c499df2dbb33
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
23
diff
changeset
|
324 |
int getSubState(); |
45 | 325 |
|
58 | 326 |
/** |
327 |
* timerEvent() - To handle the double tap timer |
|
328 |
* @param - pointer of QTimerEvent. |
|
329 |
*/ |
|
330 |
void timerEvent( QTimerEvent *event ); |
|
331 |
||
332 |
/** |
|
333 |
* getUri() - To get the URI of the image. |
|
334 |
* @param - image index. |
|
335 |
* @return - return the uri of the image. |
|
45 | 336 |
*/ |
337 |
QString getUri( int index ); |
|
338 |
||
58 | 339 |
/** |
340 |
* isAnimatedImage() - To get the GIF file info of the image |
|
341 |
* @param - image index. |
|
342 |
* @return - true if it GIF image else false. |
|
45 | 343 |
*/ |
344 |
bool isAnimatedImage( int index ); |
|
345 |
||
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
346 |
private: |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
347 |
HbIconItem *mIconItem[NBR_ICON_ITEM]; //at most contain only five item |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
348 |
qint16 mSelItemIndex; // current full screen index |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
349 |
qint16 mRows; // total number of item |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
350 |
qint16 mSelIndex; // remove once model concept is integreted |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
351 |
qint32 mStripLen; //virtual strip lenght |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
352 |
qint32 mCurrentPos; //current postion in the virtual strip |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
353 |
QSize mItemSize; //hb icon item size |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
354 |
bool mUiOn; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
355 |
int mBounceBackDeltaX; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
356 |
QAbstractItemModel *mModel; |
40 | 357 |
GlxUserMove mMoveDir; |
358 |
int mSpeed; |
|
42 | 359 |
bool mZoomOn; |
360 |
QGraphicsItem* mMultitouchFilter; |
|
44 | 361 |
int mTimerId; |
52 | 362 |
bool mIsInit; |
58 | 363 |
bool mIsAutoMoving; |
23
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
364 |
}; |
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
365 |
|
74c9f037fd5d
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
366 |
#endif /* GLXCOVERFLOW_H_ */ |