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

📄 basicsoundappui.cpp

📁 《基于symbian手机开发与应用》一书的源代码
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CBasicSoundAppUi from BasicSoundAppUi.cpp
*  Part of  : BasicSound
*  Created  : 2006-2-7 by 
*  Implementation notes:
*     Initial content was generated by Series 60 AppWizard.
*  Version  :
*  Copyright: 
* ============================================================================
*/

// INCLUDE FILES
#include "BasicSoundAppUi.h"
#include "BasicSoundContainer.h" 
#include <BasicSound.rsg>
#include "basicsound.hrh"

#include <avkon.hrh>

// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CBasicSoundAppUi::ConstructL()
// 
// ----------------------------------------------------------
//
void CBasicSoundAppUi::ConstructL()
    {
    BaseConstructL();

	//iSound->NewL();


    iAppContainer = new (ELeave) CBasicSoundContainer;
    iAppContainer->SetMopParent( this );
    iAppContainer->ConstructL( ClientRect() );
    AddToStackL( iAppContainer );
    }

// ----------------------------------------------------
// CBasicSoundAppUi::~CBasicSoundAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CBasicSoundAppUi::~CBasicSoundAppUi()
    {
    if (iAppContainer)
        {
        RemoveFromStack( iAppContainer );
        delete iAppContainer;
        }
   }

// ------------------------------------------------------------------------------
// CBasicSoundAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
//  This function is called by the EIKON framework just before it displays
//  a menu pane. Its default implementation is empty, and by overriding it,
//  the application can set the state of menu items dynamically according
//  to the state of application data.
// ------------------------------------------------------------------------------
//
void CBasicSoundAppUi::DynInitMenuPaneL(
    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
    {
    }

// ----------------------------------------------------
// CBasicSoundAppUi::HandleKeyEventL(
//     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CBasicSoundAppUi::HandleKeyEventL(
    const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
    {
    return EKeyWasNotConsumed;
    }

// ----------------------------------------------------
// CBasicSoundAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CBasicSoundAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
        {
        case EAknSoftkeyBack:
        case EEikCmdExit:
            {
            Exit();
            break;
            }
        case EBasicSoundCmdAppPlay:
            {
            iAppContainer->PlayL();
				
            break;
            }
        // TODO: Add Your command handling code here
        case EBasicSoundCmdAppStop:
			iAppContainer->StopL();
		case EBasicSoundCmdAppPlayClip:
			iAppContainer->PlayClipL();
		case EBasicSoundCmdAppPlayStream: 
            iAppContainer->playStreamL();
        default:
            break;      
        }
    }

   

// End of File  

⌨️ 快捷键说明

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