Nokia N97 SDK
Example Applications Guide

aknexqueryappui.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : aknexqueryappui.cpp
00004 *  Part of     : Query example
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2004 - 2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 // INCLUDE FILES
00017 #include <Avkon.hrh>
00018 #include "AknExQueryAppUi.h"
00019 #include "AknExQueryView.h"
00020 
00021 // ================= MEMBER FUNCTIONS =========================================
00022 
00023 // ----------------------------------------------------------------------------
00024 // CAknExQueryAppUi::CAknExQueryAppUi()
00025 // Default constructor.
00026 // ----------------------------------------------------------------------------
00027 //
00028 CAknExQueryAppUi::CAknExQueryAppUi()
00029     {
00030     }
00031 
00032 // ----------------------------------------------------------------------------
00033 // CAknExQueryAppUi::ConstructL()
00034 // Constructor.
00035 // ----------------------------------------------------------------------------
00036 //
00037 void CAknExQueryAppUi::ConstructL()
00038     {
00039     BaseConstructL( EAknEnableSkin );
00040 
00041     CAknExQueryView* view = new ( ELeave ) CAknExQueryView;
00042     CleanupStack::PushL( view );
00043     view->ConstructL();
00044     AddViewL( view ); // transfer ownership to CAknViewAppUi
00045     CleanupStack::Pop();
00046 
00047     ActivateLocalViewL( view->Id() );
00048     }
00049 
00050 // ----------------------------------------------------------------------------
00051 // CAknExQueryAppUi::~CAknExQueryAppUi()
00052 // Destructor
00053 // Frees reserved resources
00054 // ----------------------------------------------------------------------------
00055 //
00056 CAknExQueryAppUi::~CAknExQueryAppUi()
00057     {
00058     }
00059 
00060 // ----------------------------------------------------------------------------
00061 // CAknExQueryAppUi::HandleCommandL( TInt aCommand )
00062 // Handles the commands.
00063 // ----------------------------------------------------------------------------
00064 //
00065 void CAknExQueryAppUi::HandleCommandL( TInt aCommand )
00066     {
00067     switch ( aCommand )
00068         {
00069         case EEikCmdExit:
00070         case EAknCmdExit:
00071             Exit();
00072             break;
00073         default:
00074             break;
00075         }
00076     }
00077 
00078 // ----------------------------------------------------------------------------
00079 // void CAknExQueryAppUi::HandleResourceChangeL( TInt aType )
00080 // Handles resource changes.
00081 // ----------------------------------------------------------------------------
00082 //
00083 void CAknExQueryAppUi::HandleResourceChangeL( TInt aType )
00084     {
00085     CAknAppUi::HandleResourceChangeL( aType );
00086     if  ( aType == KEikDynamicLayoutVariantSwitch )
00087         {
00088         CAknView* view = View( KViewId );
00089         view->HandleViewRectChange();
00090         }
00091     }
00092 
00093 // End of File

© Nokia 2009

Back to top