⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aknexlistappui.cpp

📁 Symbian手机编程
💻 CPP
字号:
/*
* =============================================================================
*  Name     : CAknExListAppUi
*  Part of  : AknExList
*  Copyright (c) 2003 Nokia. All rights reserved.
* =============================================================================
*/

#include <avkon.hrh>
#include "AknExList.hrh"
#include "AknExListAppUi.h"
#include "AknExListBaseView.h"
#include "AknExListColumnView.h"
#include "AknExListFormView.h"
#include "AknExListSettingView.h"
#include "AknExListMarkView.h"
#include "AknExListFlagTestView.h"
#include "AknExListSetPageView.h"


// ================= MEMBER FUNCTIONS =========================================
//
// ----------------------------------------------------------------------------
// CAknExListAppUi::CAknExListAppUi()
// Default constructor.
// ----------------------------------------------------------------------------
//
CAknExListAppUi::CAknExListAppUi()
:   iCurrentOutline( EAknExListCmdEmptyOutline )
    {
    }

// ----------------------------------------------------------------------------
// void CAknExListAppUi::ConstructL()
// EPOC constructor.
// Creates view class object.
// ----------------------------------------------------------------------------
void CAknExListAppUi::ConstructL()
    {
    BaseConstructL();

    // Creates CAknExListColumnView class objects.
    CAknExListColumnView* columnView = new( ELeave ) CAknExListColumnView;
    CleanupStack::PushL( columnView );
    columnView->ConstructL();
    AddViewL( columnView ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // columnView

    // Creates CAknExListFormView class objects.
    CAknExListFormView* formView = new( ELeave ) CAknExListFormView;
    CleanupStack::PushL( formView );
    formView->ConstructL();
    AddViewL( formView ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // formView

    // Creates CAknExListSettingView class objects.
    CAknExListSettingView* settingView = new( ELeave ) CAknExListSettingView;
    CleanupStack::PushL( settingView );
    settingView->ConstructL();
    AddViewL( settingView ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // settingView

    // Creates CAknExListMarkView class objects.
    CAknExListMarkView* markView = new( ELeave ) CAknExListMarkView;
    CleanupStack::PushL( markView );
    markView->ConstructL();
    AddViewL( markView ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // markView

    // Creates CAknExListFlagTestView class objects.
    CAknExListFlagTestView* flagTestView =
        new( ELeave ) CAknExListFlagTestView;
    CleanupStack::PushL( flagTestView );
    flagTestView->ConstructL();
    AddViewL( flagTestView ); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // flagTestView

    CAknExListSetPageView* setPageView = CAknExListSetPageView::NewLC();
    AddViewL(setPageView); // transfer ownership to CAknViewAppUi
    CleanupStack::Pop(); // setPageView

    ActivateLocalViewL( columnView->Id() ); // Activates column view.
    }

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

// ----------------------------------------------------------------------------
// void CAknExListAppUi::SetOutlineId( const TInt )
// Sets current outline ID.
// ----------------------------------------------------------------------------
//
void CAknExListAppUi::SetOutlineId( const TInt aOutlineId )
    {
    iCurrentOutline = aOutlineId;
    }

// ----------------------------------------------------------------------------
// TInt CAknExListAppUi:OutlineId() const
// Returns current outline ID.
// ----------------------------------------------------------------------------
//
TInt CAknExListAppUi::OutlineId() const
    {
    return iCurrentOutline;
    }

// ----------------------------------------------------------------------------
// void CAknExListAppUi::HandleCommandL( TInt )
// Handles the commands.
// ----------------------------------------------------------------------------
void CAknExListAppUi::HandleCommandL( TInt aCommand )
    {
    switch ( aCommand ) // Command is...
        {
        case EAknSoftkeyBack:
        case EEikCmdExit:
            Exit();
            break;
        default:
            break;
        }
    }

// End of File

⌨️ 快捷键说明

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