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

📄 uitestcontainerview.cpp

📁 Symbian S60 UI training example
💻 CPP
字号:
/*
========================================================================
 Name        : UiTestContainerView.cpp
 Author      : Andreas Jakl
 Copyright   : 2007, Mopius
 Description :
========================================================================
*/
// [[[ begin generated region: do not modify [Generated System Includes]
#include <aknviewappui.h>
#include <eikmenub.h>
#include <avkon.hrh>
#include <akncontext.h>
#include <akntitle.h>
#include <stringloader.h>
#include <barsread.h>
#include <eikbtgpc.h>
#include <UiTest.rsg>
// ]]] end generated region [Generated System Includes]

// [[[ begin generated region: do not modify [Generated User Includes]
#include "UiTest.hrh"
#include "UiTestContainerView.h"
#include "UiTestContainer.h"
// ]]] end generated region [Generated User Includes]
#include "UiTestContainer.hrh"

// [[[ begin generated region: do not modify [Generated Constants]
// ]]] end generated region [Generated Constants]

/**
 * First phase of Symbian two-phase construction. Should not contain any
 * code that could leave.
 */
CUiTestContainerView::CUiTestContainerView()
		:
		iLabelTextSet(EFalse)
{
	// [[[ begin generated region: do not modify [Generated Contents]
	iUiTestContainer = NULL;
	// ]]] end generated region [Generated Contents]

}
/**
 * The view's destructor removes the container from the control
 * stack and destroys it.
 */
CUiTestContainerView::~CUiTestContainerView()
{
	// [[[ begin generated region: do not modify [Generated Contents]
	delete iUiTestContainer;
	// ]]] end generated region [Generated Contents]
	delete iNaviDecorator;
}

/**
 * Symbian two-phase constructor.
 * This creates an instance then calls the second-phase constructor
 * without leaving the instance on the cleanup stack.
 * @return new instance of CUiTestContainerView
 */
CUiTestContainerView* CUiTestContainerView::NewL()
{
	CUiTestContainerView* self = CUiTestContainerView::NewLC();
	CleanupStack::Pop( self );
	return self;
}

/**
 * Symbian two-phase constructor.
 * This creates an instance, pushes it on the cleanup stack,
 * then calls the second-phase constructor.
 * @return new instance of CUiTestContainerView
 */
CUiTestContainerView* CUiTestContainerView::NewLC()
{
	CUiTestContainerView* self = new (ELeave) CUiTestContainerView();
	CleanupStack::PushL( self );
	self->ConstructL();
	return self;
}


/**
 * Second-phase constructor for view.
 * Initialize contents from resource.
 */
void CUiTestContainerView::ConstructL()
{
	// [[[ begin generated region: do not modify [Generated Code]
	BaseConstructL( R_UI_TEST_CONTAINER_UI_TEST_CONTAINER_VIEW );
	// ]]] end generated region [Generated Code]

	// add your own initialization code here
}

/**
 * @return The UID for this view
 */
TUid CUiTestContainerView::Id() const
{
	return TUid::Uid( EUiTestContainerViewId );
}

/**
 * Handle a command for this view (override)
 * @param aCommand command id to be handled
 */
void CUiTestContainerView::HandleCommandL( TInt aCommand )
{
	// [[[ begin generated region: do not modify [Generated Code]
	TBool commandHandled = EFalse;
	switch ( aCommand )
	{	// code to dispatch to the AknView's menu and CBA commands is generated here

	case EUiTestCmdShowYourName:
		// Define the descriptor that is to contain the user name
		TBuf<20> userName;
		// Create the text query dialog, giving it a reference to the descriptor that will contain the data
		CAknTextQueryDialog* txtDlg = CAknTextQueryDialog::NewL(userName);
		txtDlg->SetPredictiveTextInputPermitted(ETrue);
		// Execute and destroy the dialog 

⌨️ 快捷键说明

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