wvuing/wvvariant/Src/CCAAHVariant20.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Concrete implementation of res.file& bitmap changing feature.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "CCAAHVariant20.h"
       
    22 #include	"CCAStatusPaneHandler.h"
       
    23 #include	"CCAAppUi.h"
       
    24 
       
    25 #include	<akntabgrp.h>
       
    26 
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CCAAHVariant20::CCAAHVariant20
       
    32 // C++ default constructor can NOT contain any code, that
       
    33 // might leave.
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 CCAAHVariant20::CCAAHVariant20()
       
    37     {
       
    38     }
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // CCAAHVariant20::NewL
       
    42 // Two-phased constructor.
       
    43 // -----------------------------------------------------------------------------
       
    44 //
       
    45 CCAAHVariant20* CCAAHVariant20::NewL()
       
    46     {
       
    47     CCAAHVariant20* self = new( ELeave ) CCAAHVariant20;
       
    48     return self;
       
    49     }
       
    50 
       
    51 
       
    52 // Destructor
       
    53 CCAAHVariant20::~CCAAHVariant20()
       
    54     {
       
    55     }
       
    56 
       
    57 CAknNavigationDecorator*  CCAAHVariant20::CreateTabGroupL(
       
    58     CAknNavigationControlContainer& aNaviPane,
       
    59     CCAAppUi& aAppUi,
       
    60     CCAStatusPaneHandler& aStatusPane )
       
    61     {
       
    62     // set values to be used for tab changing
       
    63     iNaviPane = &aNaviPane;
       
    64     iAppUi = &aAppUi;
       
    65     iStatusPane = &aStatusPane;
       
    66 
       
    67     return iNaviPane->CreateTabGroupL( this );
       
    68     }
       
    69 
       
    70 
       
    71 TBool CCAAHVariant20::HandleTabsL( const TKeyEvent& aKeyEvent,
       
    72                                    TEventCode aType )
       
    73     {
       
    74     TKeyResponse keyResp;
       
    75     keyResp = iStatusPane->TabGroup()->OfferKeyEventL( aKeyEvent, aType );
       
    76     if ( keyResp == EKeyWasConsumed )
       
    77         {
       
    78         return ETrue;
       
    79         }
       
    80     return EFalse;
       
    81     }
       
    82 
       
    83 void CCAAHVariant20::TabChangedL( TInt aIndex )
       
    84     {
       
    85     iStatusPane->ActivateTab( aIndex );
       
    86     iAppUi->ActivateLocalViewL( iStatusPane->ActiveTabViewId() );
       
    87     }
       
    88 
       
    89 //  End of File