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

📄 basenameappui.cpp

📁 symbian学习案例
💻 CPP
字号:
/*
============================================================================
 Name		: $(baseName)AppUi.cpp
 Author	  : $(author)
 Copyright   : $(copyright)
 Description : C$(baseName)AppUi implementation
============================================================================
*/

// INCLUDE FILES
#include <avkon.hrh>
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <f32file.h>
#include <s32file.h>

#include <$(baseName)_$(uid3).rsg>

#include "$(baseName).hrh"
#include "$(baseName).pan"
#include "$(baseName)Application.h"
#include "$(baseName)AppUi.h"
#include "$(baseName)AppView.h"


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


// -----------------------------------------------------------------------------
// C$(baseName)AppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void C$(baseName)AppUi::ConstructL()
{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	// Create view object
	iAppView = C$(baseName)AppView::NewL( );
	AddViewL( iAppView );
	SetDefaultViewL( *iAppView );
	
	//add your code here...

}
// -----------------------------------------------------------------------------
// C$(baseName)AppUi::C$(baseName)AppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
C$(baseName)AppUi::C$(baseName)AppUi()
{
	// No implementation required
	iAppView=NULL;
}

// -----------------------------------------------------------------------------
// C$(baseName)AppUi::~C$(baseName)AppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
C$(baseName)AppUi::~C$(baseName)AppUi()
{
	//add your code here...

}

// -----------------------------------------------------------------------------
// C$(baseName)AppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void C$(baseName)AppUi::HandleCommandL( TInt aCommand )
{
	switch( aCommand )
	{
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;		
		case EAbout:
		{
			
			CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog(); 
			dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
			HBufC* title = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TITLE);
			dlg->QueryHeading()->SetTextL(*title);
			CleanupStack::PopAndDestroy(); //title
			HBufC* msg = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TEXT);
			dlg->SetMessageTextL(*msg);
			CleanupStack::PopAndDestroy(); //msg
			dlg->RunLD(); 
		}
		break;
		default:
			Panic( E$(baseName)Ui );
			break;
	}
}
// -----------------------------------------------------------------------------
//  Called by the framework when the application status pane
//  size is changed.  Passes the new client rectangle to the
//  AppView
// -----------------------------------------------------------------------------
//
void C$(baseName)AppUi::HandleStatusPaneSizeChange()
{
	if(iAppView!=NULL)
	iAppView->HandleStatusPaneSizeChange();
} 



// End of File

⌨️ 快捷键说明

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