1 /* |
|
2 * Copyright (c) 2004, 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of the VtUiLayout class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "VtUiLayout.h" |
|
22 #include "VtUiPanic.h" |
|
23 #include <fbs.h> |
|
24 #include <avkon.mbg> |
|
25 #include <videotelui.mbg> |
|
26 #include <AknsConstants.h> |
|
27 #include <aknconsts.h> |
|
28 #include <AknIconUtils.h> |
|
29 #include <AknUtils.h> |
|
30 |
|
31 #include <aknlayout.cdl.h> |
|
32 #include <applayout.cdl.h> |
|
33 #include <aknlayoutscalable_apps.cdl.h> |
|
34 #include <aknlayoutscalable_avkon.cdl.h> |
|
35 #include <layoutmetadata.cdl.h> |
|
36 |
|
37 |
|
38 // DATA TYPES |
|
39 |
|
40 // Enumerates files in which there can be bitmaps. |
|
41 enum TVtUiBitmapFiles |
|
42 { |
|
43 // Video Telephone bitmap file. |
|
44 EVtUiVideoBitmapFile, |
|
45 // AVKON bitmap file. |
|
46 EVtUiAvkonBitmapFile |
|
47 }; |
|
48 |
|
49 // Video Telephone application bitmaps |
|
50 _LIT( KVtUiVideoBitmapFileName, |
|
51 "z:\\resource\\apps\\videotelui.mbm" ); |
|
52 // Minimum step for zoom. |
|
53 const TInt KVtUiZoomMinStep = 1; |
|
54 |
|
55 // Maximum step for zoom. |
|
56 const TInt KVtUiZoomMaxStep = 11; |
|
57 |
|
58 // ============================ LOCAL FUNCTIONS =============================== |
|
59 |
|
60 inline TAknWindowComponentLayout DoCompose( TAknWindowComponentLayout aLine1, |
|
61 TAknWindowComponentLayout aLine2 ) |
|
62 { |
|
63 return TAknWindowComponentLayout::Compose( aLine1, aLine2 ); |
|
64 } |
|
65 |
|
66 // ============================ MEMBER FUNCTIONS =============================== |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // VtUiLayout::GetApplicationParentRect |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 void VtUiLayout::GetApplicationParentRect( |
|
73 TRect& aRect ) |
|
74 { |
|
75 // Calculate screen rectangle. |
|
76 TSize screenSize = CCoeEnv::Static()->ScreenDevice()->SizeInPixels(); |
|
77 TRect screenRect( screenSize ); |
|
78 |
|
79 // Calculate application window. |
|
80 TAknLayoutRect appRect; |
|
81 appRect.LayoutRect( |
|
82 screenRect, |
|
83 AknLayout::application_window( screenRect ) ); |
|
84 aRect = appRect.Rect(); |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // VtUiLayout::GetMainPaneLayout |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void VtUiLayout::GetMainPaneLayout( |
|
92 TAknWindowLineLayout& aLayout ) |
|
93 { |
|
94 TRect parent; |
|
95 GetApplicationParentRect( parent ); |
|
96 // Calculate main pane layout. |
|
97 // First 1 = normal status pane, second 1 = control pane. |
|
98 aLayout = AknLayout::main_pane( parent, 0, 1, 1 ); |
|
99 } |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // VtUiLayout::GetFirstWindowBackgroundLayout |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 void VtUiLayout::GetFirstWindowBackgroundLayout( |
|
106 TAknWindowLineLayout& aLayout ) |
|
107 { |
|
108 //aLayout = AppLayout::Uplink_video_image__large__Line_1(); |
|
109 TInt main_pane_variety( 0 ); |
|
110 TInt vid_upl_variety( 18 ); |
|
111 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
112 { |
|
113 main_pane_variety = 4; |
|
114 vid_upl_variety = 17; |
|
115 } |
|
116 |
|
117 TAknWindowComponentLayout layout1 = |
|
118 AknLayoutScalable_Apps::main_pane( main_pane_variety ); |
|
119 TAknWindowComponentLayout layout2 = |
|
120 AknLayoutScalable_Apps::main_video_tele_pane(); |
|
121 TAknWindowComponentLayout layout3 = |
|
122 AknLayoutScalable_Apps:: |
|
123 call_video_uplink_pane_cp1( vid_upl_variety ); |
|
124 TAknWindowComponentLayout layout4 = |
|
125 AknLayoutScalable_Apps::call_video_uplink_pane_g1(); |
|
126 aLayout = |
|
127 DoCompose( |
|
128 DoCompose( layout1, layout2 ), |
|
129 DoCompose( layout3, layout4 ) ).LayoutLine(); |
|
130 } |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // VtUiLayout::GetFirstWindowStreamLayout |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 void VtUiLayout::GetFirstWindowStreamLayout( |
|
137 TAknWindowLineLayout& aLayout ) |
|
138 { |
|
139 TInt main_pane_variety( 0 ); |
|
140 TInt vid_upl_variety( 18 ); |
|
141 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
142 { |
|
143 main_pane_variety = 4; |
|
144 vid_upl_variety = 17; |
|
145 } |
|
146 |
|
147 TAknWindowComponentLayout layout1 = |
|
148 AknLayoutScalable_Apps::main_pane( main_pane_variety ); |
|
149 TAknWindowComponentLayout layout2 = |
|
150 AknLayoutScalable_Apps::main_video_tele_pane(); |
|
151 TAknWindowComponentLayout layout3 = |
|
152 AknLayoutScalable_Apps:: |
|
153 call_video_uplink_pane_cp1( vid_upl_variety ); |
|
154 TAknWindowComponentLayout layout4 = |
|
155 AknLayoutScalable_Apps::video_uplink_pane(); |
|
156 aLayout = |
|
157 DoCompose( |
|
158 DoCompose( layout1, layout2 ), |
|
159 DoCompose( layout3, layout4 ) ).LayoutLine(); |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // VtUiLayout::GetFirstWindowStreamDisabledIconLayout |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 void VtUiLayout::GetFirstWindowStreamDisabledIconLayout( |
|
167 TAknWindowLineLayout& aLayout ) |
|
168 { |
|
169 //aLayout = AppLayout::Uplink_video_image__large__Line_3(); |
|
170 TInt main_pane_variety( 0 ); |
|
171 TInt vid_upl_variety( 18 ); |
|
172 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
173 { |
|
174 main_pane_variety = 4; |
|
175 vid_upl_variety = 17; |
|
176 } |
|
177 |
|
178 TAknWindowComponentLayout layout1 = |
|
179 AknLayoutScalable_Apps::main_pane( main_pane_variety ); |
|
180 TAknWindowComponentLayout layout2 = |
|
181 AknLayoutScalable_Apps::main_video_tele_pane(); |
|
182 TAknWindowComponentLayout layout3 = |
|
183 AknLayoutScalable_Apps:: |
|
184 call_video_uplink_pane_cp1( vid_upl_variety ); |
|
185 TAknWindowComponentLayout layout4 = |
|
186 AknLayoutScalable_Apps::call_video_uplink_pane_g2(); |
|
187 aLayout = |
|
188 DoCompose( |
|
189 DoCompose( layout1, layout2 ), |
|
190 DoCompose( layout3, layout4 ) ).LayoutLine(); |
|
191 } |
|
192 |
|
193 // ----------------------------------------------------------------------------- |
|
194 // VtUiLayout::GetSecondWindowBackgroundLayout |
|
195 // ----------------------------------------------------------------------------- |
|
196 // |
|
197 void VtUiLayout::GetSecondWindowBackgroundLayout( |
|
198 TAknWindowLineLayout& aLayout ) |
|
199 { |
|
200 aLayout = AppLayout::Downlink_video_image_Line_1(); |
|
201 } |
|
202 |
|
203 // ----------------------------------------------------------------------------- |
|
204 // VtUiLayout::GetSecondWindowStreamLayout |
|
205 // ----------------------------------------------------------------------------- |
|
206 // |
|
207 void VtUiLayout::GetSecondWindowStreamLayout( |
|
208 TAknWindowLineLayout& aLayout, TBool aIsToolbar, TBool aIsSubQCIF ) |
|
209 { |
|
210 if( aIsSubQCIF ) |
|
211 { |
|
212 aLayout = AppLayout::video_down_subqcif_pane(); |
|
213 } |
|
214 else |
|
215 { |
|
216 if ( aIsToolbar ) |
|
217 { |
|
218 TInt varietyPr = 27; // portrait |
|
219 TInt varietyLs = 26; // landscape |
|
220 |
|
221 TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation() |
|
222 ? varietyLs : varietyPr ; |
|
223 TAknWindowComponentLayout layout1 = AknLayoutScalable_Apps:: |
|
224 main_video_tele_pane(); |
|
225 TAknWindowComponentLayout layout2 = AknLayoutScalable_Apps:: |
|
226 video_down_crop_pane( varietyIndex ); |
|
227 aLayout = TAknWindowComponentLayout::Compose( layout1, layout2 ). |
|
228 LayoutLine(); |
|
229 |
|
230 } |
|
231 else |
|
232 { |
|
233 aLayout = AppLayout::downlink_stream(); |
|
234 } |
|
235 } |
|
236 } |
|
237 |
|
238 |
|
239 // ----------------------------------------------------------------------------- |
|
240 // VtUiLayout::GetSecondWindowStreamWholeLayout |
|
241 // ----------------------------------------------------------------------------- |
|
242 // |
|
243 void VtUiLayout::GetSecondWindowStreamWholeLayout( |
|
244 TAknWindowLineLayout& aLayout, TBool aIsToolbar, TBool aIsSubQCIF ) |
|
245 { |
|
246 if( aIsSubQCIF ) |
|
247 { |
|
248 aLayout = AppLayout::video_down_subqcif_pane(); |
|
249 } |
|
250 else |
|
251 { |
|
252 if ( aIsToolbar ) |
|
253 { |
|
254 TInt varietyPr = 24; // portrait |
|
255 TInt varietyLs = 22; // landscape |
|
256 |
|
257 TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation() |
|
258 ? varietyLs : varietyPr; |
|
259 TAknWindowComponentLayout layout1 = AknLayoutScalable_Apps:: |
|
260 main_video_tele_pane(); |
|
261 TAknWindowComponentLayout layout2 = AknLayoutScalable_Apps:: |
|
262 video_down_pane( varietyIndex ); |
|
263 aLayout = TAknWindowComponentLayout::Compose( layout1, layout2 ) |
|
264 .LayoutLine(); |
|
265 } |
|
266 else |
|
267 { |
|
268 aLayout = AppLayout::downlink_stream_area(); |
|
269 } |
|
270 } |
|
271 } |
|
272 // ----------------------------------------------------------------------------- |
|
273 // VtUiLayout::GetSecondWindowDisabledIconLayout |
|
274 // ----------------------------------------------------------------------------- |
|
275 // |
|
276 void VtUiLayout::GetSecondWindowDisabledIconLayout( |
|
277 TAknWindowLineLayout& aLayout ) |
|
278 { |
|
279 TInt blind_icon_variety( 4 ); |
|
280 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
281 { |
|
282 blind_icon_variety = 3; |
|
283 } |
|
284 |
|
285 TAknWindowComponentLayout layout2 = |
|
286 AknLayoutScalable_Apps::main_video_tele_pane(); |
|
287 TAknWindowComponentLayout layout4 = |
|
288 AknLayoutScalable_Apps:: |
|
289 call_video_g2( blind_icon_variety ); |
|
290 |
|
291 aLayout = |
|
292 DoCompose( layout2 , layout4 ).LayoutLine(); |
|
293 |
|
294 } |
|
295 |
|
296 // ----------------------------------------------------------------------------- |
|
297 // VtUiLayout::GetSecondWindowWaitingTextLayout |
|
298 // ----------------------------------------------------------------------------- |
|
299 // |
|
300 void VtUiLayout::GetSecondWindowWaitingTextLayout( |
|
301 TAknTextLineLayout& aLayout, |
|
302 const TBool aFirstLine ) |
|
303 { |
|
304 TBool layoutFound = EFalse; |
|
305 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
306 { |
|
307 layoutFound = ETrue; |
|
308 |
|
309 TAknWindowComponentLayout layout1 = |
|
310 AknLayoutScalable_Apps::main_video_tele_pane(); |
|
311 |
|
312 TAknTextComponentLayout layout2 = |
|
313 aFirstLine ? |
|
314 AknLayoutScalable_Apps::call_video_pane_t1(2) : |
|
315 AknLayoutScalable_Apps::call_video_pane_t2(2); |
|
316 |
|
317 aLayout = |
|
318 TAknWindowComponentLayout::ComposeText( |
|
319 layout1, layout2 ).LayoutLine(); |
|
320 } |
|
321 |
|
322 if ( !layoutFound ) |
|
323 { |
|
324 const TInt line( ( aFirstLine ) ? 0 : 1 ); |
|
325 TAknWindowComponentLayout l1 = AknLayoutScalable_Apps:: |
|
326 main_video_tele_pane(); |
|
327 TAknTextComponentLayout l2; |
|
328 if ( !line ) |
|
329 { |
|
330 l2 = AknLayoutScalable_Apps::call_video_pane_t1( 3 ); |
|
331 } |
|
332 else |
|
333 { |
|
334 l2 = AknLayoutScalable_Apps::call_video_pane_t2( 3 ); |
|
335 } |
|
336 aLayout = TAknWindowComponentLayout::ComposeText( l1, l2 ); |
|
337 } |
|
338 } |
|
339 |
|
340 // ----------------------------------------------------------------------------- |
|
341 // VtUiLayout::GetNumberEntryAreaLayout |
|
342 // ----------------------------------------------------------------------------- |
|
343 // |
|
344 void VtUiLayout::GetNumberEntryAreaLayout( |
|
345 TAknWindowLineLayout& aLayout ) |
|
346 { |
|
347 TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 2 : 0; |
|
348 |
|
349 TAknWindowComponentLayout layout1 = |
|
350 AknLayoutScalable_Apps::main_call_pane(); |
|
351 TAknWindowComponentLayout layout2 = |
|
352 AknLayoutScalable_Apps::popup_number_entry_window( variety ); |
|
353 |
|
354 aLayout = |
|
355 TAknWindowComponentLayout::Compose( layout1, layout2 ).LayoutLine(); |
|
356 } |
|
357 |
|
358 // ----------------------------------------------------------------------------- |
|
359 // VtUiLayout::GetAudioRoutingIconLayout |
|
360 // ----------------------------------------------------------------------------- |
|
361 // |
|
362 void VtUiLayout::GetAudioRoutingIconLayout( |
|
363 TAknWindowLineLayout& aLayout ) |
|
364 { |
|
365 aLayout = AppLayout::Navipane_elements_and_descendant_panes_Line_1(); |
|
366 } |
|
367 |
|
368 // ----------------------------------------------------------------------------- |
|
369 // VtUiLayout::GetCallDurationTextLayout |
|
370 // ----------------------------------------------------------------------------- |
|
371 // |
|
372 void VtUiLayout::GetCallDurationTextLayout( |
|
373 TAknTextLineLayout& aLayout ) |
|
374 { |
|
375 aLayout = AppLayout::Navipanetexts_Line_1(); |
|
376 } |
|
377 |
|
378 // ----------------------------------------------------------------------------- |
|
379 // VtUiLayout::GetMutedTextLayout |
|
380 // ----------------------------------------------------------------------------- |
|
381 // |
|
382 void VtUiLayout::GetMutedTextLayout( |
|
383 TAknTextLineLayout& aLayout ) |
|
384 { |
|
385 aLayout = AppLayout::Navipanetexts_Line_2(); |
|
386 } |
|
387 |
|
388 // ----------------------------------------------------------------------------- |
|
389 // VtUiLayout::GetZoomPaneLayout |
|
390 // ----------------------------------------------------------------------------- |
|
391 // |
|
392 void VtUiLayout::GetZoomPaneLayout( |
|
393 TAknWindowLineLayout& aLayout ) |
|
394 { |
|
395 aLayout = AppLayout::zooming_pane(); |
|
396 } |
|
397 |
|
398 // ----------------------------------------------------------------------------- |
|
399 // VtUiLayout::GetZoomDirLayout |
|
400 // ----------------------------------------------------------------------------- |
|
401 // |
|
402 void VtUiLayout::GetZoomDirLayout( |
|
403 TAknWindowLineLayout& aLayout ) |
|
404 { |
|
405 aLayout = AppLayout::Zooming_pane_elements_Line_1(); |
|
406 } |
|
407 |
|
408 // ----------------------------------------------------------------------------- |
|
409 // VtUiLayout::GetZoomAreaLayout |
|
410 // ----------------------------------------------------------------------------- |
|
411 // |
|
412 void VtUiLayout::GetZoomAreaLayout( |
|
413 TAknWindowLineLayout& aLayout ) |
|
414 { |
|
415 aLayout = AppLayout::Zooming_pane_elements_Line_2(); |
|
416 } |
|
417 |
|
418 // ----------------------------------------------------------------------------- |
|
419 // VtUiLayout::GetZoomStepLayout |
|
420 // ----------------------------------------------------------------------------- |
|
421 // |
|
422 void VtUiLayout::GetZoomStepLayout( |
|
423 TAknWindowLineLayout& aLayout, |
|
424 TInt aZoomStep ) |
|
425 { |
|
426 aZoomStep = Max( Min( aZoomStep, KVtUiZoomMaxStep ), KVtUiZoomMinStep ); |
|
427 aZoomStep--; // 1 .. 11 is mapped to 0 .. 10. |
|
428 |
|
429 // Function pointer table would be more efficient, but AppLayout methods |
|
430 // are inline. |
|
431 |
|
432 switch ( aZoomStep ) |
|
433 { |
|
434 case 0: |
|
435 aLayout = AppLayout::Zooming_steps_sizes_Line_1(); |
|
436 break; |
|
437 |
|
438 case 1: |
|
439 aLayout = AppLayout::Zooming_steps_sizes_Line_2(); |
|
440 break; |
|
441 |
|
442 case 2: |
|
443 aLayout = AppLayout::Zooming_steps_sizes_Line_3(); |
|
444 break; |
|
445 |
|
446 case 3: |
|
447 aLayout = AppLayout::Zooming_steps_sizes_Line_4(); |
|
448 break; |
|
449 |
|
450 case 4: |
|
451 aLayout = AppLayout::Zooming_steps_sizes_Line_5(); |
|
452 break; |
|
453 |
|
454 case 5: |
|
455 aLayout = AppLayout::Zooming_steps_sizes_Line_6(); |
|
456 break; |
|
457 |
|
458 case 6: |
|
459 aLayout = AppLayout::Zooming_steps_sizes_Line_7(); |
|
460 break; |
|
461 |
|
462 case 7: |
|
463 aLayout = AppLayout::Zooming_steps_sizes_Line_8(); |
|
464 break; |
|
465 |
|
466 case 8: |
|
467 aLayout = AppLayout::Zooming_steps_sizes_Line_9(); |
|
468 break; |
|
469 |
|
470 case 9: |
|
471 aLayout = AppLayout::Zooming_steps_sizes_Line_10(); |
|
472 break; |
|
473 |
|
474 case 10: |
|
475 default: |
|
476 aLayout = AppLayout::Zooming_steps_sizes_Line_11(); |
|
477 break; |
|
478 } |
|
479 } |
|
480 |
|
481 // ----------------------------------------------------------------------------- |
|
482 // VtUiLayout::MapBitmapToSkinId |
|
483 // ----------------------------------------------------------------------------- |
|
484 // |
|
485 TAknsItemID VtUiLayout::MapBitmapToSkinId( TVtUiBitmapId aId ) |
|
486 { |
|
487 TAknsItemID skinId = KAknsIIDNone; |
|
488 |
|
489 switch ( aId ) |
|
490 { |
|
491 case EVtUiBitmap_qgn_graf_call_video_out_bg: |
|
492 skinId = KAknsIIDQgnGrafCallVideoOutBg; |
|
493 break; |
|
494 |
|
495 case EVtUiBitmap_qgn_indi_call_video_blind_in: |
|
496 skinId = KAknsIIDQgnIndiCallVideoBlindIn; |
|
497 break; |
|
498 |
|
499 case EVtUiBitmap_qgn_indi_call_video_blind_out: |
|
500 skinId = KAknsIIDQgnIndiCallVideoBlindOut; |
|
501 break; |
|
502 |
|
503 case EVtUiBitmap_qgn_indi_call_video_blind_in_mask_icon: |
|
504 skinId = KAknsIIDQgnIndiCallVideoBlindInMaskIcon; |
|
505 break; |
|
506 |
|
507 case EVtUiBitmap_qgn_indi_call_video_blind_out_mask_icon: |
|
508 skinId = KAknsIIDQgnIndiCallVideoBlindOutMaskIcon; |
|
509 break; |
|
510 |
|
511 case EVtUiBitmap_qgn_indi_earpiece: |
|
512 skinId = KAknsIIDQgnIndiEarpiece; |
|
513 break; |
|
514 |
|
515 case EVtUiBitmap_qgn_indi_speaker: |
|
516 skinId = KAknsIIDQgnIndiSpeaker; |
|
517 break; |
|
518 |
|
519 case EVtUiBitmap_qgn_indi_zoom_dir: |
|
520 skinId = KAknsIIDQgnIndiZoomDir; |
|
521 break; |
|
522 |
|
523 case EVtUiBitmap_qgn_graf_zoom_area: |
|
524 skinId = KAknsIIDQgnGrafZoomArea; |
|
525 break; |
|
526 |
|
527 case EVtUiBitmap_qgn_indi_zoom_min: |
|
528 skinId = KAknsIIDQgnIndiZoomMin; |
|
529 break; |
|
530 |
|
531 case EVtUiBitmap_qgn_indi_zoom_max: |
|
532 skinId = KAknsIIDQgnIndiZoomMax; |
|
533 break; |
|
534 |
|
535 case EVtUiBitmap_qgn_prop_sub_current: |
|
536 case EVtUiBitmap_qgn_prop_sub_current_mask: |
|
537 skinId = KAknsIIDQgnPropSubCurrent; |
|
538 break; |
|
539 |
|
540 case EVtUiBitmap_qgn_indi_button_end_active_call: |
|
541 case EVtUiBitmap_qgn_indi_button_end_active_call_mask: |
|
542 skinId = KAknsIIDQgnIndiButtonEndCall; |
|
543 break; |
|
544 |
|
545 default: |
|
546 // Default value is OK. |
|
547 break; |
|
548 } |
|
549 |
|
550 return skinId; |
|
551 } |
|
552 |
|
553 // ----------------------------------------------------------------------------- |
|
554 // VtUiLayout::MapBitmapToColorId |
|
555 // ----------------------------------------------------------------------------- |
|
556 // |
|
557 TBool VtUiLayout::MapBitmapToColorId( |
|
558 TVtUiBitmapId aId, |
|
559 TAknsItemID& aColorId, |
|
560 TInt& aColorIndex ) |
|
561 { |
|
562 TBool result = EFalse; |
|
563 |
|
564 aColorId = KAknsIIDNone; |
|
565 aColorIndex = KErrNotFound; |
|
566 |
|
567 switch ( aId ) |
|
568 { |
|
569 case EVtUiBitmap_qgn_indi_earpiece: |
|
570 case EVtUiBitmap_qgn_indi_earpiece_mask: |
|
571 case EVtUiBitmap_qgn_indi_speaker: |
|
572 case EVtUiBitmap_qgn_indi_speaker_mask: |
|
573 case EVtUiBitmap_qgn_indi_zoom_dir: |
|
574 case EVtUiBitmap_qgn_indi_zoom_dir_mask: |
|
575 result = ETrue; |
|
576 aColorId = KAknsIIDQsnIconColors; |
|
577 aColorIndex = EAknsCIQsnIconColorsCG7; |
|
578 break; |
|
579 |
|
580 default: |
|
581 // Default value is OK. |
|
582 break; |
|
583 } |
|
584 |
|
585 return result; |
|
586 } |
|
587 |
|
588 // ----------------------------------------------------------------------------- |
|
589 // VtUiLayout::Resolve |
|
590 // ----------------------------------------------------------------------------- |
|
591 // |
|
592 void VtUiLayout::Resolve( |
|
593 TVtUiBitmapId aId, |
|
594 TFileName& aFileName, |
|
595 TInt& aIndex ) |
|
596 { |
|
597 TInt index = KErrNotFound; |
|
598 TVtUiBitmapFiles file = EVtUiVideoBitmapFile; |
|
599 |
|
600 switch ( aId ) |
|
601 { |
|
602 case EVtUiBitmap_qgn_graf_call_video_out_bg: |
|
603 index = EMbmVideoteluiQgn_graf_call_video_out_bg; |
|
604 break; |
|
605 |
|
606 case EVtUiBitmap_qgn_graf_call_video_out_bg_mask: |
|
607 index = EMbmVideoteluiQgn_graf_call_video_out_bg_mask; |
|
608 break; |
|
609 |
|
610 case EVtUiBitmap_qgn_indi_call_video_blind_in: |
|
611 index = EMbmVideoteluiQgn_indi_call_video_blind_in; |
|
612 break; |
|
613 |
|
614 case EVtUiBitmap_qgn_indi_call_video_blind_out: |
|
615 index = EMbmVideoteluiQgn_indi_call_video_blind_out; |
|
616 break; |
|
617 |
|
618 case EVtUiBitmap_qgn_indi_earpiece: |
|
619 file = EVtUiAvkonBitmapFile; |
|
620 index = EMbmAvkonQgn_indi_earpiece; |
|
621 break; |
|
622 |
|
623 case EVtUiBitmap_qgn_indi_earpiece_mask: |
|
624 file = EVtUiAvkonBitmapFile; |
|
625 index = EMbmAvkonQgn_indi_earpiece_mask; |
|
626 break; |
|
627 |
|
628 case EVtUiBitmap_qgn_indi_speaker: |
|
629 file = EVtUiAvkonBitmapFile; |
|
630 index = EMbmAvkonQgn_indi_speaker; |
|
631 break; |
|
632 |
|
633 case EVtUiBitmap_qgn_indi_speaker_mask: |
|
634 file = EVtUiAvkonBitmapFile; |
|
635 index = EMbmAvkonQgn_indi_speaker_mask; |
|
636 break; |
|
637 |
|
638 case EVtUiBitmap_qgn_graf_zoom_area: |
|
639 index = EMbmVideoteluiQgn_graf_zoom_area; |
|
640 break; |
|
641 |
|
642 case EVtUiBitmap_qgn_indi_zoom_dir: |
|
643 index = EMbmVideoteluiQgn_indi_zoom_dir; |
|
644 break; |
|
645 |
|
646 case EVtUiBitmap_qgn_indi_zoom_dir_mask: |
|
647 index = EMbmVideoteluiQgn_indi_zoom_dir_mask; |
|
648 break; |
|
649 |
|
650 case EVtUiBitmap_qgn_indi_zoom_min: |
|
651 index = EMbmVideoteluiQgn_indi_zoom_min; |
|
652 break; |
|
653 |
|
654 case EVtUiBitmap_qgn_indi_zoom_max: |
|
655 index = EMbmVideoteluiQgn_indi_zoom_max; |
|
656 break; |
|
657 |
|
658 case EVtUiBitmap_qgn_indi_call_video_blind_in_mask_icon: |
|
659 index = EMbmVideoteluiQgn_indi_call_video_blind_in_mask_icon; |
|
660 break; |
|
661 |
|
662 case EVtUiBitmap_qgn_indi_call_video_blind_out_mask_icon: |
|
663 index = EMbmVideoteluiQgn_indi_call_video_blind_out_mask_icon; |
|
664 break; |
|
665 |
|
666 case EVtUiBitmap_qgn_prop_sub_current: |
|
667 file = EVtUiAvkonBitmapFile; |
|
668 index = EMbmAvkonQgn_prop_sub_current; |
|
669 break; |
|
670 |
|
671 case EVtUiBitmap_qgn_prop_sub_current_mask: |
|
672 file = EVtUiAvkonBitmapFile; |
|
673 index = EMbmAvkonQgn_prop_sub_current_mask; |
|
674 break; |
|
675 case EVtUiBitmap_qgn_indi_button_end_active_call: |
|
676 index = EMbmVideoteluiQgn_indi_button_end_active_call; |
|
677 break; |
|
678 |
|
679 case EVtUiBitmap_qgn_indi_button_end_active_call_mask: |
|
680 index = EMbmVideoteluiQgn_indi_button_end_active_call_mask; |
|
681 break; |
|
682 |
|
683 default: |
|
684 VtUiPanic::Panic( EVtUiPanicInvalidBitmapId ); |
|
685 break; |
|
686 } |
|
687 |
|
688 aIndex = index; |
|
689 switch ( file ) |
|
690 { |
|
691 case EVtUiVideoBitmapFile: |
|
692 aFileName = KVtUiVideoBitmapFileName; |
|
693 break; |
|
694 |
|
695 case EVtUiAvkonBitmapFile: |
|
696 aFileName = AknIconUtils::AvkonIconFileName(); |
|
697 break; |
|
698 |
|
699 default: |
|
700 VtUiPanic::Panic( EVtUiPanicInvalidBitmapFile ); |
|
701 break; |
|
702 } |
|
703 } |
|
704 |
|
705 // ----------------------------------------------------------------------------- |
|
706 // VtUiLayout::IsLandscapeOrientation |
|
707 // ----------------------------------------------------------------------------- |
|
708 // |
|
709 TBool VtUiLayout::IsLandscapeOrientation() |
|
710 { |
|
711 return Layout_Meta_Data::IsLandscapeOrientation(); |
|
712 } |
|
713 |
|
714 // ----------------------------------------------------------------------------- |
|
715 // VtUiLayout::GetButtonPaneLayout |
|
716 // ----------------------------------------------------------------------------- |
|
717 // |
|
718 void VtUiLayout::GetButtonPaneLayout( TAknWindowLineLayout& aLayout ) |
|
719 { |
|
720 // TInt main_pane_variety = IsLandscapeOrientation() ? 1 : 2; |
|
721 TInt main_pane_variety( 0 ); |
|
722 TInt vid_btn_variety( 2 ); |
|
723 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
724 { |
|
725 main_pane_variety = 4; |
|
726 vid_btn_variety = 1; |
|
727 } |
|
728 |
|
729 |
|
730 TAknWindowComponentLayout layout1 = AknLayoutScalable_Apps::main_pane( main_pane_variety ); |
|
731 |
|
732 TAknWindowComponentLayout layout2 = AknLayoutScalable_Apps::vidtel_button_pane( vid_btn_variety ); |
|
733 |
|
734 aLayout = DoCompose( layout1, layout2 ).LayoutLine(); |
|
735 } |
|
736 // End of File |
|