aknexqueryappui.cpp

来自「symbian ui的 例子 初学者可以 好好看看,这个是培训的资料,应该比较宝」· C++ 代码 · 共 94 行

CPP
94
字号
/*
* ==============================================================================
*  Name        : aknexqueryappui.cpp
*  Part of     : Query example
*  Interface   :
*  Description :
*  Version     :
*
*  Copyright (c) 2004 - 2006 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ==============================================================================
*/

// INCLUDE FILES
#include <Avkon.hrh>
#include "AknExQueryAppUi.h"
#include "AknExQueryView.h"

// ================= MEMBER FUNCTIONS =========================================

// ----------------------------------------------------------------------------
// CAknExQueryAppUi::CAknExQueryAppUi()
// Default constructor.
// ----------------------------------------------------------------------------
//
CAknExQueryAppUi::CAknExQueryAppUi()
    {
    }

// ----------------------------------------------------------------------------
// CAknExQueryAppUi::ConstructL()
// Constructor.
// ----------------------------------------------------------------------------
//
void CAknExQueryAppUi::ConstructL()
    {
    BaseConstructL( EAknEnableSkin );

    CAknExQueryView* view = new ( ELeave ) CAknExQueryView;
    CleanupStack::PushL( view );
    view->ConstructL();
    AddViewL( view ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();

    ActivateLocalViewL( view->Id() );
    }

// ----------------------------------------------------------------------------
// CAknExQueryAppUi::~CAknExQueryAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------------------------------
//
CAknExQueryAppUi::~CAknExQueryAppUi()
    {
    }

// ----------------------------------------------------------------------------
// CAknExQueryAppUi::HandleCommandL( TInt aCommand )
// Handles the commands.
// ----------------------------------------------------------------------------
//
void CAknExQueryAppUi::HandleCommandL( TInt aCommand )
    {
    switch ( aCommand )
        {
        case EEikCmdExit:
        case EAknCmdExit:
            Exit();
            break;
        default:
            break;
        }
    }

// ----------------------------------------------------------------------------
// void CAknExQueryAppUi::HandleResourceChangeL( TInt aType )
// Handles resource changes.
// ----------------------------------------------------------------------------
//
void CAknExQueryAppUi::HandleResourceChangeL( TInt aType )
    {
    CAknAppUi::HandleResourceChangeL( aType );
    if  ( aType == KEikDynamicLayoutVariantSwitch )
    	{
    	CAknView* view = View( KViewId );
        view->HandleViewRectChange();
        }
    }

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?