logsui/AppSrc/CLogsNaviDecoratorWrapper.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 *      A singleton wrapper for Logs views CAknNavigationDecorator objects (Tab groups). 
       
    16 *      Each unique Tab group is only created if it doesn't already exist. This fixes 
       
    17 *      error MVHA-6TJDMJ.
       
    18 *
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 #ifndef CLogsNaviDecoratorWrapper_H
       
    24 #define CLogsNaviDecoratorWrapper_H
       
    25 
       
    26 
       
    27 //  INCLUDES
       
    28 #include <e32base.h>
       
    29 #include <coemain.h>
       
    30 #include "MLogsNaviDecoratorWrapper.h"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CAknNavigationDecorator;
       
    34 class CAknNavigationControlContainer;
       
    35 class MAknTabObserver;
       
    36 
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41  * A singleton class to wrap Navi Pane tab group handling for 
       
    42  * Logs views.
       
    43  */
       
    44 class CLogsNaviDecoratorWrapper : public CCoeStatic, 
       
    45                                   public MLogsNaviDecoratorWrapper
       
    46     {
       
    47     public: 
       
    48     /**
       
    49      * Returns the singleton CLogsNaviDecoratorWrapper instance. If no instance
       
    50 	 * exists yet it is created.
       
    51      */
       
    52     static CLogsNaviDecoratorWrapper* InstanceL();
       
    53     
       
    54     /**
       
    55      * Returns the wrapped iNaviDecorator instance. If no instance
       
    56 	 * exists yet a new one is created. If there is an instance but it is
       
    57 	 * of wrong resource type, a new instance is created and the old deleted. 
       
    58 	 * 
       
    59 	 * Called from CLogsBaseControlContainer::NavigationTabGroupL
       
    60 	 *
       
    61 	 * @param aNaviPane, the calling views status pane's navigation pane control
       
    62 	 * @param aTabObserver, an interface to the LogsAppUi::TabChangedL
       
    63 	 * @param aResource, the resource id of the 
       
    64 	 *
       
    65 	 * @return CAknNavigationDecorator object for the view's tab group
       
    66      */
       
    67     CAknNavigationDecorator* GetNaviDecoratorL(CAknNavigationControlContainer* aNaviPane,
       
    68                                               MAknTabObserver* aTabObserver,
       
    69                                               TInt aResource);
       
    70                                               
       
    71     private:  
       
    72     /**
       
    73      * NewLC is called from InstanceL.
       
    74      */
       
    75     static CLogsNaviDecoratorWrapper* NewLC();
       
    76     
       
    77     /**
       
    78      * Constructor
       
    79      */
       
    80     CLogsNaviDecoratorWrapper(); 
       
    81     
       
    82     /**
       
    83      * Destructor is called from CCoeEnv::DestroyEnvironmentStatic
       
    84      */
       
    85     ~CLogsNaviDecoratorWrapper();
       
    86     
       
    87 
       
    88     private:  // Data
       
    89     
       
    90     // Wrapped CAknNavigationDecorator object.
       
    91     CAknNavigationDecorator* iNaviDecorator;  
       
    92     
       
    93     // State holder for the current resource id of the iNaviDecorator
       
    94     TInt iCurrentNaviResource;
       
    95     
       
    96     
       
    97     };
       
    98 
       
    99 #endif //CLogsNaviDecoratorWrapper_H
       
   100             
       
   101 
       
   102 // End of File