classicui_pub/tsrc/bc/apps/S60_SDK3.1/bctestmisc/src/bctestmiscappui.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:         test bc for misc control api(s)
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #include <avkon.hrh>
       
    27 #include <aknsutils.h>
       
    28 
       
    29 #include "bctestmiscappui.h"
       
    30 #include "bctestmisc.hrh"
       
    31 #include "bctestmiscview.h"
       
    32 #include "bctestutil.h"
       
    33 #include "bctestmisccase.h"
       
    34 
       
    35 // ======== MEMBER FUNCTIONS ========
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // ctro do nothing
       
    39 // ---------------------------------------------------------------------------
       
    40 //
       
    41 CBCTestMiscAppUi::CBCTestMiscAppUi()
       
    42     {
       
    43     }
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // symbian 2nd phase ctor
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 void CBCTestMiscAppUi::ConstructL()
       
    50     {
       
    51     BaseConstructL();
       
    52     AknsUtils::SetAvkonSkinEnabledL( ETrue );
       
    53 
       
    54 	// init test util
       
    55 	iTestUtil = CBCTestUtil::NewL();
       
    56 
       
    57     // init view
       
    58     CBCTestMiscView* view = CBCTestMiscView::NewL(iTestUtil);
       
    59     CleanupStack::PushL( view );
       
    60     AddViewL( view );
       
    61     CleanupStack::Pop( view );    
       
    62     
       
    63     ActivateLocalViewL( view->Id() );
       
    64 
       
    65 	// Add test case here.
       
    66 	_LIT( KTestCase, "Misc test case" );
       
    67     iTestUtil->AddTestCaseL( CBCTestMiscCase::NewL( view->Container() ),
       
    68         KTestCase );
       
    69     }
       
    70 
       
    71 // ----------------------------------------------------------------------------
       
    72 // CBCTestMiscAppUi::~CBCTestMiscAppUi()
       
    73 // Destructor.
       
    74 // ----------------------------------------------------------------------------
       
    75 //
       
    76 CBCTestMiscAppUi::~CBCTestMiscAppUi()
       
    77     { 
       
    78 	delete iTestUtil;
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------------------------------
       
    82 // handle menu command events
       
    83 // ----------------------------------------------------------------------------
       
    84 //
       
    85 void CBCTestMiscAppUi::HandleCommandL( TInt aCommand )
       
    86     {
       
    87     switch ( aCommand )
       
    88         {
       
    89         case EAknSoftkeyBack:
       
    90         case EEikCmdExit:
       
    91             {
       
    92             Exit();            
       
    93             }
       
    94             break;
       
    95         default:
       
    96             break;
       
    97         }    
       
    98     }