phoneuis/dialer/inc/cdialertoolbar.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     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:  Updates toolbar.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CDIALERTOOLBAR_H__
       
    20 #define __CDIALERTOOLBAR_H__
       
    21 
       
    22 #ifdef RD_SCALABLE_UI_V2
       
    23 
       
    24 #include <akntoolbar.h>
       
    25 #include <akntoolbarobserver.h>
       
    26 #include <coecobs.h>    // MCoeControlObserver
       
    27 #include <dialer.hrh>
       
    28 
       
    29 //Forward declarations
       
    30 class CAknToolbar;
       
    31 class CAknButton;
       
    32 class CAknAppUi;
       
    33 class CCoeControl;
       
    34 class CDialerNumberEntry;
       
    35 
       
    36 NONSHARABLE_CLASS( CDialerToolBar ) : public CBase, 
       
    37     public MCoeControlObserver
       
    38     {
       
    39     public:
       
    40     
       
    41         /**
       
    42         * Two phase constructor
       
    43         * @param CAknAppUi reference
       
    44         * @param CDialerNumberEntry reference
       
    45         * @return New instance
       
    46         */    
       
    47         static CDialerToolBar* NewL( CAknAppUi* aAppUi, 
       
    48                                      CDialerNumberEntry& aNumberEntry );
       
    49         static CDialerToolBar* NewLC( CAknAppUi* aAppUi, 
       
    50                                       CDialerNumberEntry& aNumberEntry );
       
    51     
       
    52         /**
       
    53         * Destructor.
       
    54         */    
       
    55         virtual ~CDialerToolBar();
       
    56 
       
    57     public: // New functions
       
    58         
       
    59         void UpdateToolbar( TDialerCommandId aCommand );
       
    60         
       
    61         void DetermineCurrentToolbarButtons();
       
    62 
       
    63 
       
    64     public: // from MCoeControlObserver
       
    65     
       
    66         void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );
       
    67 
       
    68     private:
       
    69         
       
    70         /**
       
    71         * Constructor
       
    72         */        
       
    73         CDialerToolBar( CDialerNumberEntry& aNumberEntry );
       
    74     
       
    75         /**
       
    76         * 2nd phase constructor.
       
    77         */
       
    78         void ConstructL( CAknAppUi* aAppUi );
       
    79         
       
    80         CAknButton* CreateButtonL( TInt aNormalIconId,
       
    81                                TInt aNormalMaskId,
       
    82                                const TDesC& aText, 
       
    83                                const TAknsItemID& aSkinIconId,
       
    84                                TInt aCommand = EDialedCmdNone );
       
    85 
       
    86         
       
    87         void CreateButtonSetNumberEntryEmpty();
       
    88         
       
    89         void CreateButtonSetNumberEntryNotEmpty();
       
    90 
       
    91     private: // data
       
    92 
       
    93         CAknToolbar* iToolbar;
       
    94         CAknAppUi* iAppUi;
       
    95         TBool iNumberEntryEmpty;
       
    96         CDialerNumberEntry& iNumberEntry;
       
    97 
       
    98     };
       
    99 
       
   100 #endif // RD_SCALABLE_UI_V2
       
   101 
       
   102 #endif // CDIALERTOOLBAR
       
   103 
       
   104 
       
   105 // End of File