phoneuis/dialer/inc/cdialerkeypadbutton.h
changeset 0 5f000ab63145
child 9 8871b09be73b
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Definition of CDialerKeyPadButton class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CDIALERKEYPADBUTTON_H
       
    20 #define C_CDIALERKEYPADBUTTON_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <aknbutton.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 *  Contains keypad button data.
       
    29 *
       
    30 *  @lib dialer.lib
       
    31 *  @since S60 v5.0
       
    32 */
       
    33 NONSHARABLE_CLASS( CDialerKeyPadButton ) : public CBase
       
    34     {
       
    35     public:
       
    36     
       
    37         CDialerKeyPadButton();
       
    38 
       
    39         ~CDialerKeyPadButton();
       
    40     
       
    41     public:
       
    42         CCoeControl* Control() const { return iButton; };
       
    43         TInt ScanCode() const;
       
    44         TInt KeyCode() const;
       
    45         void CreateButtonL( const TInt aScanCode,
       
    46                             const TInt aKeyCode, 
       
    47                             const TMifDialer aButtonIcon, 
       
    48                             const TMifDialer aButtonIconMask );
       
    49         void SetIconSize( TSize& aSize );                    
       
    50         void HandleResourceChange( TInt aType );
       
    51         void MapDialerIconToSkinIcon( const TInt aDialerIcon, 
       
    52                                       TAknsItemID& aItemId ) const;  
       
    53         void EnableAudioFeedback( const TBool aEnable );
       
    54 
       
    55     private:
       
    56         void UpdateIconL();
       
    57         
       
    58     private: // data
       
    59     
       
    60         CAknButton*  iButton;
       
    61         
       
    62         TInt iScanCode;
       
    63         TInt iKeyCode;
       
    64         TMifDialer iButtonIcon;
       
    65         TMifDialer iButtonIconMask;
       
    66     };
       
    67 
       
    68 #endif // C_CDIALERKEYPADBUTTON_H