phonebookui/Phonebook/View/inc/CPbkSwapContextPaneIcon.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *     Class which loads Phonebook's or empty icon into context pane.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkSwapContextPaneIcon_H__
       
    21 #define __CPbkSwapContextPaneIcon_H__
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 //  FORWARD DECLARATIONS
       
    28 class CEikonEnv;
       
    29 class CEikImage;
       
    30 class CAknContextPane;
       
    31 class CFbsBitmap;
       
    32 
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * Class which loads Phonebook's or empty icon into context pane.
       
    38  * Class swap those icons, but don't restore previous icon.
       
    39  * Class start swappipng to phonebook's icon 
       
    40  *
       
    41 */
       
    42 NONSHARABLE_CLASS(CPbkSwapContextPaneIcon) :
       
    43         public CBase
       
    44     {
       
    45     public:
       
    46         enum TSwapState
       
    47             {
       
    48             EEmptyIcon,
       
    49             EPhonebookIcon    
       
    50             };
       
    51     
       
    52     public:  // Constructors and destructor
       
    53         /**
       
    54          * Creates an instance of this class and puts Phonebook's icon into
       
    55          * current application's context pane.
       
    56          *
       
    57          * @param aEikonEnv EIKON environment where to fetch the status pane.
       
    58          */
       
    59         static CPbkSwapContextPaneIcon* NewL(CEikonEnv& aEikonEnv);
       
    60 
       
    61         /**
       
    62          * Destructor. Restores the previous icon into context pane.
       
    63          */
       
    64         ~CPbkSwapContextPaneIcon();
       
    65 
       
    66     private:
       
    67         /**
       
    68         * By default Symbian 2nd phase constructor is private.
       
    69         * @param aEikonEnv
       
    70         */
       
    71         void ConstructL(CEikonEnv& aEikonEnv);
       
    72 
       
    73     public: //implementation        
       
    74         /**
       
    75          * Show loaded or previous icon
       
    76          * @param aState TSwapState
       
    77          */         
       
    78         void ShowContextPaneIcon(const TSwapState aState);
       
    79 
       
    80     private: // Implementation
       
    81         CPbkSwapContextPaneIcon();
       
    82         /**
       
    83          * Set phonebook's context pane icon
       
    84          */
       
    85         void SetPhonebookContextPaneIconL();
       
    86 
       
    87         /**
       
    88          * Load empty context pane icon
       
    89          */
       
    90         void LoadEmptyContextPaneIconL();
       
    91 
       
    92     private:  // data
       
    93         //Own: Own
       
    94         CEikImage* iContextPaneIcon;
       
    95         /// Own: TSwapState
       
    96         TSwapState iState;
       
    97         /// Ref: current application context pane
       
    98         CAknContextPane* iContextPane;
       
    99         
       
   100     };
       
   101 
       
   102 #endif // __CPbkSwapContextPaneIcon_H__
       
   103 
       
   104 // End of File