|
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( 14 ); |
|
111 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
112 { |
|
113 main_pane_variety = 4; |
|
114 vid_upl_variety = 0; |
|
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( 14 ); |
|
141 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
142 { |
|
143 main_pane_variety = 4; |
|
144 vid_upl_variety = 0; |
|
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( 14 ); |
|
172 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
173 { |
|
174 main_pane_variety = 4; |
|
175 vid_upl_variety = 0; |
|
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 // non touch |
|
219 TInt varietyPr = 8; // portrait |
|
220 TInt varietyLs = 10; // landscape |
|
221 if ( AknLayoutUtils::PenEnabled() ) |
|
222 { |
|
223 varietyPr = 11; // portrait |
|
224 varietyLs = 12; // landscape |
|
225 } |
|
226 |
|
227 TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation() |
|
228 ? varietyLs : varietyPr ; |
|
229 TAknWindowComponentLayout layout1 = AknLayoutScalable_Apps:: |
|
230 main_video_tele_pane(); |
|
231 TAknWindowComponentLayout layout2 = AknLayoutScalable_Apps:: |
|
232 video_down_crop_pane( varietyIndex ); |
|
233 aLayout = TAknWindowComponentLayout::Compose( layout1, layout2 ). |
|
234 LayoutLine(); |
|
235 |
|
236 } |
|
237 else |
|
238 { |
|
239 aLayout = AppLayout::downlink_stream(); |
|
240 } |
|
241 } |
|
242 } |
|
243 |
|
244 |
|
245 // ----------------------------------------------------------------------------- |
|
246 // VtUiLayout::GetSecondWindowStreamWholeLayout |
|
247 // ----------------------------------------------------------------------------- |
|
248 // |
|
249 void VtUiLayout::GetSecondWindowStreamWholeLayout( |
|
250 TAknWindowLineLayout& aLayout, TBool aIsToolbar, TBool aIsSubQCIF ) |
|
251 { |
|
252 if( aIsSubQCIF ) |
|
253 { |
|
254 aLayout = AppLayout::video_down_subqcif_pane(); |
|
255 } |
|
256 else |
|
257 { |
|
258 if ( aIsToolbar ) |
|
259 { |
|
260 // non touch |
|
261 TInt varietyPr = 5; // portrait |
|
262 TInt varietyLs = 7; // landscape |
|
263 if ( AknLayoutUtils::PenEnabled() ) |
|
264 { |
|
265 varietyPr = 8; // portrait |
|
266 varietyLs = 1; // landscape |
|
267 } |
|
268 |
|
269 TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation() |
|
270 ? varietyLs : varietyPr; |
|
271 TAknWindowComponentLayout layout1 = AknLayoutScalable_Apps:: |
|
272 main_video_tele_pane(); |
|
273 TAknWindowComponentLayout layout2 = AknLayoutScalable_Apps:: |
|
274 video_down_pane( varietyIndex ); |
|
275 aLayout = TAknWindowComponentLayout::Compose( layout1, layout2 ) |
|
276 .LayoutLine(); |
|
277 } |
|
278 else |
|
279 { |
|
280 aLayout = AppLayout::downlink_stream_area(); |
|
281 } |
|
282 } |
|
283 } |
|
284 // ----------------------------------------------------------------------------- |
|
285 // VtUiLayout::GetSecondWindowDisabledIconLayout |
|
286 // ----------------------------------------------------------------------------- |
|
287 // |
|
288 void VtUiLayout::GetSecondWindowDisabledIconLayout( |
|
289 TAknWindowLineLayout& aLayout ) |
|
290 { |
|
291 aLayout = AppLayout::Downlink_video_image_Line_3(); |
|
292 } |
|
293 |
|
294 // ----------------------------------------------------------------------------- |
|
295 // VtUiLayout::GetSecondWindowWaitingTextLayout |
|
296 // ----------------------------------------------------------------------------- |
|
297 // |
|
298 void VtUiLayout::GetSecondWindowWaitingTextLayout( |
|
299 TAknTextLineLayout& aLayout, |
|
300 const TBool aFirstLine ) |
|
301 { |
|
302 TBool layoutFound = EFalse; |
|
303 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
|
304 { |
|
305 layoutFound = ETrue; |
|
306 |
|
307 TAknWindowComponentLayout layout1 = |
|
308 AknLayoutScalable_Apps::main_video_tele_pane(); |
|
309 |
|
310 TAknTextComponentLayout layout2 = |
|
311 aFirstLine ? |
|
312 AknLayoutScalable_Apps::call_video_pane_t1() : |
|
313 AknLayoutScalable_Apps::call_video_pane_t2(); |
|
314 |
|
315 aLayout = |
|
316 TAknWindowComponentLayout::ComposeText( |
|
317 layout1, layout2 ).LayoutLine(); |
|
318 } |
|
319 |
|
320 if ( !layoutFound ) |
|
321 { |
|
322 const TInt line( ( aFirstLine ) ? 0 : 1 ); |
|
323 TAknWindowComponentLayout l1 = AknLayoutScalable_Apps:: |
|
324 main_video_tele_pane(); |
|
325 TAknTextComponentLayout l2; |
|
326 if ( !line ) |
|
327 { |
|
328 l2 = AknLayoutScalable_Apps::call_video_pane_t1( 1 ); |
|
329 } |
|
330 else |
|
331 { |
|
332 l2 = AknLayoutScalable_Apps::call_video_pane_t2( 1 ); |
|
333 } |
|
334 aLayout = TAknWindowComponentLayout::ComposeText( l1, l2 ); |
|
335 } |
|
336 } |
|
337 |
|
338 // ----------------------------------------------------------------------------- |
|
339 // VtUiLayout::GetNumberEntryAreaLayout |
|
340 // ----------------------------------------------------------------------------- |
|
341 // |
|
342 void VtUiLayout::GetNumberEntryAreaLayout( |
|
343 TAknWindowLineLayout& aLayout ) |
|
344 { |
|
345 TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 2 : 0; |
|
346 |
|
347 TAknWindowComponentLayout layout1 = |
|
348 AknLayoutScalable_Apps::main_call_pane(); |
|
349 TAknWindowComponentLayout layout2 = |
|
350 AknLayoutScalable_Apps::popup_number_entry_window( variety ); |
|
351 |
|
352 aLayout = |
|
353 TAknWindowComponentLayout::Compose( layout1, layout2 ).LayoutLine(); |
|
354 } |
|
355 |
|
356 // ----------------------------------------------------------------------------- |
|
357 // VtUiLayout::GetAudioRoutingIconLayout |
|
358 // ----------------------------------------------------------------------------- |
|
359 // |
|
360 void VtUiLayout::GetAudioRoutingIconLayout( |
|
361 TAknWindowLineLayout& aLayout ) |
|
362 { |
|
363 aLayout = AppLayout::Navipane_elements_and_descendant_panes_Line_1(); |
|
364 } |
|
365 |
|
366 // ----------------------------------------------------------------------------- |
|
367 // VtUiLayout::GetCallDurationTextLayout |
|
368 // ----------------------------------------------------------------------------- |
|
369 // |
|
370 void VtUiLayout::GetCallDurationTextLayout( |
|
371 TAknTextLineLayout& aLayout ) |
|
372 { |
|
373 aLayout = AppLayout::Navipanetexts_Line_1(); |
|
374 } |
|
375 |
|
376 // ----------------------------------------------------------------------------- |
|
377 // VtUiLayout::GetMutedTextLayout |
|
378 // ----------------------------------------------------------------------------- |
|
379 // |
|
380 void VtUiLayout::GetMutedTextLayout( |
|
381 TAknTextLineLayout& aLayout ) |
|
382 { |
|
383 aLayout = AppLayout::Navipanetexts_Line_2(); |
|
384 } |
|
385 |
|
386 // ----------------------------------------------------------------------------- |
|
387 // VtUiLayout::GetZoomPaneLayout |
|
388 // ----------------------------------------------------------------------------- |
|
389 // |
|
390 void VtUiLayout::GetZoomPaneLayout( |
|
391 TAknWindowLineLayout& aLayout ) |
|
392 { |
|
393 aLayout = AppLayout::zooming_pane(); |
|
394 } |
|
395 |
|
396 // ----------------------------------------------------------------------------- |
|
397 // VtUiLayout::GetZoomDirLayout |
|
398 // ----------------------------------------------------------------------------- |
|
399 // |
|
400 void VtUiLayout::GetZoomDirLayout( |
|
401 TAknWindowLineLayout& aLayout ) |
|
402 { |
|
403 aLayout = AppLayout::Zooming_pane_elements_Line_1(); |
|
404 } |
|
405 |
|
406 // ----------------------------------------------------------------------------- |
|
407 // VtUiLayout::GetZoomAreaLayout |
|
408 // ----------------------------------------------------------------------------- |
|
409 // |
|
410 void VtUiLayout::GetZoomAreaLayout( |
|
411 TAknWindowLineLayout& aLayout ) |
|
412 { |
|
413 aLayout = AppLayout::Zooming_pane_elements_Line_2(); |
|
414 } |
|
415 |
|
416 // ----------------------------------------------------------------------------- |
|
417 // VtUiLayout::GetZoomStepLayout |
|
418 // ----------------------------------------------------------------------------- |
|
419 // |
|
420 void VtUiLayout::GetZoomStepLayout( |
|
421 TAknWindowLineLayout& aLayout, |
|
422 TInt aZoomStep ) |
|
423 { |
|
424 aZoomStep = Max( Min( aZoomStep, KVtUiZoomMaxStep ), KVtUiZoomMinStep ); |
|
425 aZoomStep--; // 1 .. 11 is mapped to 0 .. 10. |
|
426 |
|
427 // Function pointer table would be more efficient, but AppLayout methods |
|
428 // are inline. |
|
429 |
|
430 switch ( aZoomStep ) |
|
431 { |
|
432 case 0: |
|
433 aLayout = AppLayout::Zooming_steps_sizes_Line_1(); |
|
434 break; |
|
435 |
|
436 case 1: |
|
437 aLayout = AppLayout::Zooming_steps_sizes_Line_2(); |
|
438 break; |
|
439 |
|
440 case 2: |
|
441 aLayout = AppLayout::Zooming_steps_sizes_Line_3(); |
|
442 break; |
|
443 |
|
444 case 3: |
|
445 aLayout = AppLayout::Zooming_steps_sizes_Line_4(); |
|
446 break; |
|
447 |
|
448 case 4: |
|
449 aLayout = AppLayout::Zooming_steps_sizes_Line_5(); |
|
450 break; |
|
451 |
|
452 case 5: |
|
453 aLayout = AppLayout::Zooming_steps_sizes_Line_6(); |
|
454 break; |
|
455 |
|
456 case 6: |
|
457 aLayout = AppLayout::Zooming_steps_sizes_Line_7(); |
|
458 break; |
|
459 |
|
460 case 7: |
|
461 aLayout = AppLayout::Zooming_steps_sizes_Line_8(); |
|
462 break; |
|
463 |
|
464 case 8: |
|
465 aLayout = AppLayout::Zooming_steps_sizes_Line_9(); |
|
466 break; |
|
467 |
|
468 case 9: |
|
469 aLayout = AppLayout::Zooming_steps_sizes_Line_10(); |
|
470 break; |
|
471 |
|
472 case 10: |
|
473 default: |
|
474 aLayout = AppLayout::Zooming_steps_sizes_Line_11(); |
|
475 break; |
|
476 } |
|
477 } |
|
478 |
|
479 // ----------------------------------------------------------------------------- |
|
480 // VtUiLayout::MapBitmapToSkinId |
|
481 // ----------------------------------------------------------------------------- |
|
482 // |
|
483 TAknsItemID VtUiLayout::MapBitmapToSkinId( TVtUiBitmapId aId ) |
|
484 { |
|
485 TAknsItemID skinId = KAknsIIDNone; |
|
486 |
|
487 switch ( aId ) |
|
488 { |
|
489 case EVtUiBitmap_qgn_graf_call_video_out_bg: |
|
490 skinId = KAknsIIDQgnGrafCallVideoOutBg; |
|
491 break; |
|
492 |
|
493 case EVtUiBitmap_qgn_indi_call_video_blind_in: |
|
494 skinId = KAknsIIDQgnIndiCallVideoBlindIn; |
|
495 break; |
|
496 |
|
497 case EVtUiBitmap_qgn_indi_call_video_blind_out: |
|
498 skinId = KAknsIIDQgnIndiCallVideoBlindOut; |
|
499 break; |
|
500 |
|
501 case EVtUiBitmap_qgn_indi_call_video_blind_in_mask_icon: |
|
502 skinId = KAknsIIDQgnIndiCallVideoBlindInMaskIcon; |
|
503 break; |
|
504 |
|
505 case EVtUiBitmap_qgn_indi_call_video_blind_out_mask_icon: |
|
506 skinId = KAknsIIDQgnIndiCallVideoBlindOutMaskIcon; |
|
507 break; |
|
508 |
|
509 case EVtUiBitmap_qgn_indi_earpiece: |
|
510 skinId = KAknsIIDQgnIndiEarpiece; |
|
511 break; |
|
512 |
|
513 case EVtUiBitmap_qgn_indi_speaker: |
|
514 skinId = KAknsIIDQgnIndiSpeaker; |
|
515 break; |
|
516 |
|
517 case EVtUiBitmap_qgn_indi_zoom_dir: |
|
518 skinId = KAknsIIDQgnIndiZoomDir; |
|
519 break; |
|
520 |
|
521 case EVtUiBitmap_qgn_graf_zoom_area: |
|
522 skinId = KAknsIIDQgnGrafZoomArea; |
|
523 break; |
|
524 |
|
525 case EVtUiBitmap_qgn_indi_zoom_min: |
|
526 skinId = KAknsIIDQgnIndiZoomMin; |
|
527 break; |
|
528 |
|
529 case EVtUiBitmap_qgn_indi_zoom_max: |
|
530 skinId = KAknsIIDQgnIndiZoomMax; |
|
531 break; |
|
532 |
|
533 case EVtUiBitmap_qgn_prop_sub_current: |
|
534 case EVtUiBitmap_qgn_prop_sub_current_mask: |
|
535 skinId = KAknsIIDQgnPropSubCurrent; |
|
536 break; |
|
537 |
|
538 default: |
|
539 // Default value is OK. |
|
540 break; |
|
541 } |
|
542 |
|
543 return skinId; |
|
544 } |
|
545 |
|
546 // ----------------------------------------------------------------------------- |
|
547 // VtUiLayout::MapBitmapToColorId |
|
548 // ----------------------------------------------------------------------------- |
|
549 // |
|
550 TBool VtUiLayout::MapBitmapToColorId( |
|
551 TVtUiBitmapId aId, |
|
552 TAknsItemID& aColorId, |
|
553 TInt& aColorIndex ) |
|
554 { |
|
555 TBool result = EFalse; |
|
556 |
|
557 aColorId = KAknsIIDNone; |
|
558 aColorIndex = KErrNotFound; |
|
559 |
|
560 switch ( aId ) |
|
561 { |
|
562 case EVtUiBitmap_qgn_indi_earpiece: |
|
563 case EVtUiBitmap_qgn_indi_earpiece_mask: |
|
564 case EVtUiBitmap_qgn_indi_speaker: |
|
565 case EVtUiBitmap_qgn_indi_speaker_mask: |
|
566 case EVtUiBitmap_qgn_indi_zoom_dir: |
|
567 case EVtUiBitmap_qgn_indi_zoom_dir_mask: |
|
568 result = ETrue; |
|
569 aColorId = KAknsIIDQsnIconColors; |
|
570 aColorIndex = EAknsCIQsnIconColorsCG7; |
|
571 break; |
|
572 |
|
573 default: |
|
574 // Default value is OK. |
|
575 break; |
|
576 } |
|
577 |
|
578 return result; |
|
579 } |
|
580 |
|
581 // ----------------------------------------------------------------------------- |
|
582 // VtUiLayout::Resolve |
|
583 // ----------------------------------------------------------------------------- |
|
584 // |
|
585 void VtUiLayout::Resolve( |
|
586 TVtUiBitmapId aId, |
|
587 TFileName& aFileName, |
|
588 TInt& aIndex ) |
|
589 { |
|
590 TInt index = KErrNotFound; |
|
591 TVtUiBitmapFiles file = EVtUiVideoBitmapFile; |
|
592 |
|
593 switch ( aId ) |
|
594 { |
|
595 case EVtUiBitmap_qgn_graf_call_video_out_bg: |
|
596 index = EMbmVideoteluiQgn_graf_call_video_out_bg; |
|
597 break; |
|
598 |
|
599 case EVtUiBitmap_qgn_graf_call_video_out_bg_mask: |
|
600 index = EMbmVideoteluiQgn_graf_call_video_out_bg_mask; |
|
601 break; |
|
602 |
|
603 case EVtUiBitmap_qgn_indi_call_video_blind_in: |
|
604 index = EMbmVideoteluiQgn_indi_call_video_blind_in; |
|
605 break; |
|
606 |
|
607 case EVtUiBitmap_qgn_indi_call_video_blind_out: |
|
608 index = EMbmVideoteluiQgn_indi_call_video_blind_out; |
|
609 break; |
|
610 |
|
611 case EVtUiBitmap_qgn_indi_earpiece: |
|
612 file = EVtUiAvkonBitmapFile; |
|
613 index = EMbmAvkonQgn_indi_earpiece; |
|
614 break; |
|
615 |
|
616 case EVtUiBitmap_qgn_indi_earpiece_mask: |
|
617 file = EVtUiAvkonBitmapFile; |
|
618 index = EMbmAvkonQgn_indi_earpiece_mask; |
|
619 break; |
|
620 |
|
621 case EVtUiBitmap_qgn_indi_speaker: |
|
622 file = EVtUiAvkonBitmapFile; |
|
623 index = EMbmAvkonQgn_indi_speaker; |
|
624 break; |
|
625 |
|
626 case EVtUiBitmap_qgn_indi_speaker_mask: |
|
627 file = EVtUiAvkonBitmapFile; |
|
628 index = EMbmAvkonQgn_indi_speaker_mask; |
|
629 break; |
|
630 |
|
631 case EVtUiBitmap_qgn_graf_zoom_area: |
|
632 index = EMbmVideoteluiQgn_graf_zoom_area; |
|
633 break; |
|
634 |
|
635 case EVtUiBitmap_qgn_indi_zoom_dir: |
|
636 index = EMbmVideoteluiQgn_indi_zoom_dir; |
|
637 break; |
|
638 |
|
639 case EVtUiBitmap_qgn_indi_zoom_dir_mask: |
|
640 index = EMbmVideoteluiQgn_indi_zoom_dir_mask; |
|
641 break; |
|
642 |
|
643 case EVtUiBitmap_qgn_indi_zoom_min: |
|
644 index = EMbmVideoteluiQgn_indi_zoom_min; |
|
645 break; |
|
646 |
|
647 case EVtUiBitmap_qgn_indi_zoom_max: |
|
648 index = EMbmVideoteluiQgn_indi_zoom_max; |
|
649 break; |
|
650 |
|
651 case EVtUiBitmap_qgn_indi_call_video_blind_in_mask_icon: |
|
652 index = EMbmVideoteluiQgn_indi_call_video_blind_in_mask_icon; |
|
653 break; |
|
654 |
|
655 case EVtUiBitmap_qgn_indi_call_video_blind_out_mask_icon: |
|
656 index = EMbmVideoteluiQgn_indi_call_video_blind_out_mask_icon; |
|
657 break; |
|
658 |
|
659 case EVtUiBitmap_qgn_prop_sub_current: |
|
660 file = EVtUiAvkonBitmapFile; |
|
661 index = EMbmAvkonQgn_prop_sub_current; |
|
662 break; |
|
663 |
|
664 case EVtUiBitmap_qgn_prop_sub_current_mask: |
|
665 file = EVtUiAvkonBitmapFile; |
|
666 index = EMbmAvkonQgn_prop_sub_current_mask; |
|
667 break; |
|
668 |
|
669 default: |
|
670 VtUiPanic::Panic( EVtUiPanicInvalidBitmapId ); |
|
671 break; |
|
672 } |
|
673 |
|
674 aIndex = index; |
|
675 switch ( file ) |
|
676 { |
|
677 case EVtUiVideoBitmapFile: |
|
678 aFileName = KVtUiVideoBitmapFileName; |
|
679 break; |
|
680 |
|
681 case EVtUiAvkonBitmapFile: |
|
682 aFileName = AknIconUtils::AvkonIconFileName(); |
|
683 break; |
|
684 |
|
685 default: |
|
686 VtUiPanic::Panic( EVtUiPanicInvalidBitmapFile ); |
|
687 break; |
|
688 } |
|
689 } |
|
690 |
|
691 // ----------------------------------------------------------------------------- |
|
692 // VtUiLayout::IsLandscapeOrientation |
|
693 // ----------------------------------------------------------------------------- |
|
694 // |
|
695 TBool VtUiLayout::IsLandscapeOrientation() |
|
696 { |
|
697 return Layout_Meta_Data::IsLandscapeOrientation(); |
|
698 } |
|
699 |
|
700 // End of File |