vtuis/videotelui/inc/features/prefs/cvtuicolortone.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Color tone feature.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTUICOLORTONE_H
       
    20 #define C_VTUICOLORTONE_H
       
    21 
       
    22 #include    <mvtengcamerapreferences.h>
       
    23 #include    "cvtuiprefsettinglistbase.h"
       
    24 #include    "cvtuifeaturebase.h"
       
    25 #include    "tvtuicomponentstate.h"
       
    26 #include    "mvtuicomponent.h"
       
    27 #include    "mvtuilayoutchangeobserver.h"
       
    28 
       
    29 /**
       
    30 *  TVtUiColorToneComponentState
       
    31 *
       
    32 * Video quality componentstate definition.
       
    33 *
       
    34 *  @since S60 v3.2
       
    35 */
       
    36 class TVtUiColorToneComponentState : public TVtUiComponentState
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42     * Constructor
       
    43     * @param aComponent Reference to component.
       
    44     */
       
    45     TVtUiColorToneComponentState( MVtUiComponent& aComponent );
       
    46     
       
    47     };
       
    48     
       
    49 /**
       
    50 *  CVtUiColorTone
       
    51 *
       
    52 *  Color tone UI feature definition.
       
    53 *
       
    54 *  @since S60 v3.2
       
    55 */
       
    56 class CVtUiColorTone : public CVtUiPrefSettingListBase,
       
    57     public MVtUiComponent, public MVtUiLayoutChangeObserver
       
    58     {
       
    59 
       
    60 public:
       
    61 
       
    62     /**
       
    63     * Static constructor
       
    64     * @param aFeatureManager Reference to feature manager.
       
    65     */
       
    66     static CVtUiColorTone* NewL( CVtUiFeatureManager& aFeatureManager );
       
    67     
       
    68     /**
       
    69     * Destructor
       
    70     */
       
    71     ~CVtUiColorTone();
       
    72 
       
    73 public: // from MVtUiFeature
       
    74 
       
    75     /** 
       
    76     * @see MVtUiFeature::StartL
       
    77     */
       
    78     void StartL();
       
    79 
       
    80      /** 
       
    81     * @see MVtUiFeature::Stop
       
    82     */
       
    83     void Stop();
       
    84     
       
    85      /** 
       
    86     * @see MVtUiFeature::InitFeatureL
       
    87     */
       
    88     void InitFeatureL();
       
    89 
       
    90 public: // from MVtUiComponent
       
    91 
       
    92     /**
       
    93     * @see MVtUiComponent::ComponentId
       
    94     */
       
    95     MVtUiComponent::TComponentId ComponentId() const;
       
    96 
       
    97     /**
       
    98     * @see MVtUiComponent::ComponentAsControl
       
    99     */
       
   100     CCoeControl* ComponentAsControl();
       
   101 
       
   102     /**
       
   103     * @see MVtUiComponent::DoActivateL
       
   104     */
       
   105     void DoActivateL();
       
   106 
       
   107     /**
       
   108     * @see MVtUiComponent::DoDeactivateL
       
   109     */
       
   110     void DoDeactivateL();
       
   111     
       
   112 public: // from MVtUiComponentManager
       
   113 
       
   114     /**
       
   115     * @see MVtUiComponentManager::HandleLayoutChangeL
       
   116     */
       
   117     void HandleLayoutChangeL();
       
   118 
       
   119 protected: // from base class
       
   120      
       
   121    	/**
       
   122     * @see CVtUiPrefSettingListBase::CurrentSelection
       
   123     */
       
   124     virtual TInt CurrentSelection();
       
   125     
       
   126     /**
       
   127     * @see CVtUiPrefSettingListBase::SetItemsL
       
   128     */
       
   129     virtual void SetItemsL( CDesCArray& aArray );
       
   130     
       
   131     /**
       
   132     * @see CVtUiPrefSettingListBase::SettingPageResId
       
   133     */
       
   134     virtual TInt SettingPageResId() const;
       
   135     
       
   136     /**
       
   137     * @see CVtUiPrefSettingListBase::SettingPageItemChangedL
       
   138     */
       
   139     virtual void SettingPageItemChangedL( TInt aIndex );
       
   140     
       
   141 private:
       
   142 
       
   143     /**
       
   144      * Constructor
       
   145      */
       
   146     CVtUiColorTone( CVtUiFeatureManager& aFeatureManager );
       
   147 
       
   148     // Maps color tone enum to array index
       
   149     TInt MapCTEnumToArrayIndex( MVtEngCameraPreferences::TColorTone&
       
   150         aColorTone ) const;
       
   151     
       
   152     // Maps arrya index to color tone enum 
       
   153     MVtEngCameraPreferences::TColorTone MapArrayIndexToCTEnum(
       
   154         TInt aIndex) const;        
       
   155 
       
   156     // Callback function that stops the feature.
       
   157     static TInt DoStopL( TAny* aAny );
       
   158     
       
   159     // Callback function that starts the feature.
       
   160     static TInt DoStartL( TAny* aAny );    
       
   161 
       
   162 private:
       
   163 
       
   164     // Component state
       
   165     TVtUiColorToneComponentState iComponentState;
       
   166   
       
   167     };
       
   168 
       
   169 #endif // CVTUICOLORTONE_H