uifw/AvKon/tsrc/bc/bctesttemplate/src/bctesttemplateappui.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  appui
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <avkon.hrh>
       
    20 #include <aknsutils.h>
       
    21 
       
    22 #include "bctesttemplateappui.h"
       
    23 #include "bctesttemplate.hrh"
       
    24 #include "bctesttemplateview.h"
       
    25 #include "bctestutil.h"
       
    26 #include "bctesttemplatecase.h"
       
    27 
       
    28 
       
    29 // ======== MEMBER FUNCTIONS ========
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // constructor do nothing
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 CBCTestTemplateAppUi::CBCTestTemplateAppUi()
       
    36     {
       
    37     }
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 // symbian 2nd phase constructor
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 void CBCTestTemplateAppUi::ConstructL()
       
    44     {
       
    45     BaseConstructL();
       
    46     AknsUtils::SetAvkonSkinEnabledL( ETrue );
       
    47 
       
    48 	// init test util
       
    49 	iTestUtil = CBCTestUtil::NewL();
       
    50 
       
    51     // init view
       
    52     CBCTestTemplateView* view = CBCTestTemplateView::NewL( iTestUtil );
       
    53     CleanupStack::PushL( view );
       
    54     AddViewL( view );
       
    55     CleanupStack::Pop( view );    
       
    56     
       
    57     ActivateLocalViewL( view->Id() );
       
    58 
       
    59 	// Add test case here.
       
    60     iTestUtil->AddTestCaseL( CBCTestTemplateCase::NewL( view->Container() ),
       
    61         _L( "Template test case" ) );
       
    62     }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // CBCTestTemplateAppUi::~CBCTestTemplateAppUi()
       
    66 // Destructor.
       
    67 // ---------------------------------------------------------------------------
       
    68 //
       
    69 CBCTestTemplateAppUi::~CBCTestTemplateAppUi()
       
    70     { 
       
    71 	delete iTestUtil;
       
    72     }
       
    73 
       
    74 // ---------------------------------------------------------------------------
       
    75 // handle menu command events
       
    76 // ---------------------------------------------------------------------------
       
    77 //
       
    78 void CBCTestTemplateAppUi::HandleCommandL( TInt aCommand )
       
    79     {
       
    80     switch ( aCommand )
       
    81         {
       
    82         case EAknSoftkeyBack:
       
    83         case EEikCmdExit:
       
    84             {
       
    85             Exit();
       
    86             return;
       
    87             }
       
    88         default:
       
    89             break;
       
    90         }    
       
    91     }
       
    92 
       
    93 // End of File