1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Control for displaying elapse/remaining record time |
14 * Description: Control for displaying elapse/remaining record time |
15 * in Navi Pane |
15 * in Navi Pane |
16 * |
|
17 * Copyright (c) 2007-2008 Nokia. All rights reserved. |
|
18 * This material, including documentation and any related computer |
|
19 * programs, is protected by copyright controlled by Nokia. All |
|
20 * rights are reserved. Copying, including reproducing, storing, |
|
21 * adapting or translating, any or all of this material requires the |
|
22 * prior written consent of Nokia. This material also contains |
|
23 * confidential information which may not be disclosed to others |
|
24 * without the prior written consent of Nokia. |
|
25 |
|
26 * |
|
27 * |
16 * |
28 */ |
17 */ |
29 |
18 |
30 |
19 |
31 // INCLUDE FILES |
20 // INCLUDE FILES |
252 iProgressBarRect.Rect().Size(), |
241 iProgressBarRect.Rect().Size(), |
253 EAspectRatioNotPreserved); |
242 EAspectRatioNotPreserved); |
254 |
243 |
255 // Create component bitmaps |
244 // Create component bitmaps |
256 TSize size; |
245 TSize size; |
257 if ( CamUtility::IsNhdDevice() ) |
246 if ( AknLayoutUtils::PenEnabled() ) |
258 { |
247 { |
259 size = iProgressIconRect.Rect().Size(); |
248 size = iProgressIconRect.Rect().Size(); |
260 } |
249 } |
261 else |
250 else |
262 { |
251 { |
372 break; |
361 break; |
373 } |
362 } |
374 |
363 |
375 DrawElapsedTimeText( aGc ); |
364 DrawElapsedTimeText( aGc ); |
376 DrawRemainingTimeText( aGc, skin ); |
365 DrawRemainingTimeText( aGc, skin ); |
377 if ( CamUtility::IsNhdDevice() ) |
366 if ( AknLayoutUtils::PenEnabled() ) |
378 { |
367 { |
379 aGc.BitBltMasked( iProgressIconRect.Rect().iTl, |
368 aGc.BitBltMasked( iProgressIconRect.Rect().iTl, |
380 icon, icon->SizeInPixels(), mask, ETrue ); |
369 icon, icon->SizeInPixels(), mask, ETrue ); |
381 } |
370 } |
382 else |
371 else |
383 { |
372 { |
384 aGc.BitBltMasked( iVidStorageIconRect.Rect().iTl, |
373 aGc.BitBltMasked( iVidStorageIconRect.Rect().iTl, |
385 icon, icon->SizeInPixels(), mask, ETrue ); |
374 icon, icon->SizeInPixels(), mask, ETrue ); |
386 } |
375 } |
387 |
376 if( CamUtility::IsNhdDevice() ) |
388 DrawProgressBar( aGc ); |
377 { |
|
378 // VGA layout doesn't use progress bar |
|
379 DrawProgressBar( aGc ); |
|
380 } |
389 } |
381 } |
390 |
382 |
391 // --------------------------------------------------------- |
383 // --------------------------------------------------------- |
392 // CCamNaviProgressBarModel::HandleControllerEventL |
384 // CCamNaviProgressBarModel::HandleControllerEventL |
393 // Handle an event from CCamAppController. |
385 // Handle an event from CCamAppController. |
549 TTime time( iRecordTimeElapsed.Int64() ); |
541 TTime time( iRecordTimeElapsed.Int64() ); |
550 time.FormatL( iElapsedTimeText, *iTimeFormat ); |
542 time.FormatL( iElapsedTimeText, *iTimeFormat ); |
551 |
543 |
552 time = iRecordTimeRemaining.Int64(); |
544 time = iRecordTimeRemaining.Int64(); |
553 time.FormatL( iRemainingTimeText, *iTimeFormat ); |
545 time.FormatL( iRemainingTimeText, *iTimeFormat ); |
|
546 if( !CamUtility::IsNhdDevice() ) |
|
547 { |
|
548 // VGA layout is using backslash instead of progress bar |
|
549 iElapsedTimeText.Append(_L(" /")); |
|
550 } |
554 |
551 |
555 if ( iElapsedTimeTextItem ) |
552 if ( iElapsedTimeTextItem ) |
556 { |
553 { |
557 iElapsedTimeTextItem->SetTextL( iElapsedTimeText ); |
554 iElapsedTimeTextItem->SetTextL( iElapsedTimeText ); |
558 } |
555 } |