vtuis/videotelui/src/features/prefs/cvtuicontrastpopup.cpp
branchRCL_3
changeset 25 779871d1e4f4
equal deleted inserted replaced
24:f15ac8e65a02 25:779871d1e4f4
       
     1 /*
       
     2 * Copyright (c) 2006 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 Contrast popup
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include    <AknVolumePopup.h>
       
    21 #include    "cvtuicontrastpopup.h"
       
    22 #include    <cvtlogger.h>
       
    23 #include	"tvtuilocalvariation.h"
       
    24 #include    <mvtengmedia.h>
       
    25 #include    "mvtuicomponent.h"
       
    26 #include    "CVtUiAppUi.h"
       
    27 #include    <videotelui.mbg>
       
    28 #include    <mvtengcamerapreferences.h>
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // CVtUiContrastPopup::NewL
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 CVtUiContrastPopup* CVtUiContrastPopup::NewL( CVtUiFeatureManager&
       
    35     aFeatureManager )
       
    36     {
       
    37     __VTPRINTENTER( "CVtUiContrastPopup.NewL" )
       
    38     CVtUiContrastPopup* self =
       
    39         new ( ELeave ) CVtUiContrastPopup( aFeatureManager );
       
    40     CleanupStack::PushL( self );
       
    41     self->ConstructL();
       
    42     CleanupStack::Pop();
       
    43     __VTPRINTEXIT( "CVtUiContrastPopup.NewL" )
       
    44     return self;
       
    45     }
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // CVtUiContrastPopup::~CVtUiContrastPopup
       
    49 // ---------------------------------------------------------------------------
       
    50 //
       
    51 CVtUiContrastPopup::~CVtUiContrastPopup()
       
    52     {
       
    53     __VTPRINTENTER( "CVtUiContrastPopup.~" )
       
    54     __VTPRINTEXIT( "CVtUiContrastPopup.~" )
       
    55     }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // CVtUiContrastPopup::CurrentValue
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 TInt CVtUiContrastPopup::CurrentValue()
       
    62     {
       
    63     __VTPRINTENTER( "CVtUiContrastPopup.CurrentValue" )
       
    64     // ask from engine current value
       
    65     TInt value;
       
    66     if ( iCameraPref->GetContrast( value) )
       
    67         {
       
    68         __VTPRINTEXIT( "CVtUiContrastPopup.CurrentValueERR" )
       
    69         return 0;
       
    70         }
       
    71     __VTPRINTEXIT( "CVtUiContrastPopup.CurrentValue" )
       
    72     return value;
       
    73     }    
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 // CVtUiContrastPopup::CVtUiContrastPopup
       
    77 // ---------------------------------------------------------------------------
       
    78 //
       
    79 CVtUiContrastPopup::CVtUiContrastPopup( CVtUiFeatureManager& aFeatureManager )
       
    80     : CVtUiPrefPopupBase( aFeatureManager, TVtUiBlockListBitField(
       
    81         MVtUiComponent::EComponentIdDialer |
       
    82         MVtUiComponent::EComponentIdToolbar |
       
    83         MVtUiComponent::EComponentIdNumberEntry |
       
    84         MVtUiComponent::EComponentIdVolume |
       
    85         MVtUiComponent::EComponentIdZoom |
       
    86         MVtUiComponent::EVComponentIdBrightness ), EVComponentIdContrast,
       
    87         KVtEngSetContrast ) 
       
    88     {
       
    89     __VTPRINTENTER( "CVtUiContrastPopup.CVtUiContrastPopup" )
       
    90     __VTPRINTEXIT( "CVtUiContrastPopup.CVtUiContrastPopup" )
       
    91     }
       
    92     
       
    93 // ---------------------------------------------------------------------------
       
    94 // CVtUiContrastPopup::CVtUiContrastPopup
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 void CVtUiContrastPopup::ConstructL()
       
    98     {
       
    99     __VTPRINTENTER( "CVtUiContrastPopup.ConstructL" )
       
   100     BaseConstructL();
       
   101     __VTPRINTEXIT( "CVtUiContrastPopup.ConstructL" )
       
   102     }