38 |
41 |
39 //User Defined forward declartion |
42 //User Defined forward declartion |
40 class GlxZoomWidget; |
43 class GlxZoomWidget; |
41 class GlxTvOutWrapper; |
44 class GlxTvOutWrapper; |
42 |
45 |
|
46 /** |
|
47 * Class Description |
|
48 * This is full screen view class to show the image in fullscreen, zoom the image and |
|
49 * browse the image through coverflow and imagstrip |
|
50 */ |
43 class GlxFullScreenView : public GlxView |
51 class GlxFullScreenView : public GlxView |
44 { |
52 { |
45 Q_OBJECT |
53 Q_OBJECT |
46 public : |
54 public : |
|
55 /** |
|
56 * Constructor |
|
57 * @param - HbMainWindow object |
|
58 * @param - fullscreen docloader object |
|
59 */ |
47 GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader); |
60 GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader); |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 */ |
48 ~GlxFullScreenView(); |
65 ~GlxFullScreenView(); |
|
66 |
|
67 /** |
|
68 * activate() |
|
69 * ///From GlxView |
|
70 */ |
49 void activate() ; |
71 void activate() ; |
|
72 |
|
73 /** |
|
74 * deActivate() |
|
75 * ///From GlxView |
|
76 */ |
50 void deActivate(); |
77 void deActivate(); |
51 |
78 |
52 /* |
79 /** |
53 * Initialize the coverflow and partially creates the coverflow with one image |
80 * initializeView() - Initialize the coverflow and partially creates the coverflow with one image |
54 * to make the widget light weight in order to make transition smooth |
81 * to make the widget light weight in order to make transition smooth |
55 * and also loads the widgets. |
82 * and also loads the widgets. |
56 */ |
83 * @param - pointer of model to retreive the view releted data |
57 void initializeView(QAbstractItemModel *model); |
84 * @parm - previous view pointer to get the staus of fullscreen mode of the view |
58 |
85 */ |
59 /* |
86 void initializeView( QAbstractItemModel *model, GlxView *preView ); |
60 * resets the view, with just one icon being present in the widget |
87 |
61 * to make the widget light weight in order to make |
88 /** |
62 * transition smooth |
89 * resetView() - resets the view, with just one icon being present in the widget |
|
90 * to make the widget light weight in order to make transition smooth |
63 */ |
91 */ |
64 void resetView(); |
92 void resetView(); |
|
93 |
|
94 /** |
|
95 * setmodel() |
|
96 * ///from GlxView |
|
97 */ |
65 void setModel(QAbstractItemModel *model); |
98 void setModel(QAbstractItemModel *model); |
|
99 |
|
100 /** |
|
101 * setModelContext() - to set the context mode of the model. |
|
102 */ |
66 void setModelContext ( ); |
103 void setModelContext ( ); |
|
104 |
|
105 /** |
|
106 * cleanUp() - To clean the custom widgets. |
|
107 */ |
67 void cleanUp(); |
108 void cleanUp(); |
|
109 |
|
110 /** |
|
111 * getAnimationItem() - To return the animation object to play the view transition animation. |
|
112 * @return pointer of widget on which animation are suppose to play. |
|
113 */ |
68 QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); |
114 QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); |
69 |
115 |
70 |
116 |
71 public slots: |
117 public slots: |
72 void orientationChanged(Qt::Orientation); |
118 /** |
|
119 * orientationChanged() - Slot to upadte the layout when orientation of device has changed |
|
120 * @param new orientation |
|
121 */ |
|
122 void orientationChanged( Qt::Orientation ); |
|
123 |
|
124 /** |
|
125 * activateUI() - To show the ui content like status bar, toolbar, and imzge strip. |
|
126 */ |
73 void activateUI(); |
127 void activateUI(); |
|
128 |
|
129 /** |
|
130 * hideUi() - To hide the ui content like status bar, toolbar, and imzge strip. |
|
131 */ |
74 void hideUi(); |
132 void hideUi(); |
|
133 |
|
134 /** |
|
135 * changeSelectedIndex() - Call back when index is chnaged due to browsing of images in coverflow |
|
136 * It will update the selected index in model and notify other widget about index changed. |
|
137 * @param - index of new selected item. |
|
138 */ |
75 void changeSelectedIndex(const QModelIndex &index); |
139 void changeSelectedIndex(const QModelIndex &index); |
|
140 |
|
141 /** |
|
142 * indexChanged() - call back when index is changed from the image strip. |
|
143 * It will update the selected index in model and notify other widget about index changed. |
|
144 * @param - index of new selected item. |
|
145 */ |
76 void indexChanged(const QModelIndex &index ); |
146 void indexChanged(const QModelIndex &index ); |
|
147 |
|
148 /** |
|
149 * scrollingStarted() - Call back function to get notification of when scrolling of |
|
150 * image strip is start. |
|
151 */ |
77 void scrollingStarted(); |
152 void scrollingStarted(); |
|
153 |
|
154 /** |
|
155 * scrollingEnded() - Call back function to get notification of when scrolling of |
|
156 * image strip is stop. |
|
157 */ |
78 void scrollingEnded(); |
158 void scrollingEnded(); |
|
159 |
|
160 /** |
|
161 * pressed() - Call back function to get notification of user pressed mouse key or touch the fingure. |
|
162 * @param - index of selected item. |
|
163 */ |
79 void pressed(const QModelIndex &index ); |
164 void pressed(const QModelIndex &index ); |
|
165 |
|
166 /** |
|
167 * released() - Call back function to get notification of user released mouse key or released the fingure. |
|
168 * @param - index of new selected item. |
|
169 */ |
80 void released(const QModelIndex &index ); |
170 void released(const QModelIndex &index ); |
81 void setVisvalWindowIndex(); |
171 |
|
172 /** |
|
173 * setVisvalWindowIndex() - Set the viisual window index of medialist. |
|
174 */ |
|
175 void setVisvalWindowIndex(); |
|
176 |
|
177 /** |
|
178 * coverFlowEventHandle() - Handle the event generated by cover flow. |
|
179 * @param - cover flow event type |
|
180 */ |
82 void coverFlowEventHandle( GlxCoverFlowEvent e); |
181 void coverFlowEventHandle( GlxCoverFlowEvent e); |
|
182 |
|
183 /** |
|
184 * effectFinished() - call back when ui on\off effect has finished. |
|
185 * @param - staus of effect |
|
186 */ |
83 void effectFinished( const HbEffect::EffectStatus ); |
187 void effectFinished( const HbEffect::EffectStatus ); |
|
188 |
|
189 /** |
|
190 * imageSelectionEffectFinished() - call back when ui image strip selection effect has been finished. |
|
191 * @param - staus of effect |
|
192 */ |
84 void imageSelectionEffectFinished( const HbEffect::EffectStatus ); |
193 void imageSelectionEffectFinished( const HbEffect::EffectStatus ); |
|
194 |
|
195 /** |
|
196 * orientChangeAnimFinished() - call back when custom orientation change effect has been finished. |
|
197 * @param - staus of effect |
|
198 */ |
|
199 void orientChangeAnimFinished( const HbEffect::EffectStatus ); |
|
200 |
|
201 /** |
|
202 * effectFinished - call back when ui on\off effect has finished |
|
203 * @param - staus of effect |
|
204 */ |
85 void handleToolBarAction(); |
205 void handleToolBarAction(); |
|
206 |
|
207 /** |
|
208 * In case of image fetcher handle select command and emit selected index and model |
|
209 */ |
|
210 void handleFSSelect(); |
86 |
211 |
87 protected : |
212 protected : |
|
213 /** |
|
214 * eventFilter - To handle the application foregrond and background event |
|
215 * ///From HbView |
|
216 */ |
88 bool eventFilter(QObject *obj, QEvent *ev); |
217 bool eventFilter(QObject *obj, QEvent *ev); |
89 private: |
218 |
90 |
219 private: |
91 /* |
220 /** |
92 * The widgets are retrieved from the docml |
221 * loadWidgets() - The widgets are retrieved from the docml |
93 */ |
222 */ |
94 void loadWidgets(); |
223 void loadWidgets(); |
95 |
224 |
96 /* |
225 /** |
97 * Loads the corresponding sections in the docml while the orentation is changed. |
226 * loadViewSection() - Loads the corresponding sections in the docml while the orentation is changed. |
98 */ |
227 */ |
99 void loadViewSection(); |
228 void loadViewSection(); |
100 |
229 |
|
230 /** |
|
231 * setLayout() - To set the widgets laout. |
|
232 */ |
101 void setLayout(); |
233 void setLayout(); |
|
234 |
|
235 /** |
|
236 * addConnection() - Add the call back of the widgets. |
|
237 */ |
102 void addConnection(); |
238 void addConnection(); |
103 void addImageStripConnection(); |
239 |
|
240 /** |
|
241 * removeConnection() - Remove the call back of widgets. |
|
242 */ |
104 void removeConnection(); |
243 void removeConnection(); |
105 void createUiControl(); |
244 |
|
245 /** |
|
246 * setImageStripModel() - set the image strip model. |
|
247 */ |
106 void setImageStripModel(); |
248 void setImageStripModel(); |
107 |
249 |
|
250 /** |
|
251 * loadFullScreenToolBar() - load the fullscreen tool bar from the docml. |
|
252 */ |
108 void loadFullScreenToolBar(); |
253 void loadFullScreenToolBar(); |
|
254 |
|
255 /** |
|
256 * addToolBarAction() - Crete and add the toolbar acton in toolbar. |
|
257 * @param - coomand id to recognise the action. |
|
258 * @param - toolbar action icon. |
|
259 * @param - action name it is used for automation of test cases. |
|
260 */ |
109 void addToolBarAction( int commandId, const QString &iconName, const QString &name) ; |
261 void addToolBarAction( int commandId, const QString &iconName, const QString &name) ; |
|
262 |
|
263 /** |
|
264 * initAnimationItem() - Initialise the custom animation item. |
|
265 */ |
|
266 void initAnimationItem(); |
|
267 |
|
268 /** |
|
269 * imageSelectionAnimation() - To trigger the image setection animtaion form the imge strip. |
|
270 */ |
110 void imageSelectionAnimation( const QModelIndex &index ); |
271 void imageSelectionAnimation( const QModelIndex &index ); |
|
272 |
|
273 /** |
|
274 * cancelSelectionAnimation()- To cancel the image selection animation. |
|
275 */ |
|
276 void cancelSelectionAnimation( ); |
|
277 |
|
278 /** |
|
279 * playOrientChangeAnim() - To trigger the custom orientation change animation. |
|
280 */ |
|
281 void playOrientChangeAnim(); |
|
282 |
|
283 /** |
|
284 * get the substate of fullscreen state. |
|
285 */ |
111 int getSubState(); |
286 int getSubState(); |
|
287 |
|
288 /** |
|
289 * setHdmiModel() - set the image strip model. |
|
290 * @param - model |
|
291 */ |
112 void setHdmiModel( QAbstractItemModel *model ); |
292 void setHdmiModel( QAbstractItemModel *model ); |
|
293 |
113 private: |
294 private: |
114 QAbstractItemModel *mModel; //no ownership |
295 QAbstractItemModel *mModel; //no ownership |
115 HbMainWindow *mWindow; //no ownership |
296 HbMainWindow *mWindow; //no ownership |
116 GlxCoverFlow *mCoverFlow; |
297 GlxCoverFlow *mCoverFlow; |
117 HbGridView *mImageStrip; |
298 HbGridView *mImageStrip; |
118 QTimer *mUiOffTimer; //use for ui off after 30 sec |
299 QTimer *mUiOffTimer; //use for ui off after 30 sec |
119 HbIconItem *mIconItem ; //temporary item for play the image strip select animation |
300 HbIconItem *mIconItems[ NBR_ANIM_ITEM ] ; //temporary item for play the image strip select animation |
120 GlxTvOutWrapper *mTvOutWrapper; |
301 GlxTvOutWrapper *mTvOutWrapper; |
121 HbToolBar *mFullScreenToolBar; //Fullscreen Toolbar |
302 HbToolBar *mFullScreenToolBar; //Fullscreen Toolbar |
122 //for Zoom |
303 //for Zoom |
123 GlxZoomWidget *mZoomWidget; |
304 GlxZoomWidget *mZoomWidget; |
124 HbDocumentLoader *mDocLoader; |
305 HbDocumentLoader *mDocLoader; |