vtuis/videotelui/inc/features/prefs/cvtuivideoquality.h
changeset 18 d9b6a8729acd
parent 4 6dc066157ed4
child 23 c378a0498b84
child 27 dcbddbbaf8fd
equal deleted inserted replaced
4:6dc066157ed4 18:d9b6a8729acd
     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:  Video quality feature.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTUIVIDEOQUALITY_H
       
    20 #define C_VTUIVIDEOQUALITY_H
       
    21 
       
    22 #include    <gulicon.h>
       
    23 #include    "cvtuifeaturebase.h"
       
    24 #include    "mvtuicomponent.h"
       
    25 #include    "tvtuicomponentstate.h"
       
    26 #include    "videotelui.hrh"
       
    27 
       
    28 /**
       
    29 *  TVtUiVideoQualityComponentState
       
    30 *
       
    31 * Video quality componentstate definition.
       
    32 *
       
    33 *  @since S60 v3.2
       
    34 */
       
    35 class TVtUiVideoQualityComponentState : public TVtUiComponentState
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41     * Constructor
       
    42     * @param aComponent Reference to component.
       
    43     */
       
    44     TVtUiVideoQualityComponentState( MVtUiComponent& aComponent );
       
    45     
       
    46     };
       
    47 
       
    48 /**
       
    49 *  CVtUiVideoQuality
       
    50 *
       
    51 *  Video quality UI feature definition.
       
    52 *
       
    53 *  @since S60 v3.2
       
    54 */
       
    55 class CVtUiVideoQuality : public CVtUiFeatureBase,
       
    56     public MVtUiComponent
       
    57     {
       
    58 
       
    59 public:
       
    60 
       
    61     /**
       
    62     * Static constructor
       
    63     * @param aFeatureManager Reference to feature manager.
       
    64     */
       
    65     static CVtUiVideoQuality* NewL( CVtUiFeatureManager& aFeatureManager );
       
    66 
       
    67     /**
       
    68     * Destructor
       
    69     */
       
    70     ~CVtUiVideoQuality();
       
    71 
       
    72 public: // from MVtUiFeature
       
    73 
       
    74     /** 
       
    75     * @see MVtUiFeature::StartL
       
    76     */
       
    77     void StartL();
       
    78 
       
    79     /** 
       
    80     * @see MVtUiFeature::Stop 
       
    81     */
       
    82     void Stop();
       
    83     
       
    84     /** 
       
    85     * @see MVtUiFeature::InitFeatureL
       
    86     */
       
    87     void InitFeatureL();
       
    88 
       
    89 public: // from MVtUiComponent
       
    90 
       
    91     /**
       
    92     * @see MVtUiComponent::ComponentId
       
    93     */
       
    94     MVtUiComponent::TComponentId ComponentId() const;
       
    95 
       
    96     /**
       
    97     * @see MVtUiComponent::ComponentAsControl
       
    98     */
       
    99     CCoeControl* ComponentAsControl();
       
   100 
       
   101     /**
       
   102     * @see MVtUiComponent::DoActivateL
       
   103     */
       
   104     void DoActivateL();
       
   105 
       
   106     /**
       
   107     * @see MVtUiComponent::DoDeactivateL
       
   108     */
       
   109     void DoDeactivateL();
       
   110 
       
   111 private:
       
   112     
       
   113     // Creates icons for list
       
   114     CGulIcon* CreateIconLC( TVtUiBitmapId aIconId, TVtUiBitmapId aMaskId );
       
   115 
       
   116     // Shows the selection list
       
   117     void ShowSelectionListL();
       
   118     
       
   119     // Async the selection list
       
   120     static TInt AsyncShowSelectionList( TAny* aPtr );
       
   121     
       
   122     // Reads items from source to target array and updates the selection icon
       
   123     // if needed.
       
   124     void SetItemsL( CDesCArray& aTarget,const CDesCArray& aSource );
       
   125     
       
   126     // Return curretly active item.
       
   127     TInt ActiveItem() const;
       
   128     
       
   129     // Item selected, adjust video quality.
       
   130     void ItemSelectedL( TInt aItemIndex );
       
   131     
       
   132 private:
       
   133 
       
   134     /**
       
   135     * Constructor
       
   136     */
       
   137     CVtUiVideoQuality( CVtUiFeatureManager& aFeatureManager );
       
   138 
       
   139     /**
       
   140     * 2nd constructor
       
   141     */
       
   142     void ConstructL();
       
   143     
       
   144     /**
       
   145     * Callback function that stops the feature.
       
   146     * @param aAny pointer to an instance of the class.
       
   147     * @return always KErrNone.
       
   148     */
       
   149     static TInt DoStop( TAny* aAny );
       
   150 
       
   151 private:
       
   152 
       
   153     // Component state
       
   154     TVtUiVideoQualityComponentState iComponentState;
       
   155     
       
   156     // Async callback for selection list
       
   157     CAsyncCallBack* iShowSelectionListCallback;
       
   158     };
       
   159 
       
   160 #endif // CVTUIVIDEOQUALITY_H