tsrc/CenrepEditor/Src/cenrepeditorlistbox2.cpp
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 #include <aknnotewrappers.h>
       
    18 #include <akntextsettingpage.h> 
       
    19 
       
    20 #include "cenrepeditorListbox2.h"
       
    21 
       
    22 
       
    23 CAknSettingItem* COtherResourcesListbox::CreateSettingItemL( TInt aIdentifier )
       
    24     {
       
    25     CAknSettingItem* settingItem = NULL;
       
    26 
       
    27     // create a setting item for each setting list resource
       
    28     switch (aIdentifier)
       
    29     {
       
    30     case EOtherResourceActivation:        
       
    31         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iActivation);
       
    32         break;
       
    33     case EOtherResourceOperatorVariant:        
       
    34         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iOperatorVariant);
       
    35         break;    
       
    36     case EOtherResourceAuditoryNotification:        
       
    37         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iAuditoryNotification);
       
    38         break;  
       
    39    case EOtherResourcePopupNotification:        
       
    40         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iPopupNotification);
       
    41         break;
       
    42     case EOtherResourcePopupNotificationType:        
       
    43         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iPopupNotificationType);
       
    44         break;
       
    45     case EOtherResourceEdgeDtmSupport:        
       
    46         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iEdgeDtmSupport);
       
    47         break;
       
    48     case EOtherResourceSessionSetupMethod:        
       
    49         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iSessionSetupMethod);
       
    50         break;
       
    51     case EOtherResourceAutoRecord:        
       
    52         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iAutoRecord);
       
    53         break;
       
    54     case EOtherResourceVideoLocation:        
       
    55         settingItem=new (ELeave) 
       
    56             CAknIntegerEdwinSettingItem(aIdentifier,iOtherResources->iVideoLocation);
       
    57         break;
       
    58     case EOtherResourceSipProfileId:
       
    59         settingItem = new (ELeave) 
       
    60             CAknIntegerEdwinSettingItem(aIdentifier, iOtherResources->iSipProfileId);        
       
    61         break;
       
    62     case EOtherResourceUiOrientation:        
       
    63         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iUiOrientation);
       
    64         break;
       
    65     case EOtherResourceCapabilityQuery:    	
       
    66         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iCapabilityQuery);
       
    67     	break; 
       
    68     case EOtherResourceProductModeVariationKey:    	
       
    69         settingItem = new (ELeave) 
       
    70             CAknIntegerEdwinSettingItem( aIdentifier, iOtherResources->iProductModeVariation);
       
    71     	break;
       
    72     case EOtherResourceEncoderConfigurationInfo:
       
    73         settingItem = new (ELeave)
       
    74             CAknTextSettingItem( aIdentifier, iOtherResources->iEncoderInfo );
       
    75         settingItem->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
       
    76 
       
    77         break;   
       
    78     case EOtherResourceEncodingDevice:
       
    79         settingItem = new (ELeave) 
       
    80             CAknTextSettingItem( aIdentifier, iOtherResources->iEncodingDeviceStr );
       
    81         settingItem->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
       
    82         break;        
       
    83     case EOtherResourceAllowOnlyWithActiveCSCall:        
       
    84         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iOnlyWithActiveCSCall );
       
    85         break;    
       
    86     case EOtherResourceAllowOnlyIn3GNetwork:        
       
    87         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iOnlyIn3GNetwork );
       
    88         break;
       
    89     case EOtherResourceCameraUsage:        
       
    90         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iCameraUsage );
       
    91         break;
       
    92     case EOtherResourceVideoDirection:        
       
    93         settingItem=ConstructByValueL( aIdentifier,iOtherResources->iVideoDirection );
       
    94         break;
       
    95     case EOtherResourceVideoBandwidth:        
       
    96         settingItem = new (ELeave) 
       
    97             CAknIntegerEdwinSettingItem( aIdentifier,iOtherResources->iVideoBandwidth );
       
    98         break;
       
    99     case EOtherResourceFastMode:        
       
   100         settingItem = ConstructByValueL( aIdentifier, iOtherResources->iFastMode );
       
   101         break;
       
   102     default:
       
   103         break;
       
   104         }
       
   105     return settingItem;
       
   106     }
       
   107 
       
   108 
       
   109 void COtherResourcesListbox::SetData(COtherResources* aOtherResources)
       
   110     {
       
   111     iOtherResources = aOtherResources;
       
   112     }
       
   113 
       
   114 void COtherResourcesListbox::SizeChanged()
       
   115     {
       
   116     if (ListBox()) 
       
   117         {
       
   118         ListBox()->SetRect(Rect());
       
   119         }    
       
   120     }
       
   121 
       
   122 
       
   123 CAknSettingItem* COtherResourcesListbox::ConstructByValueL( 
       
   124     TInt aIdentifier,
       
   125     TInt& aVal)
       
   126     {    
       
   127     return new (ELeave) CAknEnumeratedTextPopupSettingItem(aIdentifier,aVal);
       
   128     }