41 // CONSTANTS |
41 // CONSTANTS |
42 |
42 |
43 const TInt KInfoTooltipDelay = 0; // time (milliseconds) delay when showing the tooltip |
43 const TInt KInfoTooltipDelay = 0; // time (milliseconds) delay when showing the tooltip |
44 const TInt KInfoTooltipDisplayTime = 5000; // maximum time (milliseconds) the tooltip is displayed |
44 const TInt KInfoTooltipDisplayTime = 5000; // maximum time (milliseconds) the tooltip is displayed |
45 const TInt KExplTxtGranularity = 6; |
45 const TInt KExplTxtGranularity = 6; |
|
46 const TUint32 KToolbarExtensionBgColor = 0x00000000; |
|
47 const TInt KToolBarExtensionBgAlpha = 0x7F; |
46 |
48 |
47 // ================= MEMBER FUNCTIONS ======================= |
49 // ================= MEMBER FUNCTIONS ======================= |
48 |
50 |
49 // --------------------------------------------------------------------------- |
51 // --------------------------------------------------------------------------- |
50 // CCamShootingModeContainer::NewL |
52 // CCamShootingModeContainer::NewL |
67 self->ConstructL( aRect ); |
69 self->ConstructL( aRect ); |
68 CleanupStack::Pop( self ); |
70 CleanupStack::Pop( self ); |
69 return self; |
71 return self; |
70 } |
72 } |
71 |
73 |
|
74 |
|
75 CCamShootingModeContainer* |
|
76 CCamShootingModeContainer::NewL( const TRect& aRect, |
|
77 TBool aFullySkinned, |
|
78 CAknView& aView, |
|
79 TCamCameraMode aMode, |
|
80 CCamAppController& aController, |
|
81 TBool aUserBaseScenes ) |
|
82 { |
|
83 CCamShootingModeContainer* self = |
|
84 new( ELeave ) CCamShootingModeContainer( aMode, |
|
85 aController, |
|
86 aView, |
|
87 aUserBaseScenes, |
|
88 aFullySkinned ); |
|
89 CleanupStack::PushL( self ); |
|
90 self->ConstructL( aRect ); |
|
91 CleanupStack::Pop( self ); |
|
92 return self; |
|
93 } |
|
94 |
72 // --------------------------------------------------------------------------- |
95 // --------------------------------------------------------------------------- |
73 // CCamShootingModeContainer::~CCamShootingModeContainer |
96 // CCamShootingModeContainer::~CCamShootingModeContainer |
74 // Destructor |
97 // Destructor |
75 // --------------------------------------------------------------------------- |
98 // --------------------------------------------------------------------------- |
76 // |
99 // |
153 { |
176 { |
154 scene = ECamSettingItemDynamicVideoScene; |
177 scene = ECamSettingItemDynamicVideoScene; |
155 } |
178 } |
156 |
179 |
157 // construct the listbox |
180 // construct the listbox |
158 iListBox = new( ELeave ) CCamSceneListBox( iMode, this, iController ); |
181 iListBox = new( ELeave ) CCamSceneListBox( iMode, this, iController, iFullySkinned ); |
159 iListBox->ConstructL( iController, this, iTitleArray, iDescArray, |
182 iListBox->ConstructL( iController, this, iTitleArray, iDescArray, |
160 iUserBaseScenes ); |
183 iUserBaseScenes ); |
161 iListBox->InitializeL( iController.IntegerSettingValue( scene ) ); |
184 iListBox->InitializeL( iController.IntegerSettingValue( scene ) ); |
162 iListBox->SetContainerWindowL( *this ); |
185 iListBox->SetContainerWindowL( *this ); |
163 iListBox->CreateScrollBarFrameL( ETrue ); |
186 iListBox->CreateScrollBarFrameL( ETrue ); |
313 // |
336 // |
314 CCamShootingModeContainer::CCamShootingModeContainer( |
337 CCamShootingModeContainer::CCamShootingModeContainer( |
315 TCamCameraMode aMode, |
338 TCamCameraMode aMode, |
316 CCamAppController& aController, |
339 CCamAppController& aController, |
317 CAknView& aView, |
340 CAknView& aView, |
318 TBool aUserBaseScenes ) |
341 TBool aUserBaseScenes, |
|
342 TBool aFullySkinned ) |
319 : CCamContainerBase( aController, aView ), |
343 : CCamContainerBase( aController, aView ), |
320 iListBox( NULL ), |
344 iListBox( NULL ), |
321 iMode( aMode ), |
345 iMode( aMode ), |
322 iUserBaseScenes( aUserBaseScenes ), |
346 iUserBaseScenes( aUserBaseScenes ), |
|
347 iFullySkinned( aFullySkinned ), |
323 iTooltipController( NULL ), |
348 iTooltipController( NULL ), |
324 iListboxTitle( NULL ), |
349 iListboxTitle( NULL ), |
325 iTooltipIndex( -1 ), |
350 iTooltipIndex( -1 ), |
326 iActivateOnTouchRelease( EFalse ) |
351 iActivateOnTouchRelease( EFalse ) |
327 { |
352 { |
496 PRINT(_L("Camera => CCamShootingModeContainer::Draw") ) |
521 PRINT(_L("Camera => CCamShootingModeContainer::Draw") ) |
497 |
522 |
498 CWindowGc& gc = SystemGc(); |
523 CWindowGc& gc = SystemGc(); |
499 if ( CamUtility::IsNhdDevice() ) |
524 if ( CamUtility::IsNhdDevice() ) |
500 { |
525 { |
|
526 TRgb color; |
|
527 if( iFullySkinned ) |
|
528 { |
501 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
529 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
502 AknsDrawUtils::Background( skin, iBgContext, gc, aRect ); |
530 AknsDrawUtils::Background( skin, iBgContext, gc, aRect ); |
503 TRgb color; |
|
504 AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, |
531 AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, |
505 EAknsCIQsnTextColorsCG6 ); |
532 EAknsCIQsnTextColorsCG6 ); |
|
533 } |
|
534 else |
|
535 { |
|
536 // Fill control with transparency bg colour |
|
537 gc.SetPenStyle( CGraphicsContext::ENullPen ); |
|
538 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
|
539 color = TRgb( 0,0 ); |
|
540 gc.SetBrushColor( color ); |
|
541 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
542 gc.DrawRect( aRect ); |
|
543 gc.SetBrushColor( color ); |
|
544 gc.DrawRect( iTitleTextRectLayout.TextRect() ); |
|
545 gc.SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) ); |
|
546 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
547 gc.DrawRect( TRect( iLayoutAreaRect.iTl.iX, |
|
548 iLayoutAreaRect.iTl.iY, |
|
549 iLayoutAreaRect.iBr.iX, |
|
550 iTitleTextRectLayout.TextRect().iBr.iY ) ); |
|
551 |
|
552 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
553 color = TRgb( KRgbWhite ); |
|
554 } |
506 iTitleTextRectLayout.DrawText( gc, *iListboxTitle, ETrue, color ); |
555 iTitleTextRectLayout.DrawText( gc, *iListboxTitle, ETrue, color ); |
507 } |
556 } |
508 else |
557 else |
509 { |
558 { |
510 TRAP_IGNORE( DrawSummaryTextL( gc ) ); |
559 TRAP_IGNORE( DrawSummaryTextL( gc ) ); |