ldmti_12appui.cpp

来自「自己做的一个练习的小例子」· C++ 代码 · 共 75 行

CPP
75
字号
/* Copyright (c) 2008, Nokia. All rights reserved */

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

#include "LDMTI_12.pan"
#include "LDMTI_12AppUi.h"
#include "LDMTI_12.hrh"
#include "RedView.h"
#include "CyanView.h"
#include "YellowView.h"

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

 //   iAppView = CLDMTI_12AppView::NewL(ClientRect());    
  //  AddToStackL(iAppView);
	m_pRedView = CRedView::NewL();
	AddViewL(m_pRedView);
	m_pCyanView = CCyanView::NewL();
	AddViewL(m_pCyanView);
	m_pYellowView = CYellowView::NewL();
	AddViewL(m_pYellowView);
    }

CLDMTI_12AppUi::CLDMTI_12AppUi()                              
    {
    // add any construction that cannot leave here
    }

CLDMTI_12AppUi::~CLDMTI_12AppUi()
    {
/*    if (iAppView)
        {
        iEikonEnv->RemoveFromStack(iAppView);
        delete iAppView;
        iAppView = NULL;
        }*/
    }

void CLDMTI_12AppUi::HandleCommandL(TInt aCommand)
    {
    switch(aCommand)
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;

        case ELDMTI_12Command1:
            {
				ActivateLocalViewL(m_pRedView->Id());
            }
            break;
        case ELDMTI_12Command2:
            {
				ActivateLocalViewL(m_pCyanView->Id());
            }
            break;
        case ELDMTI_12Command3:
            {
				ActivateLocalViewL(m_pYellowView->Id());
            }
            break;

        default:
            Panic(ELDMTI_12BasicUi);
            break;
        }
    }



⌨️ 快捷键说明

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