imagemanipappui.cpp

来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C++ 代码 · 共 88 行

CPP
88
字号
/**
 *
 * @brief Definition of CImageManipAppUi
 *
 * Copyright (c) EMCC Software Ltd 2003
 * @version 1.0
 */

// INCLUDE FILES

// Class include
#include "ImageManipAppUi.h"

// System includes
#include <ImageManip.rsg> // Application resources
#include <eikenv.h> // CEikonEnv

// User includes
#include "ImageManipAppView.h" // CImageManipAppView
#include "ImageManipAdapter.h" // CImageManipAdapter
#include "ImageManip.hrh" // Command enumeration

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

/**
 * Symbian OS 2nd phase constructor.  Constructs the application's view
 * and the adapter class which contains the interactions with the Media Server
 *
 */
void CImageManipAppUi::ConstructL()
{
    BaseConstructL();
    CEikonEnv* env = CEikonEnv::Static();
    iAdapter = CImageManipAdapter::NewL(*this, env->DefaultDisplayMode());
    iAppView = CImageManipAppView::NewL(ClientRect(), *iAdapter);
}

/**
 * Destructor.
 */
CImageManipAppUi::~CImageManipAppUi()
{
    delete iAdapter;
    delete iAppView;
}

/**
 * From CEikAppUi, takes care of command handling for the view.
 *
 * @param aCommand command to be handled
 */
void CImageManipAppUi::HandleCommandL(TInt aCommand)
{
    switch (aCommand)
    {
        case EDecodeImage:
        case EEncodeImage:
        case ERotate90:
        case ERotate180:
        case ERotate270:
        case EScale:
        case EResetImage:
        {
            iAdapter->HandleCommandL(aCommand);
            break;
        }
        case EAknSoftkeyExit:
        case EEikCmdExit:
        {
            Exit();
            break;
        }
        default:
            break;
    }
}

/**
* Controller (observer mechanism) function for informing the view to redraw.
* Called following an update by the engine
*/
void CImageManipAppUi::RedrawView()
{
    iAppView->RedrawAppView();
}

// End of File

⌨️ 快捷键说明

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