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