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

📄 camdecodeappui.cpp

📁 Symbian 调用摄像头的简单程序。实现了最基本的功能。
💻 CPP
字号:
/*
============================================================================
 Name        : CCamDecodeAppUi from CamDecodeAppui.cpp
 Author      : Augusta
 Version     :
 Copyright   : All Right Reserved
 Description : CCamDecodeAppUi implementation
============================================================================
*/

// INCLUDE FILES
#include "CamDecodeAppui.h"
#include "CamDecodeContainer.h" 
#include <CamDecode.rsg>
#include "CamDecode.hrh"

#include <avkon.hrh>
#include <aknnotewrappers.h>
#include "dllTest.h"

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

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

	}

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

// ------------------------------------------------------------------------------
// CCamDecodeAppUi::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 CCamDecodeAppUi::DynInitMenuPaneL(
	TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
	{
	}

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

// ----------------------------------------------------
// CCamDecodeAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CCamDecodeAppUi::HandleCommandL(TInt aCommand)
	{
	switch ( aCommand )
		{
		case EAknSoftkeyBack:
		case EEikCmdExit:
			{
			iAppContainer->CloseCam();
			Exit();
			break;
			}
		case ECamDecodeCmdAppTest:
			{
			// Info message shown only in the emulator
			iEikonEnv->InfoMsg(_L("test"));
			
			// Load localized message from the resource file
			HBufC* message = CEikonEnv::Static()->AllocReadResourceLC(R_MESSAGE_TEXT);
			// Show information note dialog
			CAknInformationNote* note = new (ELeave) CAknInformationNote;
			note->ExecuteLD(message->Des());
			CleanupStack::PopAndDestroy(message);
			break;
			}

			// TODO: Add Your command handling code here
		case ECamDecodeCmdAppCacu:
			{
			  CdllTest* test = CdllTest::NewLC();
			  TInt iSum;
			  iSum=test->Caculat();
			  CleanupStack::PopAndDestroy();

			  iAppContainer->ShowMessage(iSum);
		
			break;
			}
		default:
			break;	  
		}
	}

⌨️ 快捷键说明

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