41 |
41 |
42 //User Defined forward declartion |
42 //User Defined forward declartion |
43 class GlxZoomWidget; |
43 class GlxZoomWidget; |
44 class GlxTvOutWrapper; |
44 class GlxTvOutWrapper; |
45 |
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 */ |
46 class GlxFullScreenView : public GlxView |
51 class GlxFullScreenView : public GlxView |
47 { |
52 { |
48 Q_OBJECT |
53 Q_OBJECT |
49 public : |
54 public : |
|
55 /** |
|
56 * Constructor |
|
57 * @param - HbMainWindow object |
|
58 * @param - fullscreen docloader object |
|
59 */ |
50 GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader); |
60 GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader); |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 */ |
51 ~GlxFullScreenView(); |
65 ~GlxFullScreenView(); |
|
66 |
|
67 /** |
|
68 * activate() |
|
69 * ///From GlxView |
|
70 */ |
52 void activate() ; |
71 void activate() ; |
|
72 |
|
73 /** |
|
74 * deActivate() |
|
75 * ///From GlxView |
|
76 */ |
53 void deActivate(); |
77 void deActivate(); |
54 |
78 |
55 /* |
79 /** |
56 * Initialize the coverflow and partially creates the coverflow with one image |
80 * initializeView() - Initialize the coverflow and partially creates the coverflow with one image |
57 * 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 |
58 * and also loads the widgets. |
82 * and also loads the widgets. |
|
83 * @param - pointer of model to retreive the view releted data |
|
84 * @parm - previous view pointer to get the staus of fullscreen mode of the view |
59 */ |
85 */ |
60 void initializeView( QAbstractItemModel *model, GlxView *preView ); |
86 void initializeView( QAbstractItemModel *model, GlxView *preView ); |
61 |
87 |
62 /* |
88 /** |
63 * resets the view, with just one icon being present in the widget |
89 * resetView() - resets the view, with just one icon being present in the widget |
64 * to make the widget light weight in order to make |
90 * to make the widget light weight in order to make transition smooth |
65 * transition smooth |
|
66 */ |
91 */ |
67 void resetView(); |
92 void resetView(); |
|
93 |
|
94 /** |
|
95 * setmodel() |
|
96 * ///from GlxView |
|
97 */ |
68 void setModel(QAbstractItemModel *model); |
98 void setModel(QAbstractItemModel *model); |
|
99 |
|
100 /** |
|
101 * setModelContext() - to set the context mode of the model. |
|
102 */ |
69 void setModelContext ( ); |
103 void setModelContext ( ); |
|
104 |
|
105 /** |
|
106 * cleanUp() - To clean the custom widgets. |
|
107 */ |
70 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 */ |
71 QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); |
114 QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); |
72 |
115 |
73 |
116 |
74 public slots: |
117 public slots: |
75 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 */ |
76 void activateUI(); |
127 void activateUI(); |
|
128 |
|
129 /** |
|
130 * hideUi() - To hide the ui content like status bar, toolbar, and imzge strip. |
|
131 */ |
77 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 */ |
78 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 */ |
79 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 */ |
80 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 */ |
81 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 */ |
82 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 */ |
83 void released(const QModelIndex &index ); |
170 void released(const QModelIndex &index ); |
84 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 */ |
85 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 */ |
86 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 */ |
87 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 */ |
88 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(); |
89 |
211 |
90 protected : |
212 protected : |
|
213 /** |
|
214 * eventFilter - To handle the application foregrond and background event |
|
215 * ///From HbView |
|
216 */ |
91 bool eventFilter(QObject *obj, QEvent *ev); |
217 bool eventFilter(QObject *obj, QEvent *ev); |
92 private: |
218 |
93 |
219 private: |
94 /* |
220 /** |
95 * The widgets are retrieved from the docml |
221 * loadWidgets() - The widgets are retrieved from the docml |
96 */ |
222 */ |
97 void loadWidgets(); |
223 void loadWidgets(); |
98 |
224 |
99 /* |
225 /** |
100 * 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. |
101 */ |
227 */ |
102 void loadViewSection(); |
228 void loadViewSection(); |
103 |
229 |
|
230 /** |
|
231 * setLayout() - To set the widgets laout. |
|
232 */ |
104 void setLayout(); |
233 void setLayout(); |
|
234 |
|
235 /** |
|
236 * addConnection() - Add the call back of the widgets. |
|
237 */ |
105 void addConnection(); |
238 void addConnection(); |
106 void addImageStripConnection(); |
239 |
|
240 /** |
|
241 * removeConnection() - Remove the call back of widgets. |
|
242 */ |
107 void removeConnection(); |
243 void removeConnection(); |
108 void createUiControl(); |
244 |
|
245 /** |
|
246 * setImageStripModel() - set the image strip model. |
|
247 */ |
109 void setImageStripModel(); |
248 void setImageStripModel(); |
110 |
249 |
|
250 /** |
|
251 * loadFullScreenToolBar() - load the fullscreen tool bar from the docml. |
|
252 */ |
111 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 */ |
112 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 */ |
113 void imageSelectionAnimation( const QModelIndex &index ); |
271 void imageSelectionAnimation( const QModelIndex &index ); |
|
272 |
|
273 /** |
|
274 * cancelSelectionAnimation()- To cancel the image selection animation. |
|
275 */ |
114 void cancelSelectionAnimation( ); |
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 */ |
115 int getSubState(); |
286 int getSubState(); |
|
287 |
|
288 /** |
|
289 * setHdmiModel() - set the image strip model. |
|
290 * @param - model |
|
291 */ |
116 void setHdmiModel( QAbstractItemModel *model ); |
292 void setHdmiModel( QAbstractItemModel *model ); |
117 |
293 |
118 private: |
294 private: |
119 QAbstractItemModel *mModel; //no ownership |
295 QAbstractItemModel *mModel; //no ownership |
120 HbMainWindow *mWindow; //no ownership |
296 HbMainWindow *mWindow; //no ownership |