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

📄 bmpmanipappui.cpp

📁 该源码主要用于在手机平台上对图像的一些简单处理
💻 CPP
字号:
/* Copyright (c) 2003, Nokia Mobile Phones. All rights reserved */

#include <avkon.hrh>
#include "EikonEnvironment.h"
#include "Bmpmanip.pan"
#include "BmpmanipAppUi.h"
#include "BmpmanipAppView.h"
#include "Bmpmanip.hrh"


void CBmpmanipAppUi::ConstructL()
    {
    BaseConstructL(EAknEnableSkin);

    iAppView = CBmpmanipAppView::NewL(ClientRect());    

    AddToStackL(iAppView);
    }

CBmpmanipAppUi::CBmpmanipAppUi()                              
    {
    // No implementation required
    }

CBmpmanipAppUi::~CBmpmanipAppUi()
    {
    if (iAppView)
        {
        iEikonEnv->RemoveFromStack(iAppView);
        }

    delete iAppView;
    iAppView = NULL;
    }

void CBmpmanipAppUi::HandleCommandL(TInt aCommand)
    {
	_LIT(KMessage, "Waiting for gif file to load");
	
	//Generally, any command operation would just be allowed to leave directly, but here
	//we want to perform some error condition checking.  Rather than put the entire switch statement
	//inside the TRAPD macro, we create a helper function to make things clearer.

	TInt err (KErrNone);

	switch(aCommand)
		{
	case EAknSoftkeyExit:
	case EEikCmdExit:
		Exit();
		break;

	default:
		TRAP(err,CommandHandlerL(aCommand));
		break;
		}


	//If we try and perform an action before the gif file is loaded
	if (err == KErrInUse)
		{
		NEikonEnvironment::MessageBox(KMessage);
		}
	else if (err != KErrNone)
		{
		User::Leave(err);
		}

    }

void CBmpmanipAppUi::CommandHandlerL(TInt aCommand)
	{
	switch(aCommand)
		{
	case EBmpmanipCmdRotate90:
		{
		iAppView->RotateImageClockwiseL(CBmpmanipAppView::E90Degrees);
		}
		break;

	case EBmpmanipCmdRotate180:
		iAppView->RotateImageClockwiseL(CBmpmanipAppView::E180Degrees);
		break;

	case EBmpmanipCmdRotate270:
		iAppView->RotateImageClockwiseL(CBmpmanipAppView::E270Degrees);
		break;

	case EBmpmanipCmdSave:
		iAppView->SaveL();
		break;

	default:
		User::Panic (KBmpmanip, EBmpmanipBasicUi);
		break;
		}
	}

⌨️ 快捷键说明

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