camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp
branchRCL_3
changeset 16 d486e5e3cc9a
parent 12 8c55c525d5d7
child 18 51dda465e618
equal deleted inserted replaced
12:8c55c525d5d7 16:d486e5e3cc9a
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 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".
   244     if ( iFeedback ) 
   244     if ( iFeedback ) 
   245         {
   245         {
   246         iFeedback->SetFeedbackArea( iListBox, 0, iListBox->Rect(), 
   246         iFeedback->SetFeedbackArea( iListBox, 0, iListBox->Rect(), 
   247                                   ETouchFeedbackBasic, ETouchEventStylusDown );
   247                                   ETouchFeedbackBasic, ETouchEventStylusDown );
   248         }
   248         }
   249 
   249     iController.SetViewfinderWindowHandle( &Window() );
   250 	PRINT(_L("Camera <= CCamInfoListBoxContainer::ConstructL") )    
   250     PRINT(_L("Camera <= CCamInfoListBoxContainer::ConstructL") )    
   251     }
   251     }
   252    
   252    
   253 // ---------------------------------------------------------------------------
   253 // ---------------------------------------------------------------------------
   254 // CCamInfoListBoxContainer::CCamInfoListBoxContainer
   254 // CCamInfoListBoxContainer::CCamInfoListBoxContainer
   255 // C++ constructor
   255 // C++ constructor
   466     
   466     
   467     RDebug::Print(_L("CCamInfoListBoxContainer::HandlePointerEventL iType=%d iPosition=(%d, %d)"),
   467     RDebug::Print(_L("CCamInfoListBoxContainer::HandlePointerEventL iType=%d iPosition=(%d, %d)"),
   468             aPointerEvent.iType,
   468             aPointerEvent.iType,
   469             aPointerEvent.iPosition.iX,
   469             aPointerEvent.iPosition.iX,
   470             aPointerEvent.iPosition.iY );
   470             aPointerEvent.iPosition.iY );
   471     iListBox->HandlePointerEventL(aPointerEvent);
   471   
   472     if( !iController.IsViewFinding() && !iSkinnedBackGround )
   472     if( !iController.IsViewFinding() && !iSkinnedBackGround )
   473         {
   473         {
   474         ReserveAndStartVF();        
   474         PRINT ( _L("Camera <> CCamInfoListBoxContainer::HandlePointerEventL  start viewfinder") );
   475         }
   475         ReserveAndStartVF();
       
   476         }
       
   477     else
       
   478         {
       
   479         PRINT ( _L("Camera <> CCamInfoListBoxContainer::HandlePointerEventL  handle selected item") );
       
   480         iListBox->HandlePointerEventL(aPointerEvent);
       
   481         }
       
   482 
   476     /*TInt oldListItemIndex = -1;
   483     /*TInt oldListItemIndex = -1;
   477     TInt newListItemIndex = -1;
   484     TInt newListItemIndex = -1;
   478     TBool handleItemActivation = EFalse;
   485     TBool handleItemActivation = EFalse;
   479    
   486    
   480     if ( iListBox )
   487     if ( iListBox )
   579               break;  
   586               break;  
   580         
   587         
   581         case EEventItemClicked:
   588         case EEventItemClicked:
   582         case EEventItemSingleClicked:
   589         case EEventItemSingleClicked:
   583             {
   590             {
       
   591             TInt settingValue = CurrentSettingItemValue();
       
   592             iController.PreviewSettingChangeL( ECamSettingItemDynamicPhotoLightSensitivity, settingValue );
   584             ShowTooltipL();
   593             ShowTooltipL();
   585             }
   594             }
   586             break;
   595             break;
   587         default:
   596         default:
   588             break;
   597             break;
   605         {
   614         {
   606         // make sure that possible already open tooltip is hidden
   615         // make sure that possible already open tooltip is hidden
   607         iTooltipController->HideInfoPopupNote();
   616         iTooltipController->HideInfoPopupNote();
   608 
   617 
   609         iTooltipController->SetTextL( *iDescArray[iListBox->CurrentItemIndex()] );     
   618         iTooltipController->SetTextL( *iDescArray[iListBox->CurrentItemIndex()] );     
   610         iTooltipController->SetPositionByHighlight( iListBox->HighlightRect() );
   619         TRect hl = iListBox->HighlightRect();
       
   620         TPoint tt = hl.Center();
       
   621         if ( AknLayoutUtils::LayoutMirrored() )
       
   622             {
       
   623             tt.iX -= hl.Width();
       
   624             }
       
   625         iTooltipController->SetPositionAndAlignment( tt, EHLeftVBottom ); 
   611         
   626         
   612         iTooltipIndex = iListBox->CurrentItemIndex();
   627         iTooltipIndex = iListBox->CurrentItemIndex();
   613         }
   628         }
   614     
   629     
   615 
   630 
   702         iListboxLayoutRect.LayoutRect( wholeListboxLayoutRect.Rect(), 
   717         iListboxLayoutRect.LayoutRect( wholeListboxLayoutRect.Rect(), 
   703                             AknLayoutScalable_Apps::main_cset_list_pane( 0 ) );
   718                             AknLayoutScalable_Apps::main_cset_list_pane( 0 ) );
   704         }
   719         }
   705     else
   720     else
   706         {
   721         {
   707         iListboxLayoutRect.LayoutRect( wholeListboxLayoutRect.Rect(), 
   722         iListboxLayoutRect.LayoutRect( iLayoutAreaRect, 
   708                             AknLayoutScalable_Apps::main_cset_list_pane( 1 ) ); 
   723               AknLayoutScalable_Apps::main_cset_listscroll_pane( 2 ) ); //Same as WB
   709         }
   724         }
   710  
   725    
   711     if( !iSkinnedBackGround )
       
   712         {
       
   713         iTitleTextRectLayout.LayoutText( iLayoutAreaRect,  AknLayoutScalable_Apps::main_cset_text_pane_t1( 0 ) );
       
   714         }    
       
   715     else
       
   716         {    
       
   717     iTitleTextRectLayout.LayoutText( iLayoutAreaRect, 
   726     iTitleTextRectLayout.LayoutText( iLayoutAreaRect, 
   718                            AknLayoutScalable_Apps::main_cam_set_pane_t1( 3 ) );
   727                            AknLayoutScalable_Apps::main_cam_set_pane_t1( 3 ) );
   719         }
   728     
   720     
   729     return iListboxLayoutRect.Rect();
   721     return wholeListboxLayoutRect.Rect();
       
   722     }
   730     }
   723 
   731 
   724 // --------------------------------------------------------------------------
   732 // --------------------------------------------------------------------------
   725 // CCamInfoListBoxContainer::NonTouchLayout
   733 // CCamInfoListBoxContainer::NonTouchLayout
   726 // --------------------------------------------------------------------------
   734 // --------------------------------------------------------------------------